[Openmp-commits] [PATCH] D103927: [OpenMP] Add an information flag for device data transfers

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jun 8 14:41:36 PDT 2021


grokos added inline comments.


================
Comment at: openmp/docs/design/Runtimes.rst:92
     * Print OpenMP kernel information from device plugins: ``0x10``
+    * Indicate when data is coppies to and from the device: ``0x20``
 
----------------
coppies --> copied



================
Comment at: openmp/libomptarget/include/Debug.h:55
   OMP_INFOTYPE_PLUGIN_KERNEL = 0x0010,
+  // Print whenever data is transfered to the device
+  OMP_INFOTYPE_DATA_TRANSFER = 0x0020,
----------------
transferred


================
Comment at: openmp/libomptarget/src/device.cpp:428
+         "Copying data from host to device, HstPtr=" DPxMOD ", TgtPtr=" DPxMOD
+         ", Size=%ld, Name=%s\n",
+         DPxPTR(HstPtrBegin), DPxPTR(TgtPtrBegin), Size,
----------------
Better use the `PRId64` macro to print an `int64_t`. `long int` is not always equal to `int64_t` so on some systems this will trigger compilation warnings.

Same for `retrieveData`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103927/new/

https://reviews.llvm.org/D103927



More information about the Openmp-commits mailing list