mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-10 00:38:54 +00:00
[webgpu] fix Split operator implementation when input is 1D (#23376)
### Description [webgpu] fix Split operator implementation when input is 1D
This commit is contained in:
parent
e51bcfb541
commit
1d97d6ef55
1 changed files with 2 additions and 2 deletions
|
|
@ -65,11 +65,11 @@ Status SplitProgram::GenerateShaderCode(ShaderHelper& shader) const {
|
|||
|
||||
shader.MainFunctionBody() << shader.GuardAgainstOutOfBoundsWorkgroupSizes("uniforms.input_size")
|
||||
<< " var indices = " << input.OffsetToIndices("global_idx") << ";\n"
|
||||
<< " var index = indices[" << axis_ << "];\n"
|
||||
<< " var index = " << input.IndicesGet("indices", axis_) << ";\n"
|
||||
<< " let output_number = calculate_output_index(index);\n"
|
||||
<< " if (output_number != 0u) {\n"
|
||||
<< " index -= uniforms.sizes_in_split_axis[output_number - 1u];\n"
|
||||
<< " indices[" << axis_ << "] = index;\n"
|
||||
<< " " << input.IndicesSet("indices", axis_, "index") << "\n"
|
||||
<< " }\n"
|
||||
<< " write_buffer_data(output_number, global_idx, indices);\n";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue