Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion onnxruntime/core/providers/webgpu/reduction/reduction_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ Status ReduceKernel<allow_multi_axes>::ComputeInternal(ComputeContext& context)
return Status::OK();
}

bool use_naive_reduction = name_ == "ArgMin" || name_ == "ArgMax" || (reduce_size < 32 && output_size > 1024) || is_input_empty || input_tensor->Shape().NumDimensions() == 0;
bool use_naive_reduction = name_ == "ArgMin" || name_ == "ArgMax" || (reduce_size < 32 && output_size > 1024) ||
(name_ == "ReduceMean" && reduce_size <= 128 && output_size > 20000) ||
Comment thread
guschmue marked this conversation as resolved.
Outdated
is_input_empty || input_tensor->Shape().NumDimensions() == 0;

if (use_naive_reduction) {
ReduceNaiveProgram program(name_, reduce_op_type, keepdims_, noop_with_empty_axes_, input_axes, is_input_empty);
Expand Down
Loading