-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect result for radix sort #1
Comments
There's a known issue with Mac backends. |
Thanks for the fast reply. |
Is there a WebGPU implementation of a multi-pass prefix-sum algorithm publicly available somewhere? |
I check-in a "prefix_sum_m.js" which is multi-pass prefix-sum. Need some more work to use it for radix sort. |
Thanks a lot!
…On Tue, Nov 7, 2023 at 18:16 Fei Yang ***@***.***> wrote:
I check-in a "prefix_sum_m.js" which is multi-pass prefix-sum. Need some
more work to use it for radix sort.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEY4VLJYSMV6GWUTKHLZHU3YDH37NAVCNFSM6AAAAAA67NGYKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJYGEYDCMRVGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I've just uploaded radix_sort_m.js. |
Thank you! |
I just did some performance tests using
Is this to be expected? |
Thanks for sharing your result! Also be careful of your way of timing GPU.. Context initialization time can be quite significant:
GPU -> CPU data transfer is known to have long latency:
Also the allocations and CPU -> GPU data transfer. In real applications, we may only need to allocate once. |
I just took a quick look.. It seems timing in WebGPU is tricky. However, I believe things like "await buf_download.mapAsync(GPUMapMode.READ);" do have an implicit syncing effect. |
Ah there is: |
Ah, I see, I'm stupid! :D |
Here are the timings:
So the remaining CPU -> GPU overhead is about 7 ms! |
Thanks! I see. |
I will try to understand a bit more of your implementation and will then incorporate it into my code. |
FYI, I ported the CUDA sample "smokeParticles" to WebGPU: https://github.com/fynv/websmoke The actual sorting code is slightly modified to adapt to the applicaion: |
Try disabling the browser extension "webgpu-devtools"? The error seems to happen at that side. |
Looks really nice! |
@fynv
When I run this in Chrome 119 (MacOS 14.1), I get the output shown below. Can this be fixed?
The text was updated successfully, but these errors were encountered: