[Openmp-commits] [openmp] [OpenMP] Add an INFO message for data transfer of kernel launch env. (PR #74030)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 30 19:12:33 PST 2023


https://github.com/dhruvachak created https://github.com/llvm/llvm-project/pull/74030

None

>From 53c1f521916bfe6bc6cbae7c0c80001909078d07 Mon Sep 17 00:00:00 2001
From: Dhruva Chakrabarti <Dhruva.Chakrabarti at amd.com>
Date: Thu, 30 Nov 2023 20:18:29 -0500
Subject: [PATCH] [OpenMP] Add an INFO message for data transfer of kernel
 launch env.

---
 .../plugins-nextgen/common/src/PluginInterface.cpp          | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
index c580817987a5071..5a3fd140f27a34b 100644
--- a/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
@@ -495,6 +495,12 @@ GenericKernelTy::getKernelLaunchEnvironment(
     AsyncInfoWrapper.freeAllocationAfterSynchronization(*AllocOrErr);
   }
 
+  INFO(OMP_INFOTYPE_DATA_TRANSFER, GenericDevice.getDeviceId(),
+       "Copying data from host to device, HstPtr=" DPxMOD ", TgtPtr=" DPxMOD
+       ", Size=%" PRId64 ", Name=KernelLaunchEnv\n",
+       DPxPTR(&LocalKLE), DPxPTR(*AllocOrErr),
+       sizeof(KernelLaunchEnvironmentTy));
+
   auto Err = GenericDevice.dataSubmit(*AllocOrErr, &LocalKLE,
                                       sizeof(KernelLaunchEnvironmentTy),
                                       AsyncInfoWrapper);



More information about the Openmp-commits mailing list