[Mlir-commits] [llvm] [mlir] [flang][OpenMP] Support `target ... nowait` (PR #111823)

Leandro Lupori llvmlistbot at llvm.org
Fri Oct 11 11:21:56 PDT 2024


================
@@ -6989,9 +6989,14 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(
         getOrCreateSrcLocStr(LocationDescription(Builder), SrcLocStrSize);
     Value *Ident = getOrCreateIdent(SrcLocStr, SrcLocStrSize);
 
-    // @__kmpc_omp_task_alloc
+    // @__kmpc_omp_task_alloc or @__kmpc_omp_target_task_alloc
+    //
+    // If `HasNoWait == true`, we call  @__kmpc_omp_target_task_alloc to provide
+    // the DeviceID to the deferred task.
----------------
luporl wrote:

IIUC, we are also interested in the async behavior of `@__kmpc_omp_target_task_alloc`, that sets the `TASK_UNTIED` flag for this, right? A brief comment about this here could help to understand why `@__kmpc_omp_target_task_alloc` is needed when `HasNoWait == true`.

Interestingly enough, the current implementation of `@__kmpc_omp_target_task_alloc` doesn't even use the DeviceID argument.

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


More information about the Mlir-commits mailing list