diff --git a/js/web/lib/wasm/jsep/webgpu/ops/matmul.ts b/js/web/lib/wasm/jsep/webgpu/ops/matmul.ts index f49d94e374d76..6f76d42d0d47d 100644 --- a/js/web/lib/wasm/jsep/webgpu/ops/matmul.ts +++ b/js/web/lib/wasm/jsep/webgpu/ops/matmul.ts @@ -208,8 +208,10 @@ export const matMul = (context: ComputeContext): void => { const reshapedA = context.inputs[0].reshape([1, batchA, K]); const reshapedB = context.inputs[0].reshape([1, K, N]); const matmulOutputShape = [1, batchA, N]; - const matmulInputs = [reshapedA, reshapedB] - context.compute(createMatmulProgramInfo(matmulInputs, { activation: '' }, outputShape, matmulOutputShape), { inputs: matmulInputs }); + const matmulInputs = [reshapedA, reshapedB]; + context.compute(createMatmulProgramInfo(matmulInputs, { activation: '' }, outputShape, matmulOutputShape), { + inputs: matmulInputs, + }); } else { context.compute(createMatmulProgramInfo(context.inputs, { activation: '' }, outputShape)); } diff --git a/js/web/test/data/ops/matmul.jsonc b/js/web/test/data/ops/matmul.jsonc index e1aa324a8e0a6..14abf37696528 100644 --- a/js/web/test/data/ops/matmul.jsonc +++ b/js/web/test/data/ops/matmul.jsonc @@ -104,16 +104,14 @@ "type": "float32" }, { - "data": [ - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 - ], + "data": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], "dims": [1, 4, 3], "type": "float32" } ], "outputs": [ { - "data": [190,200,210,470,496,522,1310,1384,1458,1590,1680,1770,750,792,834,1030,1088,1146], + "data": [190, 200, 210, 470, 496, 522, 1310, 1384, 1458, 1590, 1680, 1770, 750, 792, 834, 1030, 1088, 1146], "dims": [6, 1, 3], "type": "float32" } @@ -128,16 +126,14 @@ "type": "float32" }, { - "data": [ - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 - ], + "data": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], "dims": [1, 1, 4, 3], "type": "float32" } ], "outputs": [ { - "data": [190,200,210,470,496,522,1310,1384,1458,1590,1680,1770,750,792,834,1030,1088,1146], + "data": [190, 200, 210, 470, 496, 522, 1310, 1384, 1458, 1590, 1680, 1770, 750, 792, 834, 1030, 1088, 1146], "dims": [2, 3, 1, 3], "type": "float32" }