[PATCH] D128090: [Clang][OpenMP] Process multi-arch compilation options given via -march

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 11:44:23 PDT 2022


tra added a comment.

In D128090#3649125 <https://reviews.llvm.org/D128090#3649125>, @jhuber6 wrote:

> It just defaults to `sm_35` if CUDA isn't present on the system IIRC. Alternatively we could ship a tool to derive it at compile time.

As it happens, recent CUDA releases ship with `bin/__nvcc_device_query` which prints out the list of SM capabilities of the GPUs it sees.

Even that may not be the right value. E.g. only some of the GPUs on the machine may be intended for compute. It's not that uncommon to have a puny card to drive the display and one or more compute cards we actually want to compile for. There's no point compiling for a GPU variant which will never do any compute.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128090



More information about the cfe-commits mailing list