[Openmp-commits] [PATCH] D106751: [OpenMP][Libomptarget] Adding `print_device_info` to RTL and `omptarget`

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 25 09:19:44 PDT 2021


jdoerfert added a comment.

I'm fine with getting this in first and cleaning it up more in-tree. Makes a nice addition to 13, useful for people. @jhuber6 should probably be exposed via a _INFO flag too.

@tianshilei1992 @JonChesterfield any objections?



================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:1339
+
+void __tgt_rtl_print_device_info(int32_t device_id) {
+  assert(DeviceRTL.isValidDeviceId(device_id) && "device_id is invalid");
----------------
josemonsalve2 wrote:
> JonChesterfield wrote:
> > Verbose. Can probably format as a table containing the cuda API call, the text to print, possibly the corresponding HSA API call, then iterate over that table printing / building json etc 
> I believe this is a good idea. Let me think about how to adopt it. 
I agree but I think this can be done later, together with some other improvements, e.g., what output stream to use.


================
Comment at: openmp/libomptarget/src/device.h:255
 
+  bool printDeviceInfo(int32_t RTLDevID);
+
----------------
brief doxygen comment  please


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106751



More information about the Openmp-commits mailing list