AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
503 stars 336 forks source link

GNU Make: try nvidia-smi for CUDA arch if deviceQuery fails #3997

Closed yut23 closed 1 week ago

yut23 commented 1 week ago

Summary

I recently updated my local workstation, and found that CUDA compilation wasn't working properly due to CUDA_ARCH not being detected properly. It turns out the deviceQuery utility is no longer distributed with the toolkit since CUDA 12 or so. nvidia-smi can get that info, so we can fall back to that if deviceQuery isn't present.

Additional background

Checklist

The proposed changes: