Skip to content

Commit a16b9dd

Browse files
forward fix tensor maker issue (#12363)
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #12346 by @Gasoonjia ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/gasoonjia/20/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/20/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/gasoonjia/20/orig @diff-train-skip-merge Co-authored-by: gasoonjia <[email protected]>
1 parent 3419b46 commit a16b9dd

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)