From c613cc58a9e5001434d2f562c69fc432e6196ebd Mon Sep 17 00:00:00 2001 From: Jiajia Qin Date: Fri, 29 Dec 2023 05:15:26 +0800 Subject: [PATCH] [js/webgpu] Fix shader compilation errors in Resize (#18947) ### Description An extra right parenthesis was added by accidentally, which results some resize cases fail. This PR fixes it. --- js/web/lib/wasm/jsep/webgpu/ops/resize.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/lib/wasm/jsep/webgpu/ops/resize.ts b/js/web/lib/wasm/jsep/webgpu/ops/resize.ts index d20ef63222..9423786cd0 100644 --- a/js/web/lib/wasm/jsep/webgpu/ops/resize.ts +++ b/js/web/lib/wasm/jsep/webgpu/ops/resize.ts @@ -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}; }` : ''};