Skip to content

Commit b5ec7d0

Browse files
nit: match the surrounding tensor naming in the new tests
1 parent a8b5c9b commit b5ec7d0

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎kernels/test/op_flip_test.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,16 @@ class OpFlipOutDimOrderTest : public OperatorTest {
7979
TEST_F(OpFlipOutDimOrderTest, ChannelsLastMatchesContiguous) {
8080
TensorFactory<ScalarType::Float> tf;
8181

82-
Tensor contiguous_in =
82+
Tensor contiguous_input =
8383
tf.make({1, 3, 2, 2}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12});
8484
Tensor expected =
8585
tf.make({1, 3, 2, 2}, {9, 10, 11, 12, 5, 6, 7, 8, 1, 2, 3, 4});
8686
int64_t dims_data[1] = {1};
8787
IntArrayRef dims = IntArrayRef(dims_data, 1);
8888

89-
Tensor in = tf.channels_last_like(contiguous_in);
89+
Tensor input = tf.channels_last_like(contiguous_input);
9090
Tensor out = tf.zeros_channels_last({1, 3, 2, 2});
91-
op_flip_out(in, dims, out);
91+
op_flip_out(input, dims, out);
9292

9393
EXPECT_TENSOR_CLOSE(out, tf.channels_last_like(expected));
9494
}

‎kernels/test/op_gather_test.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,14 @@ TEST_F(OpGatherOutTest, ChannelsLastMatchesContiguous) {
382382
TensorFactory<ScalarType::Long> tf_index;
383383
TensorFactory<ScalarType::Float> tf_data;
384384

385-
Tensor contiguous_in =
385+
Tensor contiguous_self =
386386
tf_data.make({1, 3, 2, 2}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12});
387387
Tensor expected = tf_data.make({1, 1, 2, 2}, {5, 6, 7, 8});
388388

389-
Tensor in = tf_data.channels_last_like(contiguous_in);
389+
Tensor self = tf_data.channels_last_like(contiguous_self);
390390
Tensor index = tf_index.channels_last_like(tf_index.full({1, 1, 2, 2}, 1));
391391
Tensor out = tf_data.zeros_channels_last({1, 1, 2, 2});
392-
op_gather_out(in, 1, index, false, out);
392+
op_gather_out(self, 1, index, false, out);
393393

394394
EXPECT_TENSOR_CLOSE(out, tf_data.channels_last_like(expected));
395395
}

‎kernels/test/op_roll_test.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ class OpRollOutDimOrderTest : public OperatorTest {
7575
TEST_F(OpRollOutDimOrderTest, ChannelsLastMatchesContiguous) {
7676
TensorFactory<ScalarType::Float> tf;
7777

78-
Tensor contiguous_in =
78+
Tensor contiguous_input =
7979
tf.make({1, 3, 2, 2}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12});
8080
Tensor expected =
8181
tf.make({1, 3, 2, 2}, {9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8});
8282
const std::vector<int64_t> shifts = {1};
8383
const std::vector<int64_t> dims = {1};
8484

85-
Tensor in = tf.channels_last_like(contiguous_in);
85+
Tensor input = tf.channels_last_like(contiguous_input);
8686
Tensor out = tf.zeros_channels_last({1, 3, 2, 2});
8787
op_roll_out(
88-
in,
88+
input,
8989
ArrayRef<int64_t>(shifts.data(), shifts.size()),
9090
ArrayRef<int64_t>(dims.data(), dims.size()),
9191
out);

0 commit comments

Comments
 (0)