@@ -30,10 +30,12 @@ Tensor& any_all_out(KernelRuntimeContext& ctx, const Tensor& in, Tensor& out) {
30
30
31
31
ScalarType in_type = in.scalar_type ();
32
32
ScalarType out_type = out.scalar_type ();
33
- constexpr auto name = " any.all_out" ;
34
33
35
- ET_SWITCH_REALHBBF16_TYPES (in_type, ctx, name, CTYPE_IN, [&] {
36
- ET_SWITCH_TWO_TYPES (Bool, Byte, out_type, ctx, name, CTYPE_OUT, [&] {
34
+ // @lint-ignore CLANGTIDY facebook-hte-CArray
35
+ static constexpr const char op_name[] = " any.all_out" ;
36
+
37
+ ET_SWITCH_REALHBBF16_TYPES (in_type, ctx, op_name, CTYPE_IN, [&] {
38
+ ET_SWITCH_TWO_TYPES (Bool, Byte, out_type, ctx, op_name, CTYPE_OUT, [&] {
37
39
const auto data_in = in.const_data_ptr <CTYPE_IN>();
38
40
auto data_out = out.mutable_data_ptr <CTYPE_OUT>();
39
41
data_out[0 ] = static_cast <CTYPE_OUT>(false );
@@ -79,15 +81,17 @@ Tensor& any_dims_out(
79
81
80
82
ScalarType in_type = in.scalar_type ();
81
83
ScalarType out_type = out.scalar_type ();
82
- constexpr auto name = " any.dims_out" ;
84
+
85
+ // @lint-ignore CLANGTIDY facebook-hte-CArray
86
+ static constexpr const char op_name[] = " any.dims_out" ;
83
87
84
88
const bool in_not_empty = in.numel () > 0 ;
85
89
std::optional<MapReduceOverDimListPlan> plan;
86
90
if ((!dim_list.has_value () || !dim_list.value ().empty ()) && in_not_empty) {
87
91
plan.emplace (in, dim_list);
88
92
}
89
- ET_SWITCH_REALHBBF16_TYPES (in_type, ctx, name , CTYPE_IN, [&] {
90
- ET_SWITCH_TWO_TYPES (Bool, Byte, out_type, ctx, name , CTYPE_OUT, [&] {
93
+ ET_SWITCH_REALHBBF16_TYPES (in_type, ctx, op_name , CTYPE_IN, [&] {
94
+ ET_SWITCH_TWO_TYPES (Bool, Byte, out_type, ctx, op_name , CTYPE_OUT, [&] {
91
95
CTYPE_OUT* out_data = out.mutable_data_ptr <CTYPE_OUT>();
92
96
if (dim_list.has_value () && dim_list.value ().empty ()) {
93
97
const CTYPE_IN* in_data = in.const_data_ptr <CTYPE_IN>();
@@ -144,10 +148,12 @@ Tensor& any_out(
144
148
145
149
ScalarType in_type = in.scalar_type ();
146
150
ScalarType out_type = out.scalar_type ();
147
- constexpr auto name = " any.out" ;
148
151
149
- ET_SWITCH_REALHBBF16_TYPES (in_type, ctx, name, CTYPE_IN, [&] {
150
- ET_SWITCH_TWO_TYPES (Bool, Byte, out_type, ctx, name, CTYPE_OUT, [&] {
152
+ // @lint-ignore CLANGTIDY facebook-hte-CArray
153
+ static constexpr const char op_name[] = " any.out" ;
154
+
155
+ ET_SWITCH_REALHBBF16_TYPES (in_type, ctx, op_name, CTYPE_IN, [&] {
156
+ ET_SWITCH_TWO_TYPES (Bool, Byte, out_type, ctx, op_name, CTYPE_OUT, [&] {
151
157
CTYPE_OUT* out_data = out.mutable_data_ptr <CTYPE_OUT>();
152
158
const bool success = parallel_for_each_reduce_over_dim_output_index (
153
159
in, dim, out, [&](const auto begin, const auto end) {
0 commit comments