[llvm] r280848 - [CUDA] Expand upon --cuda-gpu-arch flag in CompileCudaWithLLVM doc.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 13:09:46 PDT 2016


Author: jlebar
Date: Wed Sep  7 15:09:46 2016
New Revision: 280848

URL: http://llvm.org/viewvc/llvm-project?rev=280848&view=rev
Log:
[CUDA] Expand upon --cuda-gpu-arch flag in CompileCudaWithLLVM doc.

Modified:
    llvm/trunk/docs/CompileCudaWithLLVM.rst

Modified: llvm/trunk/docs/CompileCudaWithLLVM.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CompileCudaWithLLVM.rst?rev=280848&r1=280847&r2=280848&view=diff
==============================================================================
--- llvm/trunk/docs/CompileCudaWithLLVM.rst (original)
+++ llvm/trunk/docs/CompileCudaWithLLVM.rst Wed Sep  7 15:09:46 2016
@@ -119,6 +119,13 @@ your GPU <https://developer.nvidia.com/c
 to run your program on a GPU with compute capability of 3.5, you should specify
 ``--cuda-gpu-arch=sm_35``.
 
+Note: You cannot pass ``compute_XX`` as an argument to ``--cuda-gpu-arch``;
+only ``sm_XX`` is currently supported.  However, clang always includes PTX in
+its binaries, so e.g. a binary compiled with ``--cuda-gpu-arch=sm_30`` would be
+forwards-compatible with e.g. ``sm_35`` GPUs.
+
+You can pass ``--cuda-gpu-arch`` multiple times to compile for multiple archs.
+
 Detecting clang vs NVCC
 =======================
 




More information about the llvm-commits mailing list