Skip to content

Commit 370f304

Browse files
Add slice_scatter test: large end value
Differential Revision: D62309150 Pull Request resolved: #5138
1 parent 63e794a commit 370f304

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

kernels/test/op_slice_scatter_test.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,3 +863,24 @@ TEST_F(OpSliceScatterTensorOutTest, DynamicShapeTest) {
863863
EXPECT_TENSOR_EQ(ret_default_end, out);
864864
EXPECT_TENSOR_EQ(ret_default_end, expected);
865865
}
866+
867+
TEST_F(OpSliceScatterTensorOutTest, LargeEndValue) {
868+
TensorFactory<ScalarType::Int> tf;
869+
870+
Tensor input = tf.zeros({1, 1, 2, 5, 3, 3});
871+
Tensor src = tf.ones({1, 1, 2, 5, 3, 3});
872+
873+
Tensor out = tf.zeros({1, 1, 2, 5, 3, 3});
874+
Tensor expected = tf.ones({1, 1, 2, 5, 3, 3});
875+
876+
Tensor ret = op_slice_scatter_out(
877+
input,
878+
src,
879+
/*dim=*/1,
880+
/*start=*/0,
881+
/*end=*/9223372036854775807,
882+
/*step=*/1,
883+
out);
884+
EXPECT_TENSOR_EQ(ret, out);
885+
EXPECT_TENSOR_EQ(ret, expected);
886+
}

0 commit comments

Comments
 (0)