Skip to content

Commit 8b5201b

Browse files
authored
forward fix tensor maker issue
Differential Revision: D78100368 Pull Request resolved: #12346
1 parent dd06b3b commit 8b5201b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

extension/tensor/test/tensor_ptr_maker_test.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ TEST_F(TensorPtrMakerTest, CreateTensorUsingFromBlobWithLegalStrides) {
123123
EXPECT_EQ(tensor->size(1), 2);
124124
EXPECT_EQ(tensor->size(2), 2);
125125

126-
// recalculated stride[0]t o 2 to meet ET's requirement while maintain the
126+
// recalculated stride[0] to 4 to meet ET's requirement while maintain the
127127
// same behavior as original tensor since size[0] == 1
128128
EXPECT_EQ(tensor->strides()[0], 4);
129129
EXPECT_EQ(tensor->strides()[1], 2);
@@ -134,9 +134,7 @@ TEST_F(TensorPtrMakerTest, CreateTensorUsingFromBlobWithLegalStrides) {
134134

135135
TEST_F(TensorPtrMakerTest, FailedCreateTensorUsingFromBlobWithIllegalStrides) {
136136
float data[20] = {3};
137-
ET_EXPECT_DEATH(
138-
from_blob(data, {2, 2, 2}, {10, 2, 1}),
139-
"invalid strides for dim 0: 10!= 4 while its size is 2 != 1");
137+
ET_EXPECT_DEATH(from_blob(data, {2, 2, 2}, {10, 2, 1}), "");
140138
}
141139

142140
TEST_F(TensorPtrMakerTest, TensorMakerConversionOperator) {

0 commit comments

Comments
 (0)