Skip to content

Commit c1ada70

Browse files
committed
address comments
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent 810d306 commit c1ada70

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

vortex-tensor/src/fixed_shape/vtable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl ExtVTable for FixedShapeTensor {
2222
type NativeValue<'a> = &'a ScalarValue;
2323

2424
fn id(&self) -> ExtId {
25-
ExtId::new_ref("vortex.fixed_shape_tensor")
25+
ExtId::new_ref("vortex.tensor.fixed_shape_tensor")
2626
}
2727

2828
fn serialize_metadata(&self, metadata: &Self::Metadata) -> VortexResult<Vec<u8>> {

vortex-tensor/src/scalar_fns/cosine_similarity.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use vortex::array::match_each_float_ptype;
1616
use vortex::dtype::DType;
1717
use vortex::dtype::NativePType;
1818
use vortex::dtype::Nullability;
19-
use vortex::dtype::extension::Matcher;
2019
use vortex::error::VortexResult;
2120
use vortex::error::vortex_ensure;
2221
use vortex::error::vortex_ensure_eq;
@@ -53,7 +52,7 @@ impl ScalarFnVTable for CosineSimilarity {
5352
type Options = EmptyOptions;
5453

5554
fn id(&self) -> ScalarFnId {
56-
ScalarFnId::new_ref("vortex.cosine_similarity")
55+
ScalarFnId::new_ref("vortex.tensor.cosine_similarity")
5756
}
5857

5958
fn arity(&self, _options: &Self::Options) -> Arity {
@@ -106,7 +105,7 @@ impl ScalarFnVTable for CosineSimilarity {
106105
})?;
107106

108107
vortex_ensure!(
109-
AnyTensor::matches(lhs_ext),
108+
lhs_ext.is::<AnyTensor>(),
110109
"CosineSimilarity inputs must be an `AnyTensor`, got {lhs}"
111110
);
112111

vortex-tensor/src/scalar_fns/l2_norm.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use vortex::array::match_each_float_ptype;
1616
use vortex::dtype::DType;
1717
use vortex::dtype::NativePType;
1818
use vortex::dtype::Nullability;
19-
use vortex::dtype::extension::Matcher;
2019
use vortex::error::VortexResult;
2120
use vortex::error::vortex_ensure;
2221
use vortex::error::vortex_ensure_eq;
@@ -48,7 +47,7 @@ impl ScalarFnVTable for L2Norm {
4847
type Options = EmptyOptions;
4948

5049
fn id(&self) -> ScalarFnId {
51-
ScalarFnId::new_ref("vortex.l2_norm")
50+
ScalarFnId::new_ref("vortex.tensor.l2_norm")
5251
}
5352

5453
fn arity(&self, _options: &Self::Options) -> Arity {
@@ -89,7 +88,7 @@ impl ScalarFnVTable for L2Norm {
8988
})?;
9089

9190
vortex_ensure!(
92-
AnyTensor::matches(ext),
91+
ext.is::<AnyTensor>(),
9392
"L2Norm input must be an `AnyTensor`, got {input_dtype}"
9493
);
9594

vortex-tensor/src/vector/vtable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl ExtVTable for Vector {
2020
type NativeValue<'a> = &'a ScalarValue;
2121

2222
fn id(&self) -> ExtId {
23-
ExtId::new_ref("vortex.vector")
23+
ExtId::new_ref("vortex.tensor.vector")
2424
}
2525

2626
fn serialize_metadata(&self, _metadata: &Self::Metadata) -> VortexResult<Vec<u8>> {

0 commit comments

Comments
 (0)