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

Add WebGL fallback #229

Open
peq42 opened this issue Dec 9, 2023 · 6 comments
Open

Add WebGL fallback #229

peq42 opened this issue Dec 9, 2023 · 6 comments

Comments

@peq42
Copy link

peq42 commented Dec 9, 2023

WebGPU is nowhere nearly as widely adopted as webgl 1 and 2. This means that maybe 15% of people out there with internet connection can run the project. I myself am using the latest version of Firefox and I can't run it!

There should be some sort of fallback to webgl when webgpu isn't detected. Otherwise, the project won't be useable for at least a solid 5+ years until webGPU adoption grows enough

@tqchen
Copy link
Contributor

tqchen commented Dec 9, 2023

Unfirtunately WebGL's programming model is limited and cannot enable some fo the optimizations needed, so it likely is infeasible

Good news is that Firefox is also working to land WebGPU https://bugzilla.mozilla.org/show_bug.cgi?id=1841346

@DavidGOrtega
Copy link
Contributor

DavidGOrtega commented Jan 18, 2024

WebGL is not worth at all for simple reasons like culling.
WEBGPU is the way to go and will be greater when we move out the webassembly 4GB cage.

Totally out of topic. @tqchen did you had a chance to review TVM with wgpu?

@peq42
Copy link
Author

peq42 commented Jan 18, 2024

WebGL is not worth at all for simple reasons like culling. WEBGPU is the way to go and will be greater when we move out the webassembly 4GB cage.

Totally out of topic. @tqchen did you had a chance to review TVM with wgpu?

ah yes, nothing like buying a car you can't drive anywhere because the roads dont support it. Makes for a beautiful paper weight.

WebGPU isn't supported by most browsers and wont be supported by most browser versions in the wild for AT LEAST 5+ YEARS if you look at webgl 2 adoption speed

@DavidGOrtega
Copy link
Contributor

WebGPU isn't supported by most browsers

Can you name a few?

Chromium based browsers supports WebGPU right now. To name a few Chrome, Opera, Edge and of course and the most important Electron... When I say supported is that it comes enabled by default not having to enable the flag. Safari and others supports it with the flag.

Everybody is moving from WebGL because of (sight) many issues, only float16, culling... almost every single framework do not support all the operators thats why wasm has succeded, and of course the effort... Its simply not worth at this point.

@peq42
Copy link
Author

peq42 commented Jan 18, 2024

@DavidGOrtega I meant by most browser versions being currently used. As you can see
https://caniuse.com/webgpu
https://www.stetic.com/market-share/browser/

Only about ~30% of chrome users, ~7% Edge, ~1% of opera, 0% firefox and safari can use webGPU currently. And thats based on the statics of that one website, some others point to even LESS. Global adoption is about 26%

Now consider this https://www.khronos.org/blog/webgl-2-achieves-pervasive-support-from-all-major-web-browsers being exactly what I said(took webgl 2 about 5 years to be supported on all browsers, and for most versions being actively used)

@DavidGOrtega
Copy link
Contributor

DavidGOrtega commented Jan 18, 2024

@peq42 stats improves when you watch desktop, for mobile you have to go straight with TVM mobile.

image

And this discussion might be a bit of futile, not because Webgpu is supported or not, Its just because WebGL has so many issues that failed to deliver, its simply not the right tool to do DL in the browser. Thats why many operators are not implemented in many frameworks.
I any case, TVM is open source, you can (and any) of course contribute and enjoy the unpleasant WebGL way (hopefully not) 🙂

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

No branches or pull requests

3 participants