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

fix: getUseWebGPU function that fallbacks to cpu when no gpu adapter is available #129

Closed
wants to merge 3 commits into from

Conversation

Cauen
Copy link

@Cauen Cauen commented Jul 19, 2024

The documentation hints at a GPU-to-CPU fallback, but doesn't make it explicit

Reading the code you can understand that there is a check about the existence of "navigator.gpu" but this check does not catch cases where there is no adapter available. In these cases, a runtime error occurs within the onnxruntime-web lib.

This PR also aims to check the existence of an adapter and make this behavior explicit in the documentation

Renamed function to fit naming conventions
@DanielHauschildt
Copy link
Contributor

Thanks for the PR. I integrated the fix into the capability detection

#131

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