You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use WebGPU EP instead of JSEP in WebAssembly (microsoft#24856)
### Description
This PR allows to use WebGPU EP in `onnxruntime-web` NPM package.
### Migration Plan
Currently, there are 2 different EPs implemented the WebGPU backend of
onnxruntime-web. They are JSEP and WebGPU EP. The migration plan is to
replace the JSEP with WebGPU EP and eventually remove the JSEP. The plan
contains the following stages:
- STAGE 1: enable WebGPU EP on onnxruntime-web in local build. (Done)
- **STAGE 2: enable WebGPU EP on onnxruntime-web in the public package.
(This PR)**
- STAGE 3: remove JSEP from onnxruntime-web.
### Package consumption changes
- Default import (`import 'onnxruntime-web'`) and CPU only import
(`import 'onnxruntime-web/wasm'`) keeps their previous behaviors.
- WebGPU import (`import 'onnxruntime-web/webgpu'`) will now use WebGPU
EP instead of JSEP. Previously it was the same as default import.
- WebGPU import will use a different suffix for the .mjs and .wasm name
(which was `.jsep`):
- ort-wasm-simd-threaded<b>.asyncify</b>.mjs
- ort-wasm-simd-threaded<b>.asyncify</b>.wasm
- The suffix `.asyncify` is used as `.jspi` is planned for future. They
are 2 different ways of emscripten's async implementation (sync C++
function calls async JS function)
0 commit comments