[llvm] AMDGPU: Propagate amdgpu-max-num-workgroups attribute (PR #113018)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 04:50:51 PDT 2024


================
@@ -179,6 +179,11 @@ class AMDGPUInformationCache : public InformationCache {
     return {ST.getMinFlatWorkGroupSize(), ST.getMaxFlatWorkGroupSize()};
   }
 
+  SmallVector<unsigned> getMaxNumWorkGroups(const Function &F) {
+    const GCNSubtarget &ST = TM.getSubtarget<GCNSubtarget>(F);
----------------
shiltian wrote:

This function might be generic enough to be put somewhere else if needed.

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


More information about the llvm-commits mailing list