[llvm] r280850 - [CUDA] Simplify build/install instructions in CompileCudaWithLLVM.rst.

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


Author: jlebar
Date: Wed Sep  7 15:09:53 2016
New Revision: 280850

URL: http://llvm.org/viewvc/llvm-project?rev=280850&view=rev
Log:
[CUDA] Simplify build/install instructions in CompileCudaWithLLVM.rst.

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=280850&r1=280849&r2=280850&view=diff
==============================================================================
--- llvm/trunk/docs/CompileCudaWithLLVM.rst (original)
+++ llvm/trunk/docs/CompileCudaWithLLVM.rst Wed Sep  7 15:09:53 2016
@@ -1,5 +1,5 @@
 ===================================
-Compiling CUDA with LLVM
+Compiling CUDA with clang
 ===================================
 
 .. contents::
@@ -8,57 +8,39 @@ Compiling CUDA with LLVM
 Introduction
 ============
 
-This document contains the user guides and the internals of compiling CUDA
-code with LLVM. It is aimed at both users who want to compile CUDA with LLVM
-and developers who want to improve LLVM for GPUs. This document assumes a basic
-familiarity with CUDA. Information about CUDA programming can be found in the
+This document describes how to compile CUDA code with clang, and gives some
+details about LLVM and clang's CUDA implementations.
+
+This document assumes a basic familiarity with CUDA. Information about CUDA
+programming can be found in the
 `CUDA programming guide
 <http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html>`_.
 
-How to Build LLVM with CUDA Support
-===================================
-
-CUDA support is still in development and works the best in the trunk version
-of LLVM. Below is a quick summary of downloading and building the trunk
-version. Consult the `Getting Started
-<http://llvm.org/docs/GettingStarted.html>`_ page for more details on setting
-up LLVM.
-
-#. Checkout LLVM
-
-   .. code-block:: console
-
-     $ cd where-you-want-llvm-to-live
-     $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
-
-#. Checkout Clang
-
-   .. code-block:: console
-
-     $ cd where-you-want-llvm-to-live
-     $ cd llvm/tools
-     $ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
-
-#. Configure and build LLVM and Clang
+Compiling CUDA Code
+===================
 
-   .. code-block:: console
+Prerequisites
+-------------
 
-     $ cd where-you-want-llvm-to-live
-     $ mkdir build
-     $ cd build
-     $ cmake [options] ..
-     $ make
+CUDA is supported in llvm 3.9, but it's still in active development, so we
+recommend you `compile clang/LLVM from HEAD
+<http://llvm.org/docs/GettingStarted.html>`_.
+
+Before you build CUDA code, you'll need to have installed the appropriate
+driver for your nvidia GPU and the CUDA SDK.  See `NVIDIA's CUDA installation
+guide <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`_
+for details.  Note that clang `does not support
+<https://llvm.org/bugs/show_bug.cgi?id=26966>`_ the CUDA toolkit as installed
+by many Linux package managers; you probably need to install nvidia's package.
 
-How to Compile CUDA Code with LLVM
-==================================
+You will need CUDA 7.0 or 7.5 to compile with clang.  CUDA 8 support is in the
+works.
 
-We assume you have installed the CUDA driver and runtime. Consult the `NVIDIA
-CUDA installation guide
-<https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`_ if
-you have not.
+Building AXPY
+-------------
 
-Suppose you want to compile and run the following CUDA program (``axpy.cu``)
-which multiplies a ``float`` array by a ``float`` scalar (AXPY).
+Suppose you want to compile and run the following CUDA program (``axpy.cu``),
+which multiplies a ``float`` array by a ``float`` scalar.
 
 .. code-block:: c++
 




More information about the llvm-commits mailing list