File: nvidia-cuda-toolkit.README.Debian

package info (click to toggle)
nvidia-cuda-toolkit 8.0.44-4
  • links: PTS, VCS
  • area: non-free
  • in suites: stretch
  • size: 2,370,244 kB
  • ctags: 62
  • sloc: sh: 4,761,620; makefile: 212
file content (96 lines) | stat: -rw-r--r-- 3,509 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
nvidia-cuda-toolkit for Debian
------------------------------
Contents:
  1. Getting NVCC Working with the Compiler
  2. Installing the CUDA Code Samples

Getting NVCC Working with the Compiler
======================================

It is worth noting that not all compilers can be used together with NVCC.
Here is a list of possible combinations:

    ```
    CXX compiler |  CUDA 7.5  |  CUDA 8.0  |  CUDA 9.0  |
    -------------+------------+------------+------------+
    GCC-8        |     ?      |     ?      |     ?      |
    GCC-7        |     ?      |     ?      |     ?      |
    GCC-6        |     X      |     X      |     OK     |
    GCC-5        |     OK[1]  |     OK     |     OK     |
    -------------+------------+------------+------------+
    CLANG-4.0    |     ?      |     ?      |     ?      |
    CLANG-3.9    |     X      |     X      |     OK     |
    CLANG-3.8    |     ?      |     OK     |     OK     |
    ```

In the above table, '?' means 'not tested', 'X' means 'never work',
'OK' means 'should work'.

CUDA 8.0 Specific
-----------------

The recommended way, as declared in NEWS, to compile your CUDA application
with CUDA 8.0 is to globally use clang-3.8/clang++-3.8 as the C/CXX compiler
for your project. Example:

  CC=clang-3.8 make

However, when you have to mix the use of GCC and CLANG, things differ.
Due to the difference on the default options of the two compilers, you
may have to add flags such as -fPIC/-fPIE or alike to CLANG's argument
list, to avoid the linkage failure as reported in BUG #861878 [2].
See [3] for detail about these compiler options. Example:

  nvcc -ccbin clang-3.8 --compiler-options -fPIC ...

Sidenotes
---------

Debian Stretch ships CUDA 8.0, and the same time its default GCC is
GCC-6. So we changed the default compiler to clang-3.8 for the CUDA 8.0
package because Stretch ships no GCC-5.

[1] CUDA 7.5 works with GCC-5 after begin patched.
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861878
[3] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html


Installing the CUDA Code Samples
=================================

The CUDA Code Samples come with non-redistributable media files (images,
videos, ...) and therefore cannot be packaged.
(See https://bugs.debian.org/702948 for details.)

To install the CUDA Code Samples, download the RUN installer for Linux from
https://developer.nvidia.com/cuda-downloads#linux
This download includes an old driver and the full toolkit, but unfortunately
there is no separate download available for the Samples.

Install the Samples to ~/NVIDIA_CUDA-7.5_Samples with

  sh cuda_7.5.18_linux.run --silent --samples --samplespath=$HOME --toolkitpath=/usr

(Adjust the version numbers if you downloaded a different version.)

The following Debian packages are needed to build the examples:
  * freeglut3-dev
  * libgl1-mesa-dev
  * libgles2-mesa-dev
  * libglu1-mesa-dev
  * libnvcuvid1 (not on Ubuntu based systems)
  * libxi-dev
  * libxmu-dev
This optional package will be used if it is installed, too:
  * mpi-default-dev

To build the example programs, change to the directory where the Samples were
installed (by default: ~/NVIDIA_CUDA-7.5_Samples/) and run

    MA_LIBDIR=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)
    make OPENMPDIR=$MA_LIBDIR CUDA_SEARCH_PATH=$MA_LIBDIR GLPATH=$MA_LIBDIR

For more information on the Samples, please see
https://developer.nvidia.com/cuda-code-samples

 -- Andreas Beckmann <anbe@debian.org>  Tue, 01 Mar 2016 15:40:34 +0100