[PATCH] D128090: [Clang][OpenMP] Process multi-arch compilation options given via -march
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 11:50:28 PDT 2022
jhuber6 added a comment.
In D128090#3649202 <https://reviews.llvm.org/D128090#3649202>, @tra wrote:
> 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.
Interesting, may be worthwhile to query that if it exists, though AMD does this with `amdgpu-arch` which has led to problems for me in the past. But even if it could be wrong it will still spit out an architecture that would run on at least one local card rather than zero.
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