Contributors:
Konstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Patch 21/N for upstreaming of AMDGPU gfx11 architecture
Depends on D127143
Paths 
  |  Differential  D127241  
[AMDGPU] gfx11 add bits to COMPUTE_PGM_RSRC3 ClosedPublic Authored by Joe_Nash on Jun 7 2022, 11:39 AM. 
Details 
 Summary Contributors: Patch 21/N for upstreaming of AMDGPU gfx11 architecture Depends on D127143 
Diff Detail 
 Event TimelineComment Actions 
 @kzhuravl Do you know about this? Comment Actions This should include updates to https://llvm.org/docs/AMDGPUUsage.html#kernel-descriptor if not planned for a different patch. Comment Actions 
 GFX10 is only using COMPUTE_PGM_RSRC3_GFX10_PLUS.SHARED_VGPR_COUNT, the rest of the bits for GFX10 are reserved and must be 0. GFX11 is using COMPUTE_PGM_RSRC3_GFX10_PLUS.INST_PREF_SIZE and others. This is similar to how we do other compute program resource registers. E.g.: ... COMPUTE_PGM_RSRC1(BULKY, 24, 1), COMPUTE_PGM_RSRC1(CDBG_USER, 25, 1), COMPUTE_PGM_RSRC1(FP16_OVFL, 26, 1), // GFX9+ COMPUTE_PGM_RSRC1(RESERVED0, 27, 2), COMPUTE_PGM_RSRC1(WGP_MODE, 29, 1), // GFX10+ COMPUTE_PGM_RSRC1(MEM_ORDERED, 30, 1), // GFX10+ COMPUTE_PGM_RSRC1(FWD_PROGRESS, 31, 1), // GFX10+ ... The reason we have 2 different compute program resource register 3 is because GFX90A and GFX10 have completely different layout for those. So I think this header file should be fine. Can you add documentation to AMDGPUUsage in this patch as well? Thanks Comment Actions 
 Once assembler support gets added for this, we will have to make sure directives for GFX11 only fields do not work on other generations. Comment Actions 
 That's in D127402 which is in review right now. Comment Actions 
 Thanks, just saw it. This revision is now accepted and ready to land.Jun 9 2022, 7:54 AM This revision was landed with ongoing or failed builds.Jun 10 2022, 10:35 AM Closed by commit rGea3c9a87d344: [AMDGPU] gfx11 add bits to COMPUTE_PGM_RSRC3 (authored by Joe_Nash).  ·  Explain Why This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
 
Diff 435966 llvm/include/llvm/Support/AMDHSAKernelDescriptor.h
 llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
 
 llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
 llvm/test/MC/AMDGPU/hsa-gfx11-v3.s
 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||