[all-commits] [llvm/llvm-project] d2f85d: [OpenMP][Libomptarget] Adding `print_device_info` ...

Shilei Tian via All-commits all-commits at lists.llvm.org
Tue Jul 27 18:48:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2f85d0910ce94cf55793d9cda09beaaa03e881e
      https://github.com/llvm/llvm-project/commit/d2f85d0910ce94cf55793d9cda09beaaa03e881e
  Author: Jose M Monsalve Diaz <jmonsalvediaz at anl.gov>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

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

  Log Message:
  -----------
  [OpenMP][Libomptarget] Adding `print_device_info` to RTL and `omptarget`

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.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106751




More information about the All-commits mailing list