Repository navigation
feat(rocdbgapi): introduce clusters of workgroups (alternative) - #10241
Merged
Merged
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
lumachad
force-pushed
the
users/aktemur/cluster-111
branch
from
August 20, 2026 11:47
978e21a to
cb81692
Compare
lancesix
reviewed
Sep 16, 2026
aktemur
force-pushed
the
users/aktemur/cluster-111
branch
from
September 21, 2026 12:54
ff2a049 to
7c8fbf5
Compare
Contributor
Author
|
The force-push above is a rebase. |
aktemur
force-pushed
the
users/aktemur/cluster-111
branch
from
September 22, 2026 10:02
7c8fbf5 to
0bd0824
Compare
Contributor
Author
|
The force-push above updated the branch for the next review round. |
lancesix
reviewed
Sep 23, 2026
aktemur
force-pushed
the
users/aktemur/cluster-111
branch
from
September 23, 2026 16:49
0bd0824 to
d4b4c31
Compare
Contributor
Author
|
The force-push above is a rebase. As part of that, the PR now bumps the version to 0.82. |
aktemur
force-pushed
the
users/aktemur/cluster-111
branch
from
September 23, 2026 17:08
d4b4c31 to
705a012
Compare
lancesix
approved these changes
Sep 23, 2026
lancesix
left a comment
Contributor
There was a problem hiding this comment.
With latest changes, things look good to me, thanks.
Be sure to retest on the final target before merging.
In two places, we get a workgroup's ids by calling `group_ids ()`, which returns an optional tuple, and if the optional is non-empty, we call `group_ids ()` again. Avoid the duplicated call.
A workgroup is alive as long as it has a wave. Set the epoch mark unconditionally, whenever the mark of any wave of the workgroup is being set. In practice, this should not change the epoch value of a workgroup. This change is a refactoring to obtain clearer and simpler code.
aktemur
force-pushed
the
users/aktemur/cluster-111
branch
from
September 24, 2026 15:11
705a012 to
939673f
Compare
Starting with gfx12-5, workgroups may belong to clusters. Add methods to read cluster ids from a CWSR record. The cluster and group ids are read from TTMP registers. The meaning of the registers depend on whether the wave is in cluster mode. If not in a cluster, group ids are obtained from TTMP7 and TTMP9 as in previous gfx12 architecture. If in a cluster, what we read from TTMP7 and TTMP9 are cluster ids. The group ids in this case are read from TTMP6. To figure out if the wave is in cluster mode, we keep track of the "first_of_cluster" and "last_of_cluster" bits in the compute relaunch wave register. All CWSR records created for waves between the first and the last of cluster (inclusive) are marked to be in a cluster. If a wave/workgroup is not in cluster mode, we nevertheless conceptually consider the workgroup to belong to a single-workgroup cluster and return cluster ids and sizes accordingly. Bug: AIROCGDB-77
Add a first definition for clusters, which are groups of workgroups. Bug: AIROCGDB-77
Starting with gfx12-5, workgroups may be grouped into clusters. When creating workgroups, take this into account. Note that a dispatch is not necessarily set in cluster mode. We nevertheless create a single-workgroup cluster even in that case, so that conceptually a workgroup is always in a cluster. This patch adds clusters into the wave -> workgroup -> cluster -> dispatch hierarchy. API queries are added in the next patch. Bug: AIROCGDB-77
aktemur
force-pushed
the
users/aktemur/cluster-111
branch
from
September 24, 2026 16:28
939673f to
2e780e1
Compare
Define new enums in the API to query the cluster coordinate of a wave and a workgroup, and other cluster-related information. Bug: AIROCGDB-77
Add API queries to obtain cluster support, mode, and sizes. Clusters are supported at the architecture level. Clusters are enabled/disabled and their size information is available at the dispatch level. Regarding cluster sizes, to be in consistence with the existing queries that return workgroup sizes and grid sizes (i.e. AMD_DBGAPI_DISPATCH_INFO_WORKGROUP_SIZES and AMD_DBGAPI_DISPATCH_INFO_GRID_SIZES), the new query (i.e. AMD_DBGAPI_DISPATCH_INFO_CLUSTER_SIZES) returns the sizes in units of work-items. Bug: AIROCGDB-77
…uster Add a workgroup query and a wave query to get the workgroup coordinates within the cluster the workgroup belongs to.
Contributor
Author
|
In - nwg[0] = utils::bit_extract (ttmp6, 12, 15);
- nwg[1] = utils::bit_extract (ttmp6, 16, 19);
- nwg[2] = utils::bit_extract (ttmp6, 20, 23);
+ nwg[0] = utils::bit_extract (ttmp6, 12, 15) + 1;
+ nwg[1] = utils::bit_extract (ttmp6, 16, 19) + 1;
+ nwg[2] = utils::bit_extract (ttmp6, 20, 23) + 1; |
aktemur
force-pushed
the
users/aktemur/cluster-111
branch
from
September 29, 2026 12:40
2e780e1 to
b8b2cd8
Compare
Contributor
Author
|
I noticed I forgot the update the version in CMakeLists.txt. The last update makes this change: + project(amd-dbgapi VERSION 0.81.0 LANGUAGES CXX DESCRIPTION "ROCm Debugger API")
- project(amd-dbgapi VERSION 0.82.0 LANGUAGES CXX DESCRIPTION "ROCm Debugger API") |
Contributor
Author
|
Tested on gfx1250. I'll merge when the CI run finishes. |
Contributor
TheRock Submodule Bump ActivityNewest first
|
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.
This is the same as PR #7992, except that it implements the "there is always a cluster" model.