[all-commits] [llvm/llvm-project] 7d4160: [AMDGPU] Stop rounding up LDS block size for gfx95...
Frederik Harwath via All-commits
all-commits at lists.llvm.org
Tue Jul 28 07:16:29 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7d4160e52ba0e06d1450fa8e9c31518c0e58895c
https://github.com/llvm/llvm-project/commit/7d4160e52ba0e06d1450fa8e9c31518c0e58895c
Author: Frederik Harwath <frederik.harwath at amd.com>
Date: 2026-07-28 (Tue, 28 Jul 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
M llvm/test/CodeGen/AMDGPU/extra-lds-size.ll
M llvm/test/CodeGen/AMDGPU/lds-size-hsa-gfx950.ll
M llvm/test/CodeGen/AMDGPU/pal-metadata-3.0.gfx950.ll
Log Message:
-----------
[AMDGPU] Stop rounding up LDS block size for gfx950 (#208046)
The AMDGPUAsmPrinter::getSIProgramInfo function calculates the number of
LDS blocks in a somewhat indirect way: It obtains the LDS granularity
from another function, determines an "LDSAlignShift" based on this and
then uses shifts to determine the alignment and for division. The use of
shifts forces the alignment to be a power of two which works for all LDS
granularity values except for the value of 1280 bytes used for gfx950.
For this, the function uses LDSAlignShift = 11 which means that the
block size gets rounded up to 2048. This implies that the computed
number of LDS blocks is too small.
Remove the use of LDSAlignShift from getSIProgramInfo and use the LDS
granularity directly for alignment and division.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list