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

[Web] WebNN optimizations silently failing when using wrong argument names in freeDimensionOverrides #22300

Open
eyaler opened this issue Oct 3, 2024 · 2 comments
Labels
ep:WebNN WebNN execution provider platform:web issues related to ONNX Runtime web; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@eyaler
Copy link

eyaler commented Oct 3, 2024

Describe the issue

My WebNN model was running 100x slower due to me using wrong argument names in freeDimensionOverrides. You can see the discussion here: microsoft/webnn-developer-preview#40

In my case I mistakenly wrote freeDimensionOverrides: { batch: 1, channels: 3, height: 512, width: 512 } instead of correct freeDimensionOverrides: { batch_size: 1, num_channels: 3, height: 512, width: 512 }, these caused optimizations not to work without explicit notification, and I did not know why my model is running so slowly. In my case I got the names completely wrong, but a similar issue could be caused by a simple typo.

I suggest that using wrong argument names would throw an error (or at least a warning). Also I suggest to emphasize in the docs that WebNN runs without optimizations unless you fix all free dimensions.

To reproduce

Inserting a typo in one of the arguments here https://github.com/eyaler/webnn-developer-preview/blob/main/demos/sd-turbo/index.js#L314 will causes the model to run 100x slower

Urgency

This may hinder WebNN dev onboarding

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.19.0-dev.20240804-ee2fe87e2d, 1.19.2, 1.20.0-dev.20240928-1bda91fc57

Execution Provider

Other / Unknown

@eyaler eyaler added the platform:web issues related to ONNX Runtime web; typically submitted using template label Oct 3, 2024
@github-actions github-actions bot added the ep:WebNN WebNN execution provider label Oct 3, 2024
Copy link
Contributor

github-actions bot commented Nov 2, 2024

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Nov 2, 2024
@eyaler
Copy link
Author

eyaler commented Nov 29, 2024

not stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:WebNN WebNN execution provider platform:web issues related to ONNX Runtime web; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

1 participant