await mapAsync slow
Categories
(Core :: Graphics: WebGPU, defect, P3)
Tracking
()
People
(Reporter: 6a224f5ada1867c791, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(1 file)
2.10 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Steps to reproduce:
await readBuffer.mapAsync(GPUMapMode.READ);
(see attached HTML file)
Actual results:
Took 100ms for 3 floats.
Expected results:
Should take <1 ms (CuPy takes 0.02 ms)
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•8 months ago
|
||
+1 this is a blocker for using webgpu for compute on firefox. Unfortunately google dawn has other bugs that prevent using it as well, so if this issue is fixed, at least something would work :)
Comment 2•8 months ago
|
||
This issue also happens on macOS M1 arm64 computers, with a large slowdown using Firefox compared to Chrome and wgpu
directly on native.
100ms is from https://searchfox.org/mozilla-central/source/dom/webgpu/ipc/WebGPUParent.cpp#37, currently firefox polls GPU devices only every 100ms, So I think this is duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1870699
Comment 4•8 months ago
|
||
That sounds like it is the problem. This ticket has the test example from the OP, so maybe good to link to it in that issue? I'm not sure what the protocol is here on bugzilla. Thanks!
How long would reading a buffer take if this was fixed as described in https://bugzilla.mozilla.org/show_bug.cgi?id=1870699 ? I am asking because it will decide whether a future project I am planning is tractable or not.
Comment 6•7 months ago
|
||
@John I don't have the answer to this but in our testing on Chrome it ran as fast as native, so in principle it should be possible to have a fully functional implementation, and hopefully that is the goal here.
Comment 7•7 months ago
|
||
This is definitely a symptom of bug 1870699.
John:
How long would reading a buffer take if this was fixed as described in https://bugzilla.mozilla.org/show_bug.cgi?id=1870699 ? I am asking because it will decide whether a future project I am planning is tractable or not.
Exact timings are difficult to give you, but I would expect something on par with what WGPU native offers. I don't know if closing bug 1870699 will reach that, but we are open to follow-up work to address remaining performance gaps after that.
Description
•