Edit Info Other
Login

CUDA"

Differences between revisions 14 and 15
Revision 14 as of 2017-06-28 16:51:32
Size: 3555
Comment:
Revision 15 as of 2017-11-20 21:12:25
Size: 3756
Comment: Update with CUDA 9.0 and add a note for blender
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
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 http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-repo-rhel7-9.0.176-1.x86_64.rpm
Line 16: Line 16:
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 http://developer.download.nvidia.com/compute/cuda/repos/rhel6/x86_64/cuda-repo-rhel6-9.0.176-1.x86_64.rpm
Line 19: Line 19:
 * 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
 * Fedora 25 (and later) {{{
sudo dnf install http://developer.download.nvidia.com/compute/cuda/repos/fedora25/x86_64/cuda-repo-fedora25-9.0.176-1.x86_64.rpm
Line 29: Line 29:
 * Tweak the /usr/local/cuda-8.0/targets/x86_64-linux/include/host_defines.h to accept the Fedora default compiler.  * Tweak the /usr/local/cuda-9.0/targets/x86_64-linux/include/host_defines.h to accept the Fedora default compiler.
Line 34: Line 34:
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
sudo dnf install http://ftp.ciril.fr/pub/linux/centos/7.4.1708/extras/x86_64/Packages/centos-release-scl-2-2.el7.centos.noarch.rpm
sudo dnf install devtoolset-6-toolchain
Line 37: Line 37:
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 You cannot install the whole devtoolset-6 collection, but the toolchain is enough , then each time you need to build using cuda, you start by
Line 39: Line 39:
scl run devtoolset-4 bash scl run devtoolset-6 bash
Line 47: Line 47:
gcc (GCC) 7.1.1 20170622 (Red Hat 7.1.1-3) gcc (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
Line 54: Line 54:
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. 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:
Line 64: Line 64:
=== 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.
=== 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.
Line 68: Line 68:
 /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by ffmpeg)  /usr/local/cuda-9.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by ffmpeg)
Line 71: Line 71:
You can either ignore the message or manually delete the libOpenCL.so.1 provided by Nvidia (run sudo ldconfig once delted). Please verify to not have other OpenCL providers that might interfere with NVIDIA OpenCL usage. You can either ignore the message or manually delete the libOpenCL.so.1 provided by NVIDIA (run sudo ldconfig once deleted). Please verify to not have other OpenCL providers that might interfere with NVIDIA OpenCL usage.
Line 74: Line 74:
=== Running blender ===
Even when only running blender, you need a CUDA compatible compiler as described above. This is because blender will compile a "CUDA Kernel" optimized for your own GPU.
Line 75: Line 78:
 * CUDA Start quide: https://developer.nvidia.com/compute/cuda/8.0/prod/docs/sidebar/CUDA_Quick_Start_Guide-pdf  * CUDA Start quide: https://developer.nvidia.com/compute/cuda/9.0/prod/docs/sidebar/CUDA_Quick_Start_Guide-pdf

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-9.0.176-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-9.0.176-1.x86_64.rpm
    sudo yum install cuda
  • Fedora 25 (and later)

    sudo dnf install http://developer.download.nvidia.com/compute/cuda/repos/fedora25/x86_64/cuda-repo-fedora25-9.0.176-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.4.1708/extras/x86_64/Packages/centos-release-scl-2-2.el7.centos.noarch.rpm
sudo dnf install devtoolset-6-toolchain

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

scl run devtoolset-6 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) 7.2.1 20170915 (Red Hat 7.2.1-2)
Copyright (C) 2017 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.

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-9.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 (run sudo ldconfig once deleted). Please verify to not have other OpenCL providers that might interfere with NVIDIA OpenCL usage. (looking at /etc/OpenCL/vendors ).

Running blender

Even when only running blender, you need a CUDA compatible compiler as described above. This is because blender will compile a "CUDA Kernel" optimized for your own GPU.

References


CategoryHowto

Howto/CUDA (last edited 2024-04-07 16:22:10 by NicolasChauvet)