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] model output is incorrect with webgpu #19816

Closed
nagadomi opened this issue Mar 7, 2024 · 2 comments
Closed

[Web] model output is incorrect with webgpu #19816

nagadomi opened this issue Mar 7, 2024 · 2 comments
Assignees
Labels
api:Javascript issues related to the Javascript API platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@nagadomi
Copy link

nagadomi commented Mar 7, 2024

Describe the issue

I have various denoising/super-resolution models and they all work fine with wasm, but not with webgpu.
With webgpu, the output value seems to be very large and clipped at the last Clip node.

To reproduce

webgpu_denoise_test.zip
The zip file contains two small onnx models, test image, and the html and javascript to run them.

Screenshots of the results
vgg7_wasm
vgg7_webgpu
cunet_wasm
cunet_webgpu

vgg7_noise0.onnx is a simple model, using only Conv2d, LeakyReLU, and Clip.
Also, I am testing with google-chrome on Linux. If the issue is not reproduced, that may be the cause.

Urgency

I am not in a hurry to solve the problem. I am currently using wasm.

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.17.1

Execution Provider

'webgpu' (WebGPU)

@nagadomi nagadomi added the platform:web issues related to ONNX Runtime web; typically submitted using template label Mar 7, 2024
@github-actions github-actions bot added the api:Javascript issues related to the Javascript API label Mar 7, 2024
@fs-eire fs-eire self-assigned this Mar 7, 2024
@fs-eire
Copy link
Contributor

fs-eire commented Mar 12, 2024

This issue is fixed in latest @ dev package.

Please get this fix by replacing the URL
"//cdn.jsdelivr.net/npm/[email protected]/dist/ort.webgpu.min.js"
to
"//cdn.jsdelivr.net/npm/onnxruntime-web@dev/dist/ort.webgpu.min.js"

@nagadomi
Copy link
Author

nagadomi commented Mar 12, 2024

Thank you for the fix.
I confirmed that the results from the wasm and webgpu are practically the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:Javascript issues related to the Javascript API platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants