[Openmp-commits] [openmp] [Libomptarget] Handle dynamic stack sizes for AMD COV5 (PR #72606)

Jon Chesterfield via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 20 06:36:56 PST 2023


================
@@ -658,7 +664,8 @@ struct AMDGPUQueueTy {
     Packet->grid_size_x = NumBlocks * NumThreads;
     Packet->grid_size_y = 1;
     Packet->grid_size_z = 1;
-    Packet->private_segment_size = Kernel.getPrivateSize();
+    Packet->private_segment_size =
+        Kernel.usesDynamicStack() ? Kernel.getPrivateSize() : StackSize;
----------------
JonChesterfield wrote:

I don't understand the control flow here.

Before, we called getPrivateSize() which retrieved N from somewhere, presumably kernel metadata.

Now, we only do that if useDynamicStack is true, otherwise it's taken from a new argument.

Condition the wrong way around?

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


More information about the Openmp-commits mailing list