Skip to content

[Comgr] Assert hotswap RSRC1 field layout assumptions#3072

Open
lamb-j wants to merge 1 commit into
amd-stagingfrom
comgr/hotswap-rsrc1-layout-assert
Open

[Comgr] Assert hotswap RSRC1 field layout assumptions#3072
lamb-j wants to merge 1 commit into
amd-stagingfrom
comgr/hotswap-rsrc1-layout-assert

Conversation

@lamb-j

@lamb-j lamb-j commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

The hotswap ELF code reads/writes the GRANULATED VGPR and SGPR count fields of COMPUTE_PGM_RSRC1 at fixed shifts/widths. Add static_asserts pinning those layout assumptions so any change is caught at compile time rather than producing incorrect rewrites.

The hotswap ELF code reads/writes the GRANULATED VGPR and SGPR count
fields of COMPUTE_PGM_RSRC1 at fixed shifts/widths. Add static_asserts
pinning those layout assumptions so any change is caught at compile time.
@lamb-j lamb-j requested a review from chinmaydd as a code owner June 25, 2026 22:01
@lamb-j lamb-j requested a review from kzhuravl June 25, 2026 22:02
@chinmaydd chinmaydd added the comgr Related to Code Object Manager label Jun 25, 2026
@chinmaydd

Copy link
Copy Markdown

I suppose I understand the reason for this PR, but do we not want a safer fallback thats more than just asserts ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comgr Related to Code Object Manager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants