onnxruntime/js/web/lib/wasm/jsep
Jiajia Qin cd3fb377ea
[js/webgpu] Allow binary ops with scalar to use the vectorize path (#17589)
### Description
1. For binary ops, the components is always 4. So the dispatchGroup
should be : `{x: Math.ceil(outputSize / 64 /* workgroup size */ / 4 /*
component size */)}` instead of `{x: Math.ceil(outputSize / 64 /*
workgroup size */ / (vectorize ? 4 : 1) /* vec size */)}`.

2. If any of a or b only has one element, we still can use the vectorize
path since the same value will be broadcasted.
2023-09-21 20:55:08 -07:00
..
webgpu [js/webgpu] Allow binary ops with scalar to use the vectorize path (#17589) 2023-09-21 20:55:08 -07:00
backend-webgpu.ts [js/web] revise TensorView (#17473) 2023-09-14 21:14:44 -07:00
init.ts [js/web] revise TensorView (#17473) 2023-09-14 21:14:44 -07:00
log.ts [js/webgpu] support proxy for webgpu (#15851) 2023-05-15 16:23:13 -07:00
tensor-view.ts [js/web] revise TensorView (#17473) 2023-09-14 21:14:44 -07:00
util.ts [js/webgpu] allow 0 sized tensor for tensor view (#16540) 2023-06-30 12:05:04 -07:00