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

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 25 09:45:08 PDT 2021


tianshilei1992 added a comment.

In D106751#2903124 <https://reviews.llvm.org/D106751#2903124>, @jdoerfert wrote:

> 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?

Sounds good. Improvements can be done later but the code structure is better to be settled down at the moment.



================
Comment at: openmp/libomptarget/include/omptarget.h:336
 
+bool __tgt_print_device_info(int64_t device_id);
 #ifdef __cplusplus
----------------
Better to use `int` as return type as it is C function.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:19
 #include <mutex>
+#include <string.h>
 #include <string>
----------------
Why do we need C header?


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