[llvm] [Offload] Add olKernelMaxGroupSize (PR #142950)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 05:13:17 PDT 2025


================
@@ -570,6 +570,14 @@ struct AMDGPUKernelTy : public GenericKernelTy {
                    KernelLaunchParamsTy LaunchParams,
                    AsyncInfoWrapperTy &AsyncInfoWrapper) const override;
 
+  /// Return maximum block size for maximum occupancy
+  ///
+  /// TODO: This needs to be implemented for amdgpu
+  Expected<size_t> maxGroupSize(GenericDeviceTy &GenericDevice,
+                                size_t DynamicMemSize) const override {
+    return 1;
+  }
----------------
jhuber6 wrote:

Calculating occupancy is difficult on AMD GPUs, I'd need to dig up the code where HIP does it to see how it's done.

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


More information about the llvm-commits mailing list