11/*
22 * Copyright (c) Meta Platforms, Inc. and affiliates.
33 * All rights reserved.
4+ * Copyright 2026 Arm Limited and/or its affiliates.
45 *
56 * This source code is licensed under the BSD-style license found in the
67 * LICENSE file in the root directory of this source tree.
@@ -50,8 +51,6 @@ void _apply_over_dim_list(
5051
5152TEST (ReduceUtilTest, ApplyOverDim) {
5253 TensorFactory<ScalarType::Long> tf;
53- optional<ArrayRef<int64_t >> dim_list;
54-
5554 Tensor in = tf.zeros ({2 , 4 , 5 , 3 });
5655 _apply_over_dim (in, 0 );
5756 // clang-format off
@@ -85,8 +84,6 @@ TEST(ReduceUtilTest, ApplyOverDim) {
8584 // clang-format on
8685
8786 in = tf.zeros ({2 , 4 , 5 , 3 });
88- int64_t dim_array_2[1 ] = {2 };
89- dim_list = optional<ArrayRef<int64_t >>(ArrayRef<int64_t >{dim_array_2, 1 });
9087 _apply_over_dim (in, 2 );
9188 // clang-format off
9289 EXPECT_TENSOR_EQ (in, tf.make ({2 , 4 , 5 , 3 }, {
@@ -103,8 +100,6 @@ TEST(ReduceUtilTest, ApplyOverDim) {
103100 // clang-format on
104101
105102 in = tf.zeros ({2 , 4 , 5 , 3 });
106- int64_t dim_array_3[1 ] = {3 };
107- dim_list = optional<ArrayRef<int64_t >>(ArrayRef<int64_t >{dim_array_3, 1 });
108103 _apply_over_dim (in, 3 );
109104 // clang-format off
110105 EXPECT_TENSOR_EQ (in, tf.make ({2 , 4 , 5 , 3 }, {
@@ -470,7 +465,7 @@ TEST(ReduceUtilTest, ApplyOnZeroDimTensorOverDimListNonEmpty) {
470465 optional<ArrayRef<int64_t >>(ArrayRef<int64_t >{dim_array_0, 1 });
471466
472467 Tensor in = tf.ones ({});
473- _apply_over_dim_list (in, dim_list), " " ;
468+ _apply_over_dim_list (in, dim_list);
474469 EXPECT_TENSOR_EQ (in, tf.make ({}, {0 }));
475470}
476471
0 commit comments