Skip to content

Commit

Permalink
[js/webgpu] Fix shader compilation errors in Resize (#18947)
Browse files Browse the repository at this point in the history
### Description
An extra right parenthesis was added by accidentally, which results some
resize cases fail. This PR fixes it.
  • Loading branch information
qjia7 authored Dec 28, 2023
1 parent 998517b commit c613cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/web/lib/wasm/jsep/webgpu/ops/resize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ const bilinearInterpolation =
var col:${dType} = originalIndices[${widthIdx}];
${
useExtrapolation ?
`if (row < 0 || row > (${inputShape[heightIdx]} - 1) || col < 0 || col > (${inputShape[widthIdx]} - 1))) {
`if (row < 0 || row > (${inputShape[heightIdx]} - 1) || col < 0 || col > (${inputShape[widthIdx]} - 1)) {
return ${extrapolationValue};
}` :
''};
Expand Down

0 comments on commit c613cc5

Please sign in to comment.