[llvm] [AMDGPU] Warn if 'amdgpu-waves-per-eu' target occupancy was not met (PR #74055)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 05:56:50 PST 2023


================
@@ -939,6 +939,17 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
   ProgInfo.Occupancy = STM.computeOccupancy(MF.getFunction(), ProgInfo.LDSSize,
                                             ProgInfo.NumSGPRsForWavesPerEU,
                                             ProgInfo.NumVGPRsForWavesPerEU);
+  const auto [MinWEU, MaxWEU] =
+      AMDGPU::getIntegerPairAttribute(F, "amdgpu-waves-per-eu", {0, 0}, true);
+  if (ProgInfo.Occupancy < MinWEU) {
----------------
arsenm wrote:

Can you check how many times this fires in the test suite? I know we routinely clamp the lower bound (but also don't actually do anything with it)

Also, isn't there already a wrapped query for the attribute?

https://github.com/llvm/llvm-project/pull/74055


More information about the llvm-commits mailing list