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

Jose Manuel Monsalve Diaz via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Jul 24 10:58:25 PDT 2021


josemonsalve2 created this revision.
josemonsalve2 added reviewers: jdoerfert, JonChesterfield, ggeorgakoudis, jhuber6, baziotis, sstefan1, uenoku, tianshilei1992.
Herald added subscribers: guansong, yaxunl.
josemonsalve2 requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

This patch introduces a function in the device's plugin to print the
device information. This patch relates to another patch that introduces
a CLI tool to obtain the device information from the omplibrary directly.
It is inspired by PGI's pgaccelinfo.

The modifications are as follows:

1. Introduce the optional `void __tgt_rtl_print_device_info(RTLdevID)` function into the RTL.
2. Introduce the `bool __tgt_print_device_info(devID)` function into `omptarget` interface. Returns false if the RTL is not implemented
3. Added `bool printDeviceInfo(RTLDevID)` to the `DeviceTy`
4. Implement the `__tgt_rtl_print_device_info` for CUDA. Added additional CUDA Runtime calls.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106751

Files:
  openmp/libomptarget/include/omptarget.h
  openmp/libomptarget/include/omptargetplugin.h
  openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
  openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
  openmp/libomptarget/plugins/cuda/src/rtl.cpp
  openmp/libomptarget/plugins/exports
  openmp/libomptarget/src/device.cpp
  openmp/libomptarget/src/device.h
  openmp/libomptarget/src/exports
  openmp/libomptarget/src/interface.cpp
  openmp/libomptarget/src/rtl.cpp
  openmp/libomptarget/src/rtl.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106751.361470.patch
Type: text/x-patch
Size: 15283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210724/997843df/attachment.bin>


More information about the Openmp-commits mailing list