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

mnist-inference-web wgpu matmul returns all zeros #2178

Closed
laggui opened this issue Aug 19, 2024 · 2 comments
Closed

mnist-inference-web wgpu matmul returns all zeros #2178

laggui opened this issue Aug 19, 2024 · 2 comments
Labels
bug Something isn't working wgpu Related to WGPU backend

Comments

@laggui
Copy link
Member

laggui commented Aug 19, 2024

Describe the bug
The wgpu matmul implementation returns all zeros when running in the browser.

Also reported by a discord user: https://discord.com/channels/1038839012602941528/1059209073784008835/1273995743790628876

To Reproduce
Run the mnist-inference-web example built for wgpu.

The scores returned are always the same for all digits.

image

Upon further debugging, the fc1 layer always returns zeros because of the matmul issue (tiling2d implementation w/ cube). Note that using the simple matrix multiply works (and cmma is not available in this case).

Expected behavior
The results from the matmul should not be zero, and thus the scores correct.

@laggui laggui added bug Something isn't working wgpu Related to WGPU backend labels Aug 19, 2024
@laggui laggui mentioned this issue Aug 19, 2024
1 task
@nathanielsimard
Copy link
Member

This should fix it: tracel-ai/cubecl#81

@laggui
Copy link
Member Author

laggui commented Aug 26, 2024

Just tested, this was fixed when updating to the latest cubecl version to include the fix in #2181

@laggui laggui closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wgpu Related to WGPU backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants