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 4f600bb commit 3f4ab76Copy full SHA for 3f4ab76
onnxruntime/core/providers/webgpu/tensor/where.cc
@@ -126,6 +126,10 @@ Status Where::ComputeInternal(ComputeContext& context) const {
126
TensorShape output_shape;
127
ORT_RETURN_IF_ERROR(ComputeOutputShape(cond_shape, x_shape, y_shape, output_shape));
128
auto* output_tensor = context.Output(0, output_shape);
129
+ if (output_tensor->Shape().Size() == 0) {
130
+ return Status::OK();
131
+ }
132
+
133
constexpr int component = 4;
134
uint32_t vec_size = onnxruntime::narrow<uint32_t>((output_shape.Size() + 3) / component);
135
const auto is_broadcast = !(x_shape == y_shape &&
0 commit comments