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

[DO NOT MERGE] Code example for testing ORT-Web WebNN EP #608

Closed
wants to merge 2 commits into from

Conversation

Honry
Copy link

@Honry Honry commented Feb 28, 2024

This is a very rough example to enable WebNN in transformer.js. I just add some hard codes to make the "Image classification w/ google/vite-base-patch16-224" fp32 model work with ORT Web WebNN EP.

WebNN EP was released in onnxruntime-web dev channel started from 1.18.0-dev.20240126, so this PR depends on Guenther's #596 to make transformers.js work with latest ORT Web.

Please note WebNN DirectML backend is only available on Win 11 with latest Chrome Canary or Edge Canary behind "Enables WebNN API" flag.

guschmue and others added 2 commits February 22, 2024 13:33
This is a very rough example to enable WebNN in transformers.js.
I just add some hard codes to make the "Image classification w/ google/vite-base-patch16-224"
fp32 model work with ORT Web WebNN EP.

This PR depends on xenova#596
@sansmoraxz
Copy link

WebNN support is out on ort.

v1.17.3

Also chrome and edge are shipping with the API available in the chrome://flags.

@Honry
Copy link
Author

Honry commented May 20, 2024

WebNN support is out on ort.

v1.17.3

Also chrome and edge are shipping with the API available in the chrome://flags.

Yeah, WebNN has been released in 1.18.0, and enabled behind Chrome flag: "Enables WebNN API".

This is very early experimental to explore WebNN integration in transformers.js.

@xenova
Copy link
Owner

xenova commented May 23, 2024

Great news! Thanks @Honry. Transformers.js v3 will use onnxruntime-web >= 1.18.0, so all updates should be made to the v3 branch (PR). I'll close this draft PR, but will reference it in v3 as well as for the PR which eventually adds WebNN support.

@Honry
Copy link
Author

Honry commented May 24, 2024

@xenova thank you for adding WebNN support to v3 plan, it's truly thrilling! Please feel free to reach out if there's anything we can support.

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.

None yet

4 participants