@@ -49,13 +49,13 @@ Tensor& argmin_out(
4949 static constexpr const char op_name[] = " argmin.out" ;
5050
5151 ET_SWITCH_REALHBF16_TYPES (in.scalar_type (), ctx, op_name, CTYPE, [&] {
52- long * out_data = out.mutable_data_ptr <long >();
52+ int64_t * out_data = out.mutable_data_ptr <int64_t >();
5353
5454 const bool success = parallel_for_each_reduce_over_dim_output_index (
5555 in, dim, out, [&](const auto begin, const auto end) {
5656 for (const auto out_ix : c10::irange (begin, end)) {
57- std::tuple<CTYPE, long > acc = reduce_over_dim<CTYPE>(
58- [](CTYPE v, long ix, CTYPE acc_val, long acc_ix) {
57+ std::tuple<CTYPE, int64_t > acc = reduce_over_dim<CTYPE>(
58+ [](CTYPE v, int64_t ix, CTYPE acc_val, int64_t acc_ix) {
5959 // the below condition as written is equivalent to
6060 // !isnan(accval) && (isnan(v) || v < acc_val). cases:
6161 // - if neither acc_val nor v is NaN, !(v >= acc_val) is
@@ -70,7 +70,7 @@ Tensor& argmin_out(
7070 acc_val = v;
7171 acc_ix = ix;
7272 }
73- return std::tuple<CTYPE, long >{acc_val, acc_ix};
73+ return std::tuple<CTYPE, int64_t >{acc_val, acc_ix};
7474 },
7575 in,
7676 dim,
0 commit comments