-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Examples: Prefix Sum Compute Example #29940
base: dev
Are you sure you want to change the base?
Conversation
b1c7c62
to
7112f50
Compare
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
I think there's an issue with how performance is being measured. Using the renderer.info method used in the bitonic sort and storage buffer examples, it doesn't seem as if the performance is changing at all based on the selected compute shader. Is there perhaps a way to use the timestamp queries within WebGPU to more accurately measure performance, or is compute.info already using that functionality. Additionally, I'm not sure if there's a way to revert my commit to specifically ignore the build files that were erroneously pushed in. |
/ping @RenaudRohlinger |
Thanks for this super useful example! It helped me identify a very tricky issue with timestamp queries. I’ve submitted a PR (#29970) that should resolve the issues you encountered. I tested it using your example, and the logs now appear accurate, providing both render and compute timestamp information as expected. PS: When using timestamp queries, please ensure you refer to |
7112f50
to
783220d
Compare
@cmhhelgeson Could you remove test file, console.log() and revert the builds files? |
What would be the best way to quickly revert only the build files? |
Related issue: #XXXX
Description
Creates an example demonstrating various prefix sum algorithms written using the TSL node system. Also measures the performance of the algorithms against each other. Ideally, this is an expanding example where different versions and increasingly performant versions of the prefix sum can be added over time, in a syntax that is hopefully much more familiar and accessible to Javascript programmers than equivalent examples in CUDA or other GPGPU languages.
As demonstrated in this visualization, validated elements of a prefix sum are highlighted in green, while incorrect elements are highlighted in red. The image below demonstrates a correct implementation of a Sklansky prefix sum against the reverse of the expected elements (i.e maxElements to 1 instead of 1 to maxElements).
Currently, I'd like to implement a few more algorithms before this is pulled in.