[PATCH] D84194: [AMDGPU] Correct the number of SGPR blocks used for GFX9
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 00:59:55 PDT 2020
t-tye added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:348
+ // 16 for GFX9, 8 for GFX6-8
+ return isGFX9(*STI) ? 16 : 8;
}
----------------
scott.linder wrote:
> I don't know if this is actually accurate, I think the reason for the "2 *" in the equation for GFX9 is not because the allocation granule is 16. It is still 8 for gfx9, but there is an additional constraint that you must allocate an even number of granules.
>
> It is a bit confusing, and I would like @kzhuravl to weigh in as IIRC he was who originally helped me understand this when we were updating the assembler.
For GFX9 the granularity is as specified in AMDGPUUsage which is 8. As @scott.linder mentions SPI rounds up to an even number of 8-granules. From the hardware spec:
Number of SGPRS, granularity 8. SPI rounds up reg setting and allocs gran16. Range is from 0-13 allocating (SGPRS/2+1)*16: 16,16,32,32 ... 112,112
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84194/new/
https://reviews.llvm.org/D84194
More information about the llvm-commits
mailing list