Repository navigation
Vectorize mbarrier initialization in warpspeed scan - #8423
Merged
Merged
Conversation
bernhardmgruber
force-pushed
the
ref_scan
branch
from
April 14, 2026 21:57
c074049 to
f640287
Compare
This comment has been minimized.
This comment has been minimized.
bernhardmgruber
force-pushed
the
ref_scan
branch
from
April 15, 2026 07:11
6a7b1f4 to
ae147dd
Compare
bernhardmgruber
force-pushed
the
ref_scan
branch
from
April 15, 2026 07:12
ae147dd to
ada5e2c
Compare
miscco
approved these changes
Apr 15, 2026
miscco
reviewed
Apr 15, 2026
| warpspeed::SmemAllocator smemAllocator{}; | ||
| auto r = allocResources<PolicySelector, InputT, OutputT, AccumT>(syncHandler, smemAllocator, params.numStages); | ||
| syncHandler.clusterInitSync(specialRegisters); | ||
| syncHandler.clusterInitSync<num_total_threads(policy)>(specialRegisters); |
Contributor
There was a problem hiding this comment.
I love that this takes all available threads
miscco
reviewed
Apr 15, 2026
| uint64_t* ptrBar = mPtrBar[ri][pi]; | ||
| int numOwningThreads = mNumOwningThreads[ri][pi]; | ||
| // use block strided iteration to vectorize setup of barriers | ||
| for (int si = sr.threadIdxX; si < numStages; si += NumThreads) |
Contributor
There was a problem hiding this comment.
There are a lot of threads in the warpspeed implementation, why isnt this guarding against invalid access?
Contributor
Author
There was a problem hiding this comment.
si < numStages is the guard here. We have to initialize numStages barriers starting at ptrBar, so each thread with index smaller than numStages enters the loop. In the theoretical case that we have to initialize more than NumThreads barriers, all threads shift by NumThreads after the first loop iteration and then the shifted index (si) is checked again against numStages. I think we are fine.
Contributor
🥳 CI Workflow Results🟩 Finished in 1h 38m: Pass: 100%/269 | Total: 9d 02h | Max: 1h 31m | Hits: 70%/177314See results here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[0] NVIDIA B200
Fixes: #7440