Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
qjia7 committed Oct 24, 2024
1 parent 67f5e35 commit 7024cd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 4 additions & 2 deletions js/web/lib/wasm/jsep/webgpu/ops/matmul.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
12 changes: 4 additions & 8 deletions js/web/test/data/ops/matmul.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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"
}
Expand Down

0 comments on commit 7024cd6

Please sign in to comment.