diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2022-12-20 16:02:07 -0600 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2022-12-25 21:24:30 -0600 |
commit | d5a5ee856e7ccd442ad22168c56ff77197255cbe (patch) | |
tree | 4806dda5f0a2afc44e89645be87b4c13aef9960e /llvm/tools/llvm-ifs/llvm-ifs.cpp | |
parent | 54752f3ff6d50944f17c260a6dc47a4758a026fc (diff) | |
download | llvm-d5a5ee856e7ccd442ad22168c56ff77197255cbe.zip llvm-d5a5ee856e7ccd442ad22168c56ff77197255cbe.tar.gz llvm-d5a5ee856e7ccd442ad22168c56ff77197255cbe.tar.bz2 |
[Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs
We already have a tool called `amdgpu-arch` which returns the GPUs on
the system. This is used to determine the default architecture when
doing offloading. This patch introduces a similar tool `nvptx-arch`.
Right now we use the detected GPU at compile time. This is unhelpful
when building on a login node and moving execution to a compute node for
example. This will allow us to better choose a default architecture when
targeting NVPTX. Also we can probably use this with CMake's `native`
setting for CUDA now.
CUDA since 11.6 provides `__nvcc_device_query` which has a similar
function but it is probably better to define this locally if we want to
depend on it in clang.
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D140433
Diffstat (limited to 'llvm/tools/llvm-ifs/llvm-ifs.cpp')
0 files changed, 0 insertions, 0 deletions