From: Justin Lebar Date: Wed, 7 Sep 2016 20:09:46 +0000 (+0000) Subject: [CUDA] Expand upon --cuda-gpu-arch flag in CompileCudaWithLLVM doc. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84473cdd412e34dc641b61efc0ef0778cb64cfb1;p=platform%2Fupstream%2Fllvm.git [CUDA] Expand upon --cuda-gpu-arch flag in CompileCudaWithLLVM doc. llvm-svn: 280848 --- diff --git a/llvm/docs/CompileCudaWithLLVM.rst b/llvm/docs/CompileCudaWithLLVM.rst index f57839c..85aab5d 100644 --- a/llvm/docs/CompileCudaWithLLVM.rst +++ b/llvm/docs/CompileCudaWithLLVM.rst @@ -119,6 +119,13 @@ your GPU `_. For example, if you want 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 =======================