Web AI Model Testing: WebGPU, WebGL, and Headless Chrome
developer.chrome.com
developer.chrome.com
For Burn project, we have WebGPU example and I was looking into how we could add automated tests in the browser. Now it seems possible.
Here is the image classification example if you'd like to check out:
https://github.com/tracel-ai/burn/tree/main/examples/image-c...
https://www.destroyallsoftware.com/talks/the-birth-and-death...
games?
3D?
Editing?
have you tried forking chrome and increasing this limit?
For data exploration tools it's very easy to want to use 4GB+ of memory. I found the limit cumbersome while working on financial tools. It usually comes up in internal tools where you reliably have a fast internet connection; it's harder to reach the limit for public-facing tools because there the slowness of sending 4GB+ to the browser is the more limiting factor.
The annoying part isn't just that the limit is there, but that you can't really handle it gracefully as the developer -- when the browser decides you've hit the limit, it may just replace the page with an error message.
Things get really big really quick, especially when you're storing uncompressed versions of raster elements in memory. To frame things in a different way, 4GB is 22 seconds of 1080p video if you're loading the raw frames into memory.
A lot of raw ore is processed to get those 200 grams in your hand.
That said, a quick search tells me the carbon footprint of producing a phone is around 55kg, which is about 320km of car travel; it's not trivial, but it's not as much of a bottleneck I thought it might be.
Like, I don't know your life, maybe you go to your family or important business meetings or something with these flights, but in any case none of this is going to be "fuck all" if we want to have any chance to stay under the +1.5°C (or even +2°C) bar.
> Currently allocating more than ~300MB of memory is not reliable on Chrome on Android without resorting to Chrome-specific workarounds, nor in Safari on iOS.
That's about allocating CPU memory but the GPU memory situation is similar. The specs don't want to reveal information about how much memory you're allowed to use because it could be used for fingerprinting, but that means that it's practically impossible to build reliable applications which use (or can optionally use) a lot of memory. Every allocation you make past a few hundred MB risks blowing up the app immediately, or putting it into the danger zone where it's the first in line to get killed when running in the background, either way without any warning or last-chance opportunity to release memory to avert getting killed.
https://www.w3.org/2020/06/machine-learning-workshop/talks/o...
But yes, I am all for better support on all the things too, we have many WASM users too, and when anything new comes out there, this set of instructions can still be used to leverage testing that too as its just Chrome running on Linux essentially with the right flags set.