Skip to content

Commit 318cc87

Browse files
authored
[WebGPU] fix Pad cache key (microsoft#24305)
### Description Fix cache key of Pad operator
1 parent 1cb53d0 commit 318cc87

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.github/workflows/windows_webgpu.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ jobs:
126126
dir ${{ github.workspace }}\RelWithDebInfo\RelWithDebInfo\onnxruntime_test_all_stderr.log
127127
128128
- name: Validate shader keys
129-
continue-on-error: true
130129
uses: ./.github/actions/webgpu-validate-shader-key
131130
with:
132131
log_file_path: ${{ github.workspace }}\RelWithDebInfo\RelWithDebInfo\onnxruntime_test_all_stderr.log

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ Status Pad::ComputeInternal(ComputeContext& context) const {
168168

169169
PadProgram program{mode_, dim_value_zero, is_float16};
170170
if (!dim_value_zero) {
171-
program.AddInput({input_tensor, ProgramTensorMetadataDependency::TypeAndRank});
171+
program.AddInput({input_tensor, ProgramTensorMetadataDependency::Rank});
172172
}
173-
program.AddOutput({output_tensor, ProgramTensorMetadataDependency::Rank})
173+
program.AddOutput({output_tensor, ProgramTensorMetadataDependency::TypeAndRank})
174174
.SetDispatchGroupSize((output_size + WORKGROUP_SIZE - 1) / WORKGROUP_SIZE)
175175
.CacheHint(std::to_string(static_cast<int>(mode_)), dim_value_zero)
176176
.AddUniformVariables({{gsl::span<const int32_t>(lower_pads.data(), lower_pads.size())}, {output_size}, {value_uint32}});

0 commit comments

Comments
 (0)