Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js/web] update default export to include webgpu #22754

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Nov 7, 2024

Description

This PR changes the following exports:

  • onnxruntime-web now is same to onnxruntime-web/webgpu.
  • onnxruntime-web/webgpu is deprecating.

Migration instructions:

  • use onnxruntime-web instead of onnxruntime-web/webgpu.
  • use onnxruntime-web/wasm if want to use onnxruntime-web without webgpu/webnn.

Export table

file name export entry includes WASM includes JSEP (WebGPU & WebNN) includes WebGL
ort.all.min.js
ort.all.js
ort.all.min.mjs
ort.all.mjs
onnxruntime-web/all ✔️ ✔️ ✔️
ort.min.js
ort.js
ort.min.mjs
ort.mjs
onnxruntime-web ✔️ ❌ --> ✔️ ✔️ -->❌
ort.webgpu.min.js
ort.webgpu.js
ort.webgpu.min.mjs
ort.webgpu.mjs
onnxruntime-web/webgpu ✔️ ✔️
ort.wasm.min.js
ort.wasm.js
ort.wasm.min.mjs
ort.wasm.mjs
onnxruntime-web/wasm ✔️

@gyagp
Copy link
Contributor

gyagp commented Nov 7, 2024

Per my understanding, onnxruntime-web is more like the default one, while onnxruntime-web/* are for specific usages. Can we leave onnxruntime-web/webgpu as is (for symmetry), and have onnxruntime-web (without /) map to the files for onnxruntime-web/webgpu (ort.webgpu.)?
Furthermore, can we rename onnxruntime-web to onnxruntime, as we already know it will be used on the web. This could be another breaking change.

@fs-eire
Copy link
Contributor Author

fs-eire commented Nov 7, 2024

Per my understanding, onnxruntime-web is more like the default one, while onnxruntime-web/* are for specific usages. Can we leave onnxruntime-web/webgpu as is (for symmetry), and have onnxruntime-web (without /) map to the files for onnxruntime-web/webgpu (ort.webgpu.)? Furthermore, can we rename onnxruntime-web to onnxruntime, as we already know it will be used on the web. This could be another breaking change.

One reason that I want to deprecate ort.webgpu.min.js is because it is actually JSEP, not webgpu. JSEP build contains webgpu and webnn and is based on wasm. "onnxruntime-web/webgpu" will be kept in a few version anyway so we can decide whether to remove it or not then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants