Warning if cbar synchronizes across workgroups#42
Open
natgavrilenko wants to merge 1 commit intoKhronosGroup:mainfrom
Open
Warning if cbar synchronizes across workgroups#42natgavrilenko wants to merge 1 commit intoKhronosGroup:mainfrom
natgavrilenko wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
jeffbolznv
reviewed
Jul 17, 2025
| o << " no ("; sequenceInSuffix(o, 0, instnum+1, true, ") & X.swg"); | ||
| firstInstInWG = instnum+1; | ||
| } | ||
| workgroupnum++; |
Contributor
There was a problem hiding this comment.
Should also increment this for "NEWQF"
Contributor
Author
There was a problem hiding this comment.
As far as I can tell from the existing tests, NEWQF is always followed by NEWWG, so incrementing the counter for both would cause it to increment twice. Also, the threadnum counter is only incremented for NEWTHREAD.
But both versions should work, since the exact workgroup ID doesn’t really matter, as long as all threads in the same workgroup get the same workgroup ID.
| NEWWG | ||
| NEWSG | ||
| NEWTHREAD | ||
| st.av.scopedev.sc0 x = 1 |
Contributor
There was a problem hiding this comment.
IMO we should try to keep the original scopes, but replace cbar with atomics to synchronize across workgroups.
Print a warning if control barriers with the same instance id are used across different workgroups. Update existing tests with such barriers to use acquire-release memory accesses instead. Signed-off-by: Natalia Gavrilenko <natalia.gavrilenko@huawei.com>
e8b4f20 to
cdc98c9
Compare
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.
Print a warning if control barriers with the same instance id are used across different workgroups. Update existing tests with such barriers to use a smaller scope.