From 84473cdd412e34dc641b61efc0ef0778cb64cfb1 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Wed, 7 Sep 2016 20:09:46 +0000 Subject: [PATCH] [CUDA] Expand upon --cuda-gpu-arch flag in CompileCudaWithLLVM doc. llvm-svn: 280848 --- llvm/docs/CompileCudaWithLLVM.rst | 7 +++++++ 1 file changed, 7 insertions(+) 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 ======================= -- 2.7.4