development/cudatoolkit: Updated for version 10.2.89.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Giorgio Peron 2020-06-19 09:18:14 +01:00 committed by Willy Sudiarto Raharjo
parent 1da455f73a
commit 540f5d09b7
No known key found for this signature in database
GPG key ID: 3F617144D7238786
33 changed files with 331 additions and 36 deletions

View file

@ -3,7 +3,7 @@ enables dramatic increases in computing performance by harnessing the
power of the GPU.
NOTE:
- the binary file to download is 1,4 Gb;
- the temporary package file will need 3,5 Gb;
- the final package will be around 1 Gb (2,2 Gb when installed).
- the binary file to download is 2,8 Gb;
- the temporary package file will need 7 Gb;
- the final package will be around 2 Gb (3 Gb when installed).
Be sure to have enough free space before building this.

View file

@ -2,7 +2,7 @@
# Slackware build script for CUDA Toolkit
# Copyright 2017 Giorgio Peron <giorgio.peron@gmail.com>, Belluno, Italy
# Copyright 2020 Giorgio Peron <giorgio.peron@gmail.com>, Belluno, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,7 +24,8 @@
PRGNAM=cudatoolkit
FILENAME=cuda
VERSION=${VERSION:-8.0.61}
VERSION=${VERSION:-10.2.89}
DRIVER=${DRIVER:-440.33.01}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -55,52 +56,91 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
chmod +x $CWD/$FILENAME\_$VERSION\_375.26\_linux-run
$CWD/$FILENAME\_$VERSION\_375.26\_linux-run -extract=$TMP
$TMP/$FILENAME-linux64*-$VERSION-*.run -noprompt -nosymlink -prefix=$TMP/$PRGNAM-$VERSION
chmod +x $CWD/$FILENAME\_$VERSION\_$DRIVER\_linux.run
sh $CWD/$FILENAME\_$VERSION\_$DRIVER\_linux.run --target $PRGNAM-$VERSION --noexec
cd $PRGNAM-$VERSION
chown -R root:root .
mkdir -p $PKG/usr/share
cd $PRGNAM-$VERSION/builds
cp -r cuda-toolkit "$PKG/usr/share/cuda"
cp -r cublas/include/* "$PKG/usr/share/cuda/include/"
mkdir -p $PKG/usr/lib64
cp -r cublas/lib64/* "$PKG/usr/lib$LIBDIRSUFFIX/"
cp -r cuda-samples "$PKG/usr/share/cuda/samples"
# Move the docs to our standard location first
mkdir -p $PKG/usr/man
mv doc/man $PKG/usr/
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv doc/* $PKG/usr/doc/$PRGNAM-$VERSION
rm -rf doc
# Define compilers for CUDA to use.
# This allows us to use older versions of GCC if we have to.
# ln -s /usr/bin/gcc-8 "${PKG}/usr/share/cuda/bin/gcc"
# ln -s /usr/bin/g++-8 "${PKG}/usr/share/cuda/bin/g++"
# Put man in the standard place
mv $PKG/usr/share/cuda/doc/man $PKG/usr/
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
# Now move everything else
mkdir -p $PKG/usr/share/cuda
mv * $PKG/usr/share/cuda/
# Put doc in the standard place
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/cuda/doc/* $PKG/usr/doc/$PRGNAM-$VERSION/
rm -rf $PKG/usr/share/cuda/doc
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Create soname links.
find cuda-toolkit/targets -type f -name '*.so*' ! -path '*stubs/*' -print0 | while read -rd $'\0' _lib; do
_base=${_lib%.so.*}
_current_soname=$(basename ${_lib%.*})
while [[ $_current_soname != $(basename $_base) ]]; do
ln -sf ${_lib##*/} ${PKG}/usr/share/cuda/lib$LIBDIRSUFFIX/$_current_soname
_current_soname=${_current_soname%.*}
done
done
# Install profile and ld.so.config files
install -Dm755 "${CWD}/files/cuda.sh" "${PKG}/etc/profile.d/cuda.sh"
install -Dm755 "${CWD}/files/cuda.csh" "${PKG}/etc/profile.d/cuda.csh"
# Install pkgconfig files
mkdir -p "$PKG"/usr/lib${LIBDIRSUFFIX}/pkgconfig
cp "${CWD}"/files/*.pc "${PKG}"/usr/lib${LIBDIRSUFFIX}/pkgconfig
# Remove included copy of java and link to system java 8
rm -fr "${PKG}/usr/share/cuda/jre"
sed 's|../jre/bin/java|/usr/bin/java|g' \
-i "${PKG}/usr/share/cuda/libnsight/nsight.ini" \
-i "${PKG}/usr/share/cuda/libnvvp/nvvp.ini"
# Allow newer compilers to work.
# See https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements
# for official requirements
sed -i "/.*unsupported GNU version.*/d" "${PKG}"/usr/share/cuda/targets/x86_64-linux/include/crt/host_config.h
sed -i "/.*unsupported clang version.*/d" "${PKG}"/usr/share/cuda/targets/x86_64-linux/include/crt/host_config.h
# Fix Makefile paths to CUDA
for f in $(find "$PKG"/usr/share/cuda -name Makefile); do
sed -i "s|/usr/local/cuda|/usr/share/cuda|g" "$f"
done
# Put libraries in the standard place
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
mv $PKG/usr/share/cuda/lib${LIBDIRSUFFIX} $PKG/usr
mv -fn $PKG/usr/share/cuda/targets/x86_64-linux/lib/* $PKG/usr/lib${LIBDIRSUFFIX}/
rm -rf $PKG/usr/share/cuda/targets/x86_64-linux/lib
cd $PKG/usr/share/cuda
ln -sf ../../lib${LIBDIRSUFFIX} lib${LIBDIRSUFFIX}
mkdir -p $PKG/etc/profile.d
cp $CWD/files/${FILENAME}* $PKG/etc/profile.d
chmod +x $PKG/etc/profile.d/*
# Register application NVVP and NSIGHT
mkdir -p $PKG/usr/share/applications
cp $CWD/files/*.desktop $PKG/usr/share/applications
# Put include in the standard place
mkdir -p $PKG/usr/include/cuda
mv $PKG/usr/share/cuda/include/* $PKG/usr/include/cuda
rm -rf $PKG/usr/share/cuda/include
mkdir -p $PKG/usr/include
mv -fn $PKG/usr/share/cuda/targets/x86_64-linux/include/* $PKG/usr/include/
rm -rf $PKG/usr/share/cuda/targets/x86_64-linux/include
cd $PKG/usr/share/cuda/
ln -sf ../../include/cuda include
ln -sf ../../include include
rm -rf $PKG/usr/share/cuda/targets
# These are already in the nvidia-driver package
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libOpenCL.s*
# install samples
$TMP/$FILENAME-samples*-$VERSION-*.run -noprompt -prefix=$PKG/usr/doc/$PRGNAM-$VERSION/NVIDIA_CUDA-8.0_Samples -cudaprefix=/usr/share/cuda
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View file

@ -1,10 +1,10 @@
PRGNAM="cudatoolkit"
VERSION="8.0.61"
HOMEPAGE="http://www.nvidia.com/object/cuda_home_new.html"
VERSION="10.2.89"
HOMEPAGE="https://developer.nvidia.com/cuda-toolkit"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
DOWNLOAD_x86_64="https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run"
MD5SUM_x86_64="33e1bd980e91af4e55f3ef835c103f9b"
REQUIRES="nvidia-driver jdk"
DOWNLOAD_x86_64="http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run"
MD5SUM_x86_64="3d816c583759efa8567a92c1a2af90db"
REQUIRES="nvidia-driver openjdk8"
MAINTAINER="Giorgio Peron"
EMAIL="giorgio.peron@gmail.com"

View file

@ -0,0 +1,3 @@
# install GCC 6 and link the compiler in cuda bin folder
ln -sf usr/bin/gcc-6 usr/share/cuda/bin/gcc
ln -sf usr/bin/g++-6 usr/share/cuda/bin/g++

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: accinj64
Description: OpenACC 64-bit Injection Library
Version: 10.2
Libs: -L${libdir} -laccinj64
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cublas
Description: CUDA BLAS Library
Version: 10.2
Libs: -L${libdir} -lcublas
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cuda
Description: CUDA Driver Library
Version: 10.2
Libs: -L${libdir} -lcuda
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cudart
Description: CUDA Runtime Library
Version: 10.2
Libs: -L${libdir} -lcudart
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cufft
Description: CUDA Fast Fourier Transform
Version: 10.2
Libs: -L${libdir} -lcufft
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cufftw
Description: CUDA Fast Fourier Transform Wide
Version: 10.2
Libs: -L${libdir} -lcufftw
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cuinj64
Description: CUDA 64-bit Injection Library
Version: 10.2
Libs: -L${libdir} -lcuinj64
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: curand
Description: CUDA Random Number Generation Library
Version: 10.2
Libs: -L${libdir} -lcurand
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cusolver
Description: A LAPACK-like library on dense and sparse linear algebra
Version: 10.2
Libs: -L${libdir} -lcusolver
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: cusparse
Description: CUDA Sparse Matrix Library
Version: 10.2
Libs: -L${libdir} -lcusparse
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppc
Description: NVIDIA Performance Primitives - Core
Version: 10.2
Libs: -L${libdir} -lnppc
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppi
Description: NVIDIA Performance Primitives - Image Processing
Version: 10.2
Libs: -L${libdir} -lnppi
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppial
Description: NVIDIA Performance Primitives - Image Processing - Arithmetic and Logic
Version: 10.2
Libs: -L${libdir} -lnppial
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppicc
Description: NVIDIA Performance Primitives - Image Processing - Color Conversion
Version: 10.2
Libs: -L${libdir} -lnppicc
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppicom
Description: NVIDIA Performance Primitives - Image Processing - Compression
Version: 10.2
Libs: -L${libdir} -lnppicom
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppidei
Description: NVIDIA Performance Primitives - Image Processing - DEI
Version: 10.2
Libs: -L${libdir} -lnppidei
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppif
Description: NVIDIA Performance Primitives - Image Processing - Filters
Version: 10.2
Libs: -L${libdir} -lnppif
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppig
Description: NVIDIA Performance Primitives - Image Processing - Geometry
Version: 10.2
Libs: -L${libdir} -lnppig
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppim
Description: NVIDIA Performance Primitives - Image Processing - Morphological
Version: 10.2
Libs: -L${libdir} -lnppim
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppist
Description: NVIDIA Performance Primitives - Image Processing - Statistic and Linear
Version: 10.2
Libs: -L${libdir} -lnppist
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppisu
Description: NVIDIA Performance Primitives - Image Processing - Support and Data Exchange
Version: 10.2
Libs: -L${libdir} -lnppisu
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nppitc
Description: NVIDIA Performance Primitives - Image Processing - Threshold and Compare
Version: 10.2
Libs: -L${libdir} -lnppitc
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: npps
Description: NVIDIA Performance Primitives - Signal Processing
Version: 10.2
Libs: -L${libdir} -lnpps
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nvToolsExt
Description: NVIDIA Tools Extension
Version: 10.2
Libs: -L${libdir} -lnvToolsExt
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nvgraph
Description: NVIDIA Accelerated Graph Analytics
Version: 10.2
Libs: -L${libdir} -lnvgraph
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nvidia-ml
Description: NVML
Version: 10.2
Libs: -L${libdir}/stubs -lnvidia-ml
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nvjpeg
Description: NVIDIA JPEG Library
Version: 10.2
Libs: -L${libdir} -lnvjpeg
Cflags: -I${includedir}

View file

@ -0,0 +1,9 @@
cudaroot=/usr/share/cuda
libdir=/usr/lib64
includedir=/usr/include
Name: nvrtc
Description: A runtime compilation library for CUDA C++
Version: 10.2
Libs: -L${libdir} -lnvrtc
Cflags: -I${includedir}

View file

@ -12,7 +12,7 @@ cudatoolkit: CUDA is NVIDIA's parallel computing architecture. It enables dramat
cudatoolkit: increases in computing performance by harnessing the power of
cudatoolkit: the GPU.
cudatoolkit:
cudatoolkit: Homepage http://www.nvidia.com/object/cuda_home_new.html
cudatoolkit: Homepage https://developer.nvidia.com/cuda-toolkit
cudatoolkit:
cudatoolkit:
cudatoolkit: