[llvm] [AMDGPU] Max. WG size-induced occupancy limits max. waves/EU (PR #137807)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 06:26:32 PDT 2025


================
@@ -255,6 +256,14 @@ class AMDGPUInformationCache : public InformationCache {
     return Status;
   }
 
+  /// Returns the minimum amount of LDS space used by a workgroup running
+  /// function \p F.
+  static unsigned getLDSSize(const Function &F) {
+    return AMDGPU::getIntegerPairAttribute(F, "amdgpu-lds-size",
+                                           {0, UINT32_MAX}, true)
+        .first;
----------------
arsenm wrote:

This won't be set for non-entry kernels (we should probably enforce this in the verifier). Does this work correctly in the function case without this by assuming the maximum? 

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


More information about the llvm-commits mailing list