Skip to content

Commit 0c96542

Browse files
guschmuenaomiOvad
authored andcommitted
fix gather_nd on webgpu ep (microsoft#26270)
fixes gather_nd on webgpu ep (found by transformers.js for the vision encoder of docling)
1 parent 002eb0d commit 0c96542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onnxruntime/core/providers/webgpu/tensor/gather_nd.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Status GatherNDProgram::GenerateShaderCode(ShaderHelper& shader) const {
4343
data_dim += indices_innerest_dim_;
4444

4545
for (uint32_t i = 0; i < static_cast<uint32_t>(data.Rank() - data_dim); i++) {
46-
shader.MainFunctionBody() << " " << data.IndicesSet("data_indices", data_dim, output.IndicesGet("output_indices", indices.Rank() - 1 + i)) << "\n";
46+
shader.MainFunctionBody() << " " << data.IndicesSet("data_indices", data_dim + i, output.IndicesGet("output_indices", indices.Rank() - 1 + i)) << "\n";
4747
}
4848

4949
shader.MainFunctionBody() << " " << output.SetByOffset("global_idx", data.GetByIndices("data_indices"));

0 commit comments

Comments
 (0)