Skip to content

Commit 5d14b72

Browse files
committedNov 16, 2018
[CUDA] updated CompileCudaWithLLVM.rst
Differential Revision: https://reviews.llvm.org/D54608 llvm-svn: 347007
1 parent 9d6c440 commit 5d14b72

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed
 

‎llvm/docs/CompileCudaWithLLVM.rst

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ Compiling CUDA Code
2222
Prerequisites
2323
-------------
2424

25-
CUDA is supported in llvm 3.9, but it's still in active development, so we
26-
recommend you `compile clang/LLVM from HEAD
27-
<http://llvm.org/docs/GettingStarted.html>`_.
28-
29-
Before you build CUDA code, you'll need to have installed the appropriate
30-
driver for your nvidia GPU and the CUDA SDK. See `NVIDIA's CUDA installation
31-
guide <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`_
32-
for details. Note that clang `does not support
33-
<https://llvm.org/bugs/show_bug.cgi?id=26966>`_ the CUDA toolkit as installed
34-
by many Linux package managers; you probably need to install nvidia's package.
35-
36-
You will need CUDA 7.0, 7.5, or 8.0 to compile with clang.
37-
38-
CUDA compilation is supported on Linux, on MacOS as of 2016-11-18, and on
39-
Windows as of 2017-01-05.
25+
CUDA is supported since llvm 3.9. Current release of clang (7.0.0) supports CUDA
26+
7.0 through 9.2. If you need support for CUDA 10, you will need to use clang
27+
built from r342924 or newer.
28+
29+
Before you build CUDA code, you'll need to have installed the appropriate driver
30+
for your nvidia GPU and the CUDA SDK. See `NVIDIA's CUDA installation guide
31+
<https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`_ for
32+
details. Note that clang `does not support
33+
<https://llvm.org/bugs/show_bug.cgi?id=26966>`_ the CUDA toolkit as installed by
34+
many Linux package managers; you probably need to install CUDA in a single
35+
directory from NVIDIA's package.
36+
37+
CUDA compilation is supported on Linux. Compilation on MacOS and Windows may or
38+
may not work and currently have no maintainers. Compilation with CUDA-9.x is
39+
`currently broken on Windows <https://bugs.llvm.org/show_bug.cgi?id=38811>`_.
4040

4141
Invoking clang
4242
--------------
@@ -73,7 +73,9 @@ run your program.
7373
Pass e.g. ``-L/usr/local/cuda/lib64`` if compiling in 64-bit mode; otherwise,
7474
pass e.g. ``-L/usr/local/cuda/lib``. (In CUDA, the device code and host code
7575
always have the same pointer widths, so if you're compiling 64-bit code for
76-
the host, you're also compiling 64-bit code for the device.)
76+
the host, you're also compiling 64-bit code for the device.) Note that as of
77+
v10.0 CUDA SDK `no longer supports compilation of 32-bit
78+
applications<https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#deprecated-features>`_.
7779

7880
* ``<GPU arch>`` -- the `compute capability
7981
<https://developer.nvidia.com/cuda-gpus>`_ of your GPU. For example, if you
@@ -89,8 +91,7 @@ run your program.
8991

9092
The `-L` and `-l` flags only need to be passed when linking. When compiling,
9193
you may also need to pass ``--cuda-path=/path/to/cuda`` if you didn't install
92-
the CUDA SDK into ``/usr/local/cuda``, ``/usr/local/cuda-7.0``, or
93-
``/usr/local/cuda-7.5``.
94+
the CUDA SDK into ``/usr/local/cuda`` or ``/usr/local/cuda-X.Y``.
9495

9596
Flags that control numerical code
9697
---------------------------------
@@ -548,9 +549,9 @@ The relevant tools are now just vanilla clang/LLVM.
548549
| Jingyue Wu, Artem Belevich, Eli Bendersky, Mark Heffernan, Chris Leary, Jacques Pienaar, Bjarke Roune, Rob Springer, Xuetian Weng, Robert Hundt
549550
| *Proceedings of the 2016 International Symposium on Code Generation and Optimization (CGO 2016)*
550551
|
551-
| `Slides from the CGO talk <http://wujingyue.com/docs/gpucc-talk.pdf>`_
552+
| `Slides from the CGO talk <http://wujingyue.github.io/docs/gpucc-talk.pdf>`_
552553
|
553-
| `Tutorial given at CGO <http://wujingyue.com/docs/gpucc-tutorial.pdf>`_
554+
| `Tutorial given at CGO <http://wujingyue.github.io/docs/gpucc-tutorial.pdf>`_
554555
555556
Obtaining Help
556557
==============

0 commit comments

Comments
 (0)