Skip to content

Conversation

@cmhhelgeson
Copy link
Contributor

@cmhhelgeson cmhhelgeson commented Jul 6, 2025

Adds SubgroupFunctionNode for subgroup/warp operations for compatible Threejs backends (currently only WebGPU). Adds an example demonstrating some GPGPU reduction algorithms, including some that make use of subgroup operations, with the potential to add more as time goes on. I'd love to take any suggestions for demonstrating reduction in a more visually appealing way beyond the standard buffer grid approach that's been used in webgpu_compute_sort_bitonic and webgpu_storage_buffer.

image

@cmhhelgeson cmhhelgeson marked this pull request as ready for review July 8, 2025 15:16
@cmhhelgeson cmhhelgeson marked this pull request as draft July 23, 2025 22:33
@cmhhelgeson cmhhelgeson force-pushed the webgpu_compute_reduce branch from e0caebb to 58e25ac Compare July 30, 2025 05:04
@github-actions
Copy link

github-actions bot commented Jul 30, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.9
79.1
338.9
79.1
+0 B
+0 B
WebGPU 570.33
157.5
574.15
158.45
+3.82 kB
+949 B
WebGPU Nodes 568.94
157.26
572.76
158.21
+3.82 kB
+946 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 470.64
113.87
470.64
113.87
+0 B
+0 B
WebGPU 643.16
173.92
645.22
174.51
+2.06 kB
+591 B
WebGPU Nodes 597.34
163.12
599.4
163.71
+2.06 kB
+596 B

@cmhhelgeson cmhhelgeson marked this pull request as ready for review July 30, 2025 05:52
@cmhhelgeson
Copy link
Contributor Author

Converting to draft till #31531 is properly implemented.

@cmhhelgeson cmhhelgeson marked this pull request as draft July 31, 2025 00:03
@cmhhelgeson cmhhelgeson force-pushed the webgpu_compute_reduce branch from d15ca48 to ba5438f Compare August 5, 2025 03:22
@cmhhelgeson cmhhelgeson marked this pull request as ready for review August 11, 2025 01:31
@cmhhelgeson
Copy link
Contributor Author

cmhhelgeson commented Aug 11, 2025

@cmhhelgeson cmhhelgeson changed the title Examples: Add Compute Reduction Example Examples/TSL: Add SubgroupFunctionNode with Compute Reduction Demonstration Aug 11, 2025
@cmhhelgeson
Copy link
Contributor Author

cmhhelgeson commented Aug 11, 2025

@sunag This should be ready to go now. I've updated the title and description to explain that this PR both adds SubgroupFunctionNode and provides a demonstration of subgroup operations within the reduction examples. The current load time for the page is rather slow, so I was wondering if it would be better to only present one data display.

@sunag sunag added this to the r180 milestone Aug 12, 2025
@cmhhelgeson
Copy link
Contributor Author

cmhhelgeson commented Aug 12, 2025

Not sure why DeepScan's been running for 2 hrs (now half the day 👀)

@sunag sunag merged commit 63b4983 into mrdoob:dev Aug 13, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants