[PATCH] D140433: [Clang] Add `nvptx-arch` tool to query installed NVIDIA GPUs

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 21 07:49:41 PST 2022


jhuber6 added inline comments.


================
Comment at: clang/tools/nvptx-arch/NVPTXArch.cpp:63
+
+    printf("sm_%d%d\n", Major, Minor);
+  }
----------------
tianshilei1992 wrote:
> Do we want to include device number here?
For `amdgpu-arch` and here we just have it implicitly in the order, so the n-th line is the n-th device, i.e.
```
sm_70 // device 0
sm_80 // device 1
sm_70 // device 2
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140433



More information about the cfe-commits mailing list