From eda748ca05a5139ea489633d5f4950c12b6cb5f5 Mon Sep 17 00:00:00 2001 From: Satya Jandhyala Date: Mon, 18 Sep 2023 17:54:40 -0700 Subject: [PATCH] Hardcode dispatch. --- .../jsep/webgpu/ops/3rd-party/conv_backprop_mm_webgpu.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/web/lib/wasm/jsep/webgpu/ops/3rd-party/conv_backprop_mm_webgpu.ts b/js/web/lib/wasm/jsep/webgpu/ops/3rd-party/conv_backprop_mm_webgpu.ts index abdbe8aeaaa94..f96b4ccd18ceb 100644 --- a/js/web/lib/wasm/jsep/webgpu/ops/3rd-party/conv_backprop_mm_webgpu.ts +++ b/js/web/lib/wasm/jsep/webgpu/ops/3rd-party/conv_backprop_mm_webgpu.ts @@ -123,10 +123,9 @@ export const createConv2DTransposeMatMulProgramInfo = (outWidth % 4 === 0 && !isChannelsLast)) && outChannels % 4 === 0; - const dispatchX = !isChannelsLast ? outChannels : outWidth * outHeight; - const dispatchY = !isChannelsLast ? outWidth * outHeight : outChannels; - const workGroupSize: [number, number, number] = - isVec4 ? [8, 8, 1] : [dispatchX <= 4 ? 4 : 16, dispatchX > 4 && dispatchY <= 4 ? 4 : 16, 1]; + const dispatchX = isChannelsLast ? outChannels : outWidth * outHeight; + const dispatchY = isChannelsLast ? outWidth * outHeight : outChannels; + const workGroupSize: [number, number, number] = isVec4 ? [8, 8, 1] : [4, 4, 1]; const elementsPerThread = isVec4 ? [4, 4, 1] : [dispatchX <= 4 ? 1 : 2, dispatchX > 4 && dispatchY <= 4 ? 1 : 2, 1]; const dispatch = [