6 ms·
You probably won't get this performance when webgpu is finalized. It has to add bounds and sanity checks. It's unclear how much worse the perf will be.
by nynx 6y ago
You probably won't get this performance when webgpu is finalized. It has to add bounds and sanity checks. It's unclear how much worse the perf will be.
- brrrrrm 6y agothis is a good point, and I'm quite curious what the hit will be. Safari makes it substantially easier to enable WebGPU than Chrome does (requiring a canary version and flags), which leads me to believe there's already some security mechanisms in place. But, time will tell!
- captainbland 6y agoI tried it with Chrome Canary with the relevant flag but unfortunately it didn't seem to work with this particular site failing with "TypeError: Failed to execute 'createBindGroupLayout' on 'GPUDevice': required member entries is undefined.". Shame as I wanted to see what happened if I pitted my desktop against it. Of course it's likely the WebGPU implementations between browsers are not equivalent from a performance point of view.
- brrrrrm 6y agoUnfortunately the browsers haven't quite settled on a standard, so the code posted only works in Safari. More context here: https://news.ycombinator.com/item?id=22022962 https://news.ycombinator.com/item?id=22022962
- rubatuga 6y agoIt's pretty clear that SPIR-V should be chosen.
- pjmlp 6y agoWGSL has been chosen as of 2021, nothing more to discuss. https://gpuweb.github.io/gpuweb/wgsl.html https://gpuweb.github.io/gpuweb/wgsl.html
- littlestymaar 6y agoYou may want to read this summary of the arguments pro and con SPIR-V, made by Kvark a gfx engineer at Mozilla, so you have a more balanced view of the topic : The summary exists in two variants: a graphic summary[1] and a textual one[2]. [1] https://kvark.github.io/webgpu-debate/SPIR-V.component.html https://kvark.github.io/webgpu-debate/SPIR-V.component.html [2] https://kvark.github.io/webgpu-debate/SPIR-V.html https://kvark.github.io/webgpu-debate/SPIR-V.html
- rovr138 6y agoThey would show real usage performance though. Still valuable.
- littlestymaar 6y ago> I tried it with Chrome Canary with the relevant flag but unfortunately it didn't seem to work with this particular site failing with "TypeError: Failed to execute 'createBindGroupLayout' on 'GPUDevice': required member entries is undefined.". Firefox also raises the same error. It looks like Safari implements a former version of the WebGPU draft[1] where Chrome and Firefox implement a more recent one. [1] :https://gpuweb.github.io/gpuweb/#dictdef-gpubindgrouplayoutentry https://gpuweb.github.io/gpuweb/#dictdef-gpubindgrouplayoute...
- joe91 6y agoAssuming the M1 GPU works like most modern GPUs then bounds checking is already built into every memory operation. Memory operations in modern GPUs basically evolved from fetching textures (which intrinsically have bounds checking built in, they have a width and height). All modern desktop GPUs (and probably mobile GPUs these days) use "descriptors" for textures and buffers which specify both address and size. Out of range fetches from a buffer return 0 and out of range writes are no operations. There have been some GPUs in the past that could literally write to any address in main memory (famously the GPU in the XBox360 could do this), but its not true of any modern GPU as far as I know. On a different note, 900 GFlops from a GPU is not really that impressive. Desktop GPUs reached this kind of performance nearly 10 years ago, but I guess its not bad for a first generation new design.
- thitcanh 6y agoI guess it's not bad for a fanless 10-watt SoC the size of a stamp on an entry-level portable computer in a browser. To get that kind of performance nearly 10 years ago in a desktop GPU, I bet you would need a whole lot of dollars, watts, and cube inches. It is impressive unless you compare apples to oranges. Plus, on bare metal it reaches 2.6 TFLOPs already.
- ChuckNorris89 6y ago>entry-level portable computer Not all computers are Macs and at €1000 starting price, it's the entry level Mac but by no means an entry level computer. Entry level computers are in the €400 ballpark (i5/4500U, 8GB RAM, 256 SSD). For €1000 you could get a pretty strong gaming computer which is by no means entry level.
- jbjbjbjb 6y agoEntry level m1 is a quite a bit cheaper than that in euros.
- ChuckNorris89 6y ago