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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to