We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6be3fe commit c66f533Copy full SHA for c66f533
kernels/portable/cpu/op_argmin.cpp
@@ -53,8 +53,7 @@ Tensor& argmin_out(
53
// that dimension is contiguous. Is there any particular reason we
54
// shouldn't just always use this strategy since we aren't
55
// otherwise capable of parallelizing reductions?
56
- const auto reduction_size =
57
- dim.has_value() ? in.sizes().at(dim.value()) : in.numel();
+ const int64_t reduction_size = get_reduced_dim_product(in, dim);
58
const auto grain_size = std::max(
59
static_cast<int64_t>(1),
60
executorch::extension::internal::GRAIN_SIZE / reduction_size);
0 commit comments