Edit Info Other
Login

CUDA"

Differences between revisions 1 and 12 (spanning 11 versions)
Revision 1 as of 2016-12-14 11:12:50
Size: 2258
Comment:
Revision 12 as of 2017-06-28 16:16:47
Size: 3525
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Howto/NVIDIA_CUDA
Line 2: Line 3:
== NVIDIA CUDA Installation == == Installation ==
Line 5: Line 6:
== NVIDIA CUDA Repository == == Repository ==
Line 10: Line 11:
* RHEL/CentOS 7 {{{
yum install http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-repo-rhel7-8.0.44-1.x86_64.rpm
yum install cuda
 * RHEL/CentOS 7 {{{
sudo yum install http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-repo-rhel7-8.0.61-1.x86_64.rpm
sudo yum install cuda
Line 14: Line 15:
* Fedora 23 (and later) {{{
dnf install http://developer.download.nvidia.com/compute/cuda/repos/fedora23/x86_64/cuda-repo-fedora23-8.0.44-1.x86_64.rpm
dnf install cuda
 * RHEL/CentOS 6 {{{
sudo yum install http://developer.download.nvidia.com/compute/cuda/repos/rhel6/x86_64/cuda-repo-rhel6-8.0.61-1.x86_64.rpm
sudo yum install cuda
}}}
 
* Fedora 23 (and later) {{{
sudo dnf install http://developer.download.nvidia.com/compute/cuda/repos/fedora23/x86_64/cuda-repo-fedora23-8.0.61-1.x86_64.rpm
sudo
dnf install cuda
Line 19: Line 24:
== GCC version issue == == Known issues ==
=
== GCC version ===
Line 22: Line 28:
* Tweak the /usr/local/cuda-8.0/targets/x86_64-linux/include/host_defines.h to accept the Fedora default compiler.
* Install the appropriate gcc version for CentOS developper toolset. Please see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-4/

 
* Tweak the /usr/local/cuda-8.0/targets/x86_64-linux/include/host_defines.h to accept the Fedora default compiler.

 
* Install the appropriate gcc version for CentOS developper toolset. Please see https://www.softwarecollections.org/en/scls/rhscl/devtoolset-4/
Line 25: Line 34:
dnf install http://ftp.ciril.fr/pub/linux/centos/7.3.1611/extras/x86_64/Packages/centos-release-scl-2-2.el7.centos.noarch.rpm
dnf install devtoolset-4-toolchain
sudo dnf install http://ftp.ciril.fr/pub/linux/centos/7.3.1611/extras/x86_64/Packages/centos-release-scl-2-2.el7.centos.noarch.rpm
sudo dnf install devtoolset-4-toolchain
Line 30: Line 39:
$ scl run devtoolset-4 bash
gcc --version
scl run devtoolset-4 bash
gcc --version
Line 36: Line 45:
$ exit
$ gcc --version
exit
Line 45: Line 53:
=== Which driver Package ===
Both "Cuda" and "RPM Fusion" repositories provide the nvidia driver packages. Usually, the package provided by RPM Fusion is higher. But in case you want to avoid the risk, add this.
{{{
#/etc/yum.repos.d/cuda.repo
[cuda]
name=cuda
...
exclude=xorg-x11-drv-nvidia\*,akmod-nvidia\*
}}}


=== Nvidia provided libOpenCL ===
Nvidia only advertise OpenCL 1.2 with the binary driver at this time. As a consequence, they provide an old version of libOpenCL.so.1 which works fine with their binary driver.
As most software in Fedora and RPM Fusion are built using a newer libOpenCL, the system linker detects that and issues the following message:
{{{
 /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by ffmpeg)
}}}

You can either ignore the message or manually delete the libOpenCL.so.1 provided by Nvidia. Please verify to not have other OpenCL providers that might interfere with NVIDIA OpenCL usage.
(looking at /etc/OpenCL/vendors ).
Line 47: Line 75:
* CUDA Start quide: https://developer.nvidia.com/compute/cuda/8.0/prod/docs/sidebar/CUDA_Quick_Start_Guide-pdf
* CUDA documentation: https://docs.nvidia.com/cuda/index.html
 * CUDA Start quide: https://developer.nvidia.com/compute/cuda/8.0/prod/docs/sidebar/CUDA_Quick_Start_Guide-pdf

 
* CUDA documentation: https://docs.nvidia.com/cuda/index.html

Installation

This Howto provides a way to install the official NVIDIA packages for CUDA.

Repository

This repository contains a given version of CUDA that is parallel installable along with another version.

Please use the Official link: https://developer.nvidia.com/cuda-downloads

  • RHEL/CentOS 7

    sudo yum install http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-repo-rhel7-8.0.61-1.x86_64.rpm
    sudo yum install cuda
  • RHEL/CentOS 6

    sudo yum install http://developer.download.nvidia.com/compute/cuda/repos/rhel6/x86_64/cuda-repo-rhel6-8.0.61-1.x86_64.rpm
    sudo yum install cuda
  • Fedora 23 (and later)

    sudo dnf install http://developer.download.nvidia.com/compute/cuda/repos/fedora23/x86_64/cuda-repo-fedora23-8.0.61-1.x86_64.rpm
    sudo dnf install cuda

Known issues

GCC version

When using a later version of Fedora than what is supported by the NVIDIA CUDA Official repository, you might be unable to compile. You can either:

sudo dnf install http://ftp.ciril.fr/pub/linux/centos/7.3.1611/extras/x86_64/Packages/centos-release-scl-2-2.el7.centos.noarch.rpm
sudo dnf install devtoolset-4-toolchain

You cannot install the whole devtoolset-4 collection, but the toolchain is enough , then each time you need to build using cuda, you start by

scl run devtoolset-4 bash
gcc --version
gcc (GCC) 5.2.1 20150902 (Red Hat 5.2.1-2)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
exit
gcc --version
gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)
Copyright © 2016 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie.  Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER

Which driver Package

Both "Cuda" and "RPM Fusion" repositories provide the nvidia driver packages. Usually, the package provided by RPM Fusion is higher. But in case you want to avoid the risk, add this.

#/etc/yum.repos.d/cuda.repo
[cuda]
name=cuda
...
exclude=xorg-x11-drv-nvidia\*,akmod-nvidia\*

Nvidia provided libOpenCL

Nvidia only advertise OpenCL 1.2 with the binary driver at this time. As a consequence, they provide an old version of libOpenCL.so.1 which works fine with their binary driver. As most software in Fedora and RPM Fusion are built using a newer libOpenCL, the system linker detects that and issues the following message:

 /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by ffmpeg)

You can either ignore the message or manually delete the libOpenCL.so.1 provided by Nvidia. Please verify to not have other OpenCL providers that might interfere with NVIDIA OpenCL usage. (looking at /etc/OpenCL/vendors ).

References


CategoryHowto

Howto/CUDA (last edited 2023-12-04 18:29:33 by NicolasChauvet)