Lines Matching refs:CUDA
2 Compiling CUDA with clang
11 This document describes how to compile CUDA code with clang, and gives some
12 details about LLVM and clang's CUDA implementations.
14 This document assumes a basic familiarity with CUDA. Information about CUDA
16 `CUDA programming guide
19 Compiling CUDA Code
25 CUDA is supported since llvm 3.9. Clang currently supports CUDA 7.0 through
26 10.1. If clang detects a newer CUDA version, it will issue a warning and will
27 attempt to use detected CUDA SDK it as if it were CUDA-10.1.
29 Before you build CUDA code, you'll need to have installed the CUDA SDK. See
30 `NVIDIA's CUDA installation guide
33 <https://bugs.llvm.org/show_bug.cgi?id=26966>`_ the CUDA toolkit as installed by
35 CUDA installation on a handful of common Linux distributions, but in general the
36 most reliable way to make it work is to install CUDA in a single directory from
39 CUDA compilation is supported on Linux. Compilation on MacOS and Windows may or
45 Invoking clang for CUDA compilation works similarly to compiling regular C++.
50 compiling CUDA code by noticing that your filename ends with ``.cu``.
59 -L<CUDA install path>/<lib64 or lib> \
68 "CUDA driver version is insufficient for CUDA runtime version" errors when you
71 * ``<CUDA install path>`` -- the directory where you installed CUDA SDK.
75 pass e.g. ``-L/usr/local/cuda/lib``. (In CUDA, the device code and host code
78 v10.0 CUDA SDK `no longer supports compilation of 32-bit
95 the CUDA SDK into ``/usr/local/cuda`` or ``/usr/local/cuda-X.Y``.
107 compiling CUDA) Controls whether the compiler emits fused multiply-add
147 <https://github.com/llvm/llvm-test-suite/blob/master/External/CUDA/math_h.cu>`_
149 <https://github.com/llvm/llvm-test-suite/blob/master/External/CUDA/cmath.cu>`_
196 Although clang's CUDA implementation is largely compatible with NVCC's, you may
197 still want to detect when you're compiling CUDA code specifically with clang.
203 When clang is actually compiling CUDA code -- rather than being used as a
206 preprocessor). So you can use the following incantations to detect clang CUDA
212 // clang compiling CUDA code, host mode.
216 // clang compiling CUDA code, device mode.
219 Both clang and nvcc define ``__CUDACC__`` during CUDA compilation. You can
225 There is no formal CUDA spec, and clang and nvcc speak slightly different
519 non-generic address space are faster, but pointers in CUDA are not explicitly
560 To obtain help on LLVM in general and its CUDA support, see `the LLVM