[PATCH] D99949: [AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 14 14:07:34 PDT 2021


JonChesterfield added a comment.

In D99949#2689583 <https://reviews.llvm.org/D99949#2689583>, @gregrodgers wrote:

> Dependence on hsa is not necessary.  The amdgpu and nvidia drivers both use PCI codes available in /sys .  We should use architecture independent methods as much as possible.

I may see the disagreement.

- You are describing, and have implemented, a tool for querying the current system to discover what hardware it has available.
- This patch is a tool for querying whether to run tests on the current system, and if so, what -march should make those tests succeed.

Those aren't quite the same thing. In particular, finding a recognised gpu on this system is necessary but insufficient to execute on it.
The real condition we require for the amdgpu tests is 'does the hsa on the current system recognise the gpu', and calling into hsa is a great way to establish that.

A tool for introspection would ideally be dependency free. In the best case, it's just a function in clang, and we don't need any of the subprocess file io cruft.

A tool for guessing whether the in tree runtime tests should be attempted on the current system would ideally be this one, to exactly match when hsa can run them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99949



More information about the cfe-commits mailing list