Live data from Hacker News

WebGPU is now available on Android

developer.chrome.com

31–40 of 75 posts

Re: WebGPU is now available on Android

#31
post #23

> Timestamp queries allow WebGPU applications to measure precisely (down to the nanosecond) how much time their GPU commands take to execute compute and render passes > ... > Due to timing attack concerns, timestamp queries are quantized with a resolution of 100 microseconds, which provides a good compromise between precision and security. I don't have a particular need of nanosecond granularity timestamps for WebGPU…

The former is a spec detail (the result is returned in ns) and the latter is an implementation detail (browsers currently quantize the result to 100us). That is a useful distinction since you can use WebGPU outside of the browser by embedding Dawn or wgpu into your own application, and there you should get the maximum resolution the spec allows for. Environments like Electron might also opt-out of that timing attack…

Yes indeed they mention how to opt out of quantization directly in Chrome if you'd like (at your own risk) using the Devtools.

Re: WebGPU is now available on Android

#32

Earlier quoted context omitted.

Historically any time an attack surface as big as WebGPU has been exposed, "the worst you can do is crash the tab" has not ever been true. Also note that for an unstable graphics driver, the way you usually crash the system is by touching memory you shouldn't (through the rendering API), which is definitely something that could be exploited by an attacker. It could also corrupt pages that later get flushed to disk an…

WebGL has been around for more than a decade and didn't turn out to be a security issue, other than occasionally crashing tabs. Neither will WebGPU be.

By exposing vulnerable graphics drivers to arbitrary web code, WebGL has allowed websites to take screenshots of your desktop (https://www.mozilla.org/en-US/security/advisories/mfsa2013-8...) and break out of virtual machines (https://blog.talosintelligence.com/nvidia-graphics-driver-vu...), to use two examples I found via a web search.

Re: WebGPU is now available on Android

#33

Well done WebGPU team! Looking forward to the announcement one day that this has landed: https://github.com/gpuweb/gpuweb/issues/4195

Cool, there's consensus between APIs on how to expose "tensor cores" now? Very exciting! Although I think that relaxing memory limitations and providing more visibility and control there is even more important for running ML on the web right now. And harder to make progress on because there isn't a single team that clearly owns "all memory management".

Re: WebGPU is now available on Android

#34
post #7
post #4

Earlier quoted context omitted.

By that time, it might even get supported by Chrome for Linux.

Why is linux supporting taking a while? I figured the underlying graphics subsystem on Android is Vulcan right? Wouldn't that also be the main graphics subsystem on Linux these days?

Testing/Validation and bugfixing. Just having Vulkan isn't enough to enable it by default, everything actually has to work right. Even for Android this is only for specific types of devices. You should be able to force enable it on Linux right now though. It's just not GA quality guaranteed.

Re: WebGPU is now available on Android

#35
post #7

Earlier quoted context omitted.

Why is linux supporting taking a while? I figured the underlying graphics subsystem on Android is Vulcan right? Wouldn't that also be the main graphics subsystem on Linux these days?

Testing/Validation and bugfixing. Just having Vulkan isn't enough to enable it by default, everything actually has to work right. Even for Android this is only for specific types of devices. You should be able to force enable it on Linux right now though. It's just not GA quality guaranteed.

I tried and tried and tried, Chrome 120 will always stick an undocumented Origin Trial for disabling WebGPU.

Re: WebGPU is now available on Android

#36
post #22
post #4

Earlier quoted context omitted.

By that time, it might even get supported by Chrome for Linux.

about:flags in Chromium search for "accel" Disable the blacklist for your GPU.

Doesn't stop disablement done through --origin-trial-disable-feature=WebGPU and I have yet to figure how to drop that without recompiling Chrome.

Re: WebGPU is now available on Android

#37

What’s the actual utility of this for anyone that isn’t trying to replace native code with web pages? Is this ever going to be worth the no doubt massive investment it required?

"trying to replace native code with web pages? " No one wants that. But many like to write their apps only for one plattform - and then still have them run allmost everywhere. The web is the best we have to achieve this. And this will greatly improve the possibilities. Edit: My app will soon finally use no more html elements. It is not a "webpage".

Can you have an electron app without HTML elements? A pure WebGPU + Webassembly program?

Re: WebGPU is now available on Android

#38
post #5

Nice! We just need Linux and iOS. And then we'll have somewhere around 80% support for WebGPU across all devices. I'm getting my numbers https://web3dsurvey.com/webgpu Android: 0.34% Chromium OS: 78.15% iOS: 0.09% Linux: 0.75% Mac OS: 54.43% Windows: 77.96%

I'm pretty sure the numbers on web3dsurvey are skewed. AFAICT only sizes about webgl and webgpu development are surveyed. To get real numbers you need their survey script to run on popular non-techie sites right?

Re: WebGPU is now available on Android

#39
post #9

>devices running Android 12 and greater powered by Qualcomm and ARM GPUs. So... won't work on any exynos, since they have the AMD RDNA3 arch? Do I get that right?

Hi! I'm the Chrome dev that's been working on WebGPU's Android support. As jsheard said the older exynos devices will work because they're Mali-based. The newer RDNA3-based devices aren't enabled by default simply because our team hasn't been able to sufficiently test on them yet. Same goes for Tegra or PowerVR GPUs.

It's entirely a question of spending the time to ensure they're performing as expected (and probably implementing a few workarounds) and not a comment on the quality of the GPUs themselves.

That said, we know that these GPUs are in an increasing number of flagship devices, which makes them a higher priority for official support in future releases.

Re: WebGPU is now available on Android

#40
post #4
post #3

I'm really looking forward to 2034, when WebGPU features will catch up to 2024.

By that time, it might even get supported by Chrome for Linux.

You know we’ll have all moved onto Romulan by then, leaving Vulkan and Metal behind - including WebGPU.

In seriousness though, WebGPU in Chrome with “non-free” Linux GPU drivers should work, no?

Edit: I see it’s still behind a flag

Post reply on HN