[Mlir-commits] [llvm] [mlir] [OMPIRBuilder] - Make offloading input data persist for deferred target tasks (PR #133499)
Sergio Afonso
llvmlistbot at llvm.org
Thu May 8 05:50:53 PDT 2025
================
@@ -7051,9 +7051,25 @@ static Expected<Function *> createOutlinedFunction(
/// void @.omp_target_task_proxy_func(i32 %thread.id, ptr %task)
/// This function is called from emitTargetTask once the
/// code to launch the target kernel has been outlined already.
-static Function *emitTargetTaskProxyFunction(OpenMPIRBuilder &OMPBuilder,
- IRBuilderBase &Builder,
- CallInst *StaleCI) {
+static Function *emitTargetTaskProxyFunction(
+ OpenMPIRBuilder &OMPBuilder, IRBuilderBase &Builder, CallInst *StaleCI,
+ StructType *PrivatesTy, StructType *TaskWithPrivatesTy,
+ const size_t NumOffloadingArrays, const int SharedArgsOperandNo) {
+
+ // NumOffloadingArrays is the number of offloading arrays that we need to copy
+ // into the task structure so that the deferred target task can access this
+ // data even after the stack frame of the generating task has been rolled
+ // back. Offloading arrays contain base pointers, pointers, sizes etc
+ // of the data that the target kernel will access. In other words, the
+ // arrays of pointers held by OpenMPIRBuilder::TargetDataRTArgs
----------------
skatrak wrote:
Nit: This sentence appears to be incomplete, if I'm reading it right.
https://github.com/llvm/llvm-project/pull/133499
More information about the Mlir-commits
mailing list