-
Notifications
You must be signed in to change notification settings - Fork 313
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
Bitonic Sort Update 2 #318
Conversation
cmhhelgeson
commented
Nov 2, 2023
- Collapsed Step Index and Total Steps into a single GUI element 'Current Step' to condense space
- Collapsed Grid Width and Grid Height into a single GUI element 'Grid Dimensions' to condense space
- Added a 'Thread Constraint' GUI element that constrains the maximum number of threads per workgroup to less than device.limits.maxComputeWorkgroupSizeX. Depending on the chosen thread constraint, the sort may dispatch more workgroups and/or execute more Global Flip and Disperse operations.
Test Merge
…r dynamic updating of sort speed
…'cell' to 'controller' to accord with Dat.gui's built in types
Merge main into my fork
…zation of swap regions
…mic account of number of swaps performed during a sort
Merge Main
…webgpu-samples into bitonic_sort_branch
…workgroup, which reflects in the execution information as well
@ben-clayton Hoping to get this checked in to if that is also possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the bottom of main.ts
you have:
{
name: './bitonicCompute.frag.wgsl',
contents: NaiveBitonicCompute(64),
},
As you're replacing ${threadsPerWorkgroup}
with 64
in the source view of the sample, this gives the impression that it's always 64, when it is not. This had me scratching my head for ages. I'd strongly recommend showing the real, unprocessed, WGSL source.
…ed portions of code, codeMirror for compute shader now displays the .ts file from which the compute shader is constructed rather than a version of the compute shader that takes an arbitrary number of invocationsPerWorkgroup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes so far. This is helped me understand the code a lot better. I've made a few more terminology suggestions that I think would help.
src/sample/bitonicSort/main.ts
Outdated
for (let i = maxElements; i >= 4; i /= 2) { | ||
totalElementLengths.push(i); | ||
} | ||
|
||
const totalInvocationLengths: number[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe workgroupSizeOptions
?
Please add a comment saying that this is the list of 'Workgroup Size' that the user can select in the UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more accurate to say that it's the options for the size limit, so I changed to sizeLimitOptions.
@ben-clayton Added suggested changes, barring the naming issue with 'Size Limit'. I also rewrote many of the comments for the settings object, and wrote new comments for Step Type explaining the differences of each StepType category. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more suggested changes to name. Nothing major, so approving.
This is much clearer (at least for me) to read. Thank you for all the changes!
PR requires a rebase. |
Is this a note for me or someone else? |
I meant you you, but I'm just getting confused by GitHub's UI. Ignore me. |