JS demo using BigInt calculates different values when using JS vs WebGPU (For Merkle depth 18 and above)
Categories
(Core :: Graphics: WebGPU, task, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
(Blocks 1 open bug, )
Details
Go to https://codesandbox.io/p/github/QEDProtocol/poseidon2-webgpu-demo/master
Let it load
Click on "Run benchmark"
AR: "cpu and gpu returned different merkle roots for the same input leaves!"
ER: Not so. Chrome doesnt show this error
If you check "Disable CPU (For large tree heights" button, then the answer is displayed. Based on this observation, I am putting this under JS, but please reclassify accordingly.
| Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 1•1 year ago
|
||
I suspect this is actually just webgpu not quite being ready, but I'm also going to punt this over to WebGPU for them to look at.
Comment 2•1 year ago
|
||
I get different results for this demo per platform. Will post them as separate messages.
On my M1 MacBook Pro with macOS 15.1.1 (24B91), I encounter no issues.
Comment 3•1 year ago
•
|
||
On my Windows 11 machine, I get a rather different error from the OP, as follows:
Uncaptured WebGPU error: Internal error: FXC D3DCompile error (Unspecified error (0x80004005)): C:\Program Files\Firefox Nightly\Shader@0x00000259C4713000(570,5-55): error X3017: cannot convert from 'const typedef uint2[4]' to 'uint2'
I've filed bug 1939742 to track this.
N.B. that the original link in this issue is no longer accessible, even with a CodeSandbox login. I've instead used the link in upstream at QEDProtocol/poseidon2-webgpu-demo: https://s684hf.csb.app/
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
I can no longer reproduce this issue. Mayank, can you reproduce still?
| Reporter | ||
Comment 5•1 year ago
|
||
Yes, this is WFM now.
| Reporter | ||
Comment 6•1 year ago
•
|
||
Actually, the error still occurs.
STR:
Go to https://s684hf.csb.app/
Unscheck/deselct "Random Leaves"
Set Merkle tree depth to 18
Click on Run benchmark.
AR: Error: cpu and gpu returned different merkle roots for the same input leaves!
ER: Not so.
I tested from level1 to level18.
Level1-Level17: Run fine
L18: Error.
So anything above 17 is bad. Incidentally, for anything above 17, the browser does some momentarily heavy work (memory copy or allocation) that freezes my whole machine. So maybe it is allocating a lot of memory and failing?
| Reporter | ||
Comment 7•1 year ago
•
|
||
There is an additional issue:
Once you repro the STR of comment #6 and get the error, reload the tab by clicking on the reload icon in the browser toolbar.
AR: Crash
https://crash-stats.mozilla.org/report/index/b8c409e6-6406-487b-807f-0a8550250304
https://crash-stats.mozilla.org/report/index/d58e77ee-c9d0-4036-a117-c29ac0250304
Edit: Spun off into bug 1951577
| Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Comment 8•12 hours ago
|
||
this bug is vague and intermittent.
Description
•