summaryrefslogtreecommitdiff
path: root/dev-util/nvidia-cuda-toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/nvidia-cuda-toolkit')
-rw-r--r--dev-util/nvidia-cuda-toolkit/Manifest5
-rw-r--r--dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-11.2.0-nsight-systems-launcher.patch12
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.0-r3.ebuild257
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.0-r1.ebuild253
4 files changed, 0 insertions, 527 deletions
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest
index cdde6d2169b4..6e8744af1e55 100644
--- a/dev-util/nvidia-cuda-toolkit/Manifest
+++ b/dev-util/nvidia-cuda-toolkit/Manifest
@@ -1,18 +1,13 @@
AUX cuda-config.in 406 BLAKE2B 1f1bb67d1f13da52821d640ac1875affb0ba1562df8c3eb6d2fed24c0639f8e6ff43428701c5a2d1538e444356db5e9854e6ea629a1e3b2e1399ebacef2ca388 SHA512 df6d16bd2e800868bdf8401b6f82a387b701ea297ddf6e8feb0daf5222e62a33f156e5f45cf1ee4e1aa51559dfbd56b897c257dae1bb9568e839bf806bfebd5b
-AUX nvidia-cuda-toolkit-11.2.0-nsight-systems-launcher.patch 617 BLAKE2B b5e53c8eca4462c828e8e55d83ef4807416e5a1fdef79bdfbbbcf36f5b4957d3168c3bcb7adb6d485359df85c218f17af25f62cc119e76025edab46da6f0b890 SHA512 238595801bd1248c5c0caf860a8f641eaed4d2760a20c1a85c374f4475418cf915d4010b5c7c5db6c1a11abb50aa9606d291fab8de1b40fa3f834a7cd1a386f4
DIST cuda_10.2.89_440.33.01_linux.run 2645419389 BLAKE2B 236aa70a7b45e3636c2c229fffa7d1ca0699ab4365865a73edab607a209c42c2899133dd6a83c61c5929fa754668ad15aec4d847639af1c00a8e6657c8487c77 SHA512 ad8da539ff5df7caf411d1e497ff3d6978cfa8a1fd9150fa4846089e92a604ea56be8631f3efdfe7229a655b8d2d28e6edb32f5731530a77d6f00241cc7aab6e
DIST cuda_11.1.1_455.32.00_linux.run 3532172082 BLAKE2B f4af6bd87c419c002b4913ea7cfcbc84c78e3da485a7ac7dff0da483347cb38bde020e70c7352fe995a2efe0b8e97a156e0536f87aef69ff13fdf6e75fa634d1 SHA512 3da629e6f63548d06050a77d6ad2dbf314db33b2bf4e7d1659f039b3d9ad2ad3f87a6e506ec54db9ca2d21ac7b5ec576748082684bbab3b6642c03d2793d73a9
-DIST cuda_11.2.0_460.27.04_linux.run 3046790184 BLAKE2B 5330bc2e12ff131eb993610c95b22e6358b11d6a7a952625a4e88ed856769256c02e165ac7bf6cc43236052c8427cee17bf1e7346995dc2eba84d93c5d444eb3 SHA512 0aa7390490b93be7f359327a8fe364a44b538e742c7ccd560e9bbb40ed8613539c37fcb4aa71a2fbfa0bfdb0416ab43bbdcc09cd0c81db3f1a07b37318d6b2b3
DIST cuda_11.2.2_460.32.03_linux.run 3057439068 BLAKE2B c3f3cd9eaaa4f91eb8080e7cafe1280f9bbc9cfc71ce1a6115af1dd348b83d30eed945609bf87e00d4873bede1fa9136fc4a7f393fd31db4e6406dc76086bc22 SHA512 e28d7d2eabd96df9e18f8e55f61adda39b07c2223605f77a6c2d92a02f7b57e9ce8b83d4b4de1124faa5670509d204d3db70c03b18af5cc5964b6ed6653d6a22
-DIST cuda_11.3.0_465.19.01_linux.run 3029622552 BLAKE2B ca64af09dc68b085a589b5756e3bfce72550e262b778aad06eb1f5b77d9cb30447fb8b57f5f6c3d210b49cd300e0db153c5eec1d51384b6889855a076ee62d07 SHA512 3120455e9513f62f82108539c5a4ccb4e9aa64beb66f816644e559bb8b573ff582c865c6a346ca39c6afb775c0c5fd567f5d31f0a0c5b927d6be849cd2905749
DIST cuda_11.3.1_465.19.01_linux.run 3158494112 BLAKE2B 0316c6a9bf062f2503c94604b51dea9a8d19c516e304e43ccdbc79f305a242664b7f029f7b7086edd7adc37d92a3bae074f005b3be412e1361917794cb824686 SHA512 e2db8b4dcb5f6aee2c3e8a8a6848186cdcdd7cd9d5f4bfd069bd3dc2ea500797c66a4592f0e28dcbee6c3611d1f88b6fda6afcd734aa9ef45f4aa17a1527aedb
DIST cuda_11.4.0_470.42.01_linux.run 3773273383 BLAKE2B 2e466728b6ca9d17dc3caadce13b58c8ba1464c2adeb09739f428aea96f5794c87bf84ca2b81c1019d45223ff5e519503d798032a800a370c7e41517d790f5c4 SHA512 17165102e7f64da77588fd47feeee5ce3f3151a2b482bdc005427ad77ada5d0ff5a51dcd40a27a467cd5988968469476ba90b0191aed993806d284833a08ccb1
DIST cuda_9.2.88_396.26_linux.run 1758421686 BLAKE2B 5068b2dfae87e43c124a6a72ac98b7c562aebc7161e7c977cfba68342127e99705228be531aa5bb8af0318e17c4ef8fe36257452d0f507fc3b82e3fbd0184bdc SHA512 2d0d87926e11a1b21d6d3377138753df458a53ba9539d8399f9f252e0784cb41e2c63a5c724ca81ded82b9657b97fda51d812b467b0827e7d361aa2ad73b2dba
EBUILD nvidia-cuda-toolkit-10.2.89-r3.ebuild 3925 BLAKE2B 5b193f9ba23ffe42a4a23a5e4dc0b526246286fa27c14b7d1bf41e50e24ab46c619f73e371bc1c0034ecd549839631c9f184b2ece8499150e9fa6350ed137add SHA512 30b1a97475666e9e19a1390ebac946d9c1c1b8c61fd35a44239ed751b53943eb66b4002e3b17bf9dff33d45a730db7b1b7c4d0a57cc09bac38609822eebe9fa6
EBUILD nvidia-cuda-toolkit-11.1.1-r2.ebuild 6238 BLAKE2B f658446f6f597fabcf7314ecd1f468ba9823047ea2344f6505672af159377902389ad430d80cc3a4bcfbfb7731824b2ecd9a7d7e5558a00dabe7a01984aae99c SHA512 d84f04a2995c7baeffa2ffae64e907af1476835c0cfc07b869d1736a7dd168d70cf49a1be139990e17d42b4ee60fc0770480f2a9d6d2bfc4d20b23c483f64c14
-EBUILD nvidia-cuda-toolkit-11.2.0-r3.ebuild 7237 BLAKE2B d9e22b5cb70aa5306ecb5c70692b47180275172353305e6515baec6c958296429401db81ab76d35957421e1edfece4ed51c93dc7751e94a3c763cb19d92a952b SHA512 c97785b209842e30c793281d20464451c1422f058ee03dddc6f3e9e749a18d9e00ac4a8f6217f2a470ed35da20bb9993fb9122e354c94ab0b090452e673fed01
EBUILD nvidia-cuda-toolkit-11.2.2.ebuild 7119 BLAKE2B cb904f01e369415a5386873c6da3d4d89dbad96e998c47190fc5f6eef2261df4d7bc96c508eb19031fc15a6dd7fd5340bfeb544f79f4fa1b7fdcb7109c1f764d SHA512 366005e64ce6ab58d61956a341dbf654df9876003581ef500dafb3e35c7a86af120267390365de55c91927bcb4edea08722708385be32fce0bad34cd7cc7b070
-EBUILD nvidia-cuda-toolkit-11.3.0-r1.ebuild 7126 BLAKE2B 1417c62e28d49a822e0cbbc66180fde635d7afbb84aadd082f940fc32abd99eb48986f69f790bf050e4a2ffb1b4e0cdb67b31aa49cd52ca03b4bdcbb05a2c6ea SHA512 0fb0ffd74ee3c975dba827cb113b3793e99c6a9c11f439abcdd8ffdac95f0c7ad60910926b0e1cad540fec1dacc0a1791c6a2fe9018d6b0c2a7892dea647d366
EBUILD nvidia-cuda-toolkit-11.3.1.ebuild 7121 BLAKE2B 4e1a8edfedd8972445ec7eb413b86707f6accc3acfdda75620a4e14a36376205843cc73872b8e35845e6526cb147e64132d7c4cdc29e3ae218b559e67c3fda39 SHA512 46b28a75e4adea42d6ef06065a38aa13c4bb0acd1ff924b0e81ddf2f8b437b1e18bef85b81d3c40cb58e05934fa645ec08dbea5c2972d09bb0998f0c7a36eb4b
EBUILD nvidia-cuda-toolkit-11.4.0.ebuild 7121 BLAKE2B 0db4166fc71c33c2bdf52c56e3ba17d502dbd20fbebb6ac65ba5887cefac8504e9af40584e3cd354fd25ee4f4c49eb39c87f04df418e2aabbda7838c937c3931 SHA512 99eea9176c4b611fa769c7be7da58afbad579eb2c732490136bd218d5aea73217fd4b4bb0259d00eb150617fbf6d4c76433cf528c6f7ea1381a1ee30227376a1
EBUILD nvidia-cuda-toolkit-9.2.88-r1.ebuild 3340 BLAKE2B d7d1519306fe876262beef0f711c596db067cfb50c7352157d6067dbda117c04f96bd0d6822d80c025c37a25f0d5cfa43cda9d776bef94d0206d0a07dd6279f4 SHA512 1533d650246c23e44f7392f17e0edcbc1cfb9ab3b7c9afc166ab8674410fed1f766b994956e3de914e726edd8b767372e62ba497fcc8935701b80e292c728317
diff --git a/dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-11.2.0-nsight-systems-launcher.patch b/dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-11.2.0-nsight-systems-launcher.patch
deleted file mode 100644
index 721514729c5c..000000000000
--- a/dev-util/nvidia-cuda-toolkit/files/nvidia-cuda-toolkit-11.2.0-nsight-systems-launcher.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/builds/integration/nsight-systems/nsight-sys
-+++ b/builds/integration/nsight-systems/nsight-sys
-@@ -24,7 +24,7 @@
-
- DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
- CUDA_INSTALL_DIR=$(cd "$DIR/.." && pwd)
--try_exec "$CUDA_INSTALL_DIR"/nsight-systems-2020.4.3/host-linux-x64/nsight-sys "$@"
--try_exec /opt/nvidia/nsight-systems/2020.4.3/host-linux-x64/nsight-sys "$@"
-+try_exec "$CUDA_INSTALL_DIR"/nsight-systems-2020.4.3/host-linux-x64/nsys-ui "$@"
-+try_exec /opt/nvidia/nsight-systems/2020.4.3/host-linux-x64/nsys-ui "$@"
-
- die "Error: Nsight Systems 2020.4.3 hasn't been installed with CUDA Toolkit 11.2"
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.0-r3.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.0-r3.ebuild
deleted file mode 100644
index 4e8988a19e88..000000000000
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.0-r3.ebuild
+++ /dev/null
@@ -1,257 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit check-reqs toolchain-funcs unpacker
-
-DRIVER_PV="460.27.04"
-
-DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)"
-HOMEPAGE="https://developer.nvidia.com/cuda-zone"
-SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run"
-
-LICENSE="NVIDIA-CUDA"
-SLOT="0/${PV}"
-KEYWORDS="-* ~amd64 ~amd64-linux"
-IUSE="debugger nsight profiler vis-profiler sanitizer"
-RESTRICT="bindist mirror"
-
-BDEPEND=""
-RDEPEND="
- <sys-devel/gcc-11_pre[cxx]
- >=x11-drivers/nvidia-drivers-${DRIVER_PV}
- debugger? (
- dev-libs/openssl
- sys-libs/libtermcap-compat
- sys-libs/ncurses-compat:5[tinfo]
- )
- vis-profiler? (
- dev-libs/openssl
- >=virtual/jre-1.8:*
- )"
-
-S="${WORKDIR}"
-
-QA_PREBUILT="opt/cuda/*"
-CHECKREQS_DISK_BUILD="6800M"
-
-PATCHES=( "${FILESDIR}"/${P}-nsight-systems-launcher.patch )
-
-pkg_setup() {
- check-reqs_pkg_setup
-}
-
-src_prepare() {
- local cuda_supported_gcc
-
- # ATTENTION: change requires revbump
- cuda_supported_gcc="4.7 4.8 4.9 5.3 5.4 6.3 6.4 7.2 7.3 8.2 8.3 8.4 9.2 9.3 10.2"
-
- sed \
- -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
- "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
-
- default
-}
-
-src_install() {
- local cudadir=/opt/cuda
- local ecudadir="${EPREFIX}${cudadir}"
- local pathextradirs ldpathextradirs
- dodir ${cudadir}
- into ${cudadir}
-
- # Install standard sub packages
- local builddirs=(
- builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx}
- builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg}
- $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "")
- $(usex vis-profiler "builds/cuda_nvvp" "")
- $(usex debugger "builds/cuda_gdb" "")
- )
-
- local d f
- for d in "${builddirs[@]}"; do
- ebegin "Installing ${d}"
- [[ -d ${d} ]] || die "Directory does not exist: ${d}"
-
- if [[ -d ${d}/bin ]]; then
- for f in ${d}/bin/*; do
- if [[ -f ${f} ]]; then
- dobin "${f}"
- else
- insinto ${cudadir}/bin
- doins -r "${f}"
- fi
- done
- fi
-
- insinto ${cudadir}
- if [[ -d ${d}/targets ]]; then
- doins -r "${d}"/targets
- fi
- if [[ -d ${d}/share ]]; then
- doins -r "${d}"/share
- fi
- if [[ -d ${d}/extras ]]; then
- doins -r "${d}"/extras
- fi
- eend
- done
- dobin "${T}"/cuda-config
-
- doins builds/EULA.txt
- # nvml and nvvm need special handling
- ebegin "Installing nvvm"
- doins -r builds/cuda_nvcc/nvvm
- fperms +x ${cudadir}/nvvm/bin/cicc
- eend
-
- ebegin "Installing nvml"
- doins -r builds/cuda_nvml_dev/nvml
- eend
-
- if use sanitizer; then
- ebegin "Installing sanitizer"
- dobin builds/integration/Sanitizer/compute-sanitizer
- doins -r builds/cuda_sanitizer_api/compute-sanitizer
- # special handling for the executable
- fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer
- eend
- fi
-
- use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64"
-
- if use vis-profiler; then
- ebegin "Installing libnvvp"
- doins -r builds/cuda_nvvp/libnvvp
- # special handling for the executable
- fperms +x ${cudadir}/libnvvp/nvvp
- eend
- pathextradirs+=":${ecudadir}/libnvvp"
- fi
-
- if use nsight; then
- local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml)
- ebegin "Installing ${ncu_dir}"
- mv builds/nsight_compute builds/${ncu_dir} || die
- doins -r builds/${ncu_dir}
-
- # check this list on every bump
- local exes=(
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu
- )
-
- dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli}
- eend
-
- local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml)
- ebegin "Installing ${nsys_dir}"
- mv builds/nsight_systems builds/${nsys_dir} || die
- doins -r builds/${nsys_dir}
-
- # check this list on every bump
- exes+=(
- ${nsys_dir}/host-linux-x64/nsys-ui
- ${nsys_dir}/host-linux-x64/nsys-ui.bin
- ${nsys_dir}/host-linux-x64/ResolveSymbols
- ${nsys_dir}/host-linux-x64/ImportNvtxt
- ${nsys_dir}/host-linux-x64/CrashReporter
- ${nsys_dir}/host-linux-x64/QdstrmImporter
- ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess
- ${nsys_dir}/target-linux-x64/nsys
- ${nsys_dir}/target-linux-x64/launcher
- ${nsys_dir}/target-linux-x64/nvgpucs
- ${nsys_dir}/target-linux-x64/nsys-launcher
- ${nsys_dir}/target-linux-x64/sqlite3
- ${nsys_dir}/target-linux-x64/python/bin/python
- )
-
- dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui}
- eend
-
- # nsight scripts and binaries need to have their executable bit set, #691284
- for f in "${exes[@]}"; do
- fperms +x ${cudadir}/${f}
- done
-
- # remove foreign archs (triggers SONAME warning, #749903)
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die
- rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die
-
- # TODO: unbundle qt5
- # TODO: unbundle boost
- # TODO: unbundle icu
- # TODO: unbundle openssl
- # TODO: unbundle mesa
- # TODO: unbundle libz
- # TODO: unbundle libstdc++
- # TODO: unbundle libSshClient
- # TODO: unbundle sqlite
- # TODO: unbundle libpfm ?
- fi
-
- # Add include and lib symlinks
- dosym targets/x86_64-linux/include ${cudadir}/include
- dosym targets/x86_64-linux/lib ${cudadir}/lib64
-
- newenvd - 99cuda <<-EOF
- PATH=${ecudadir}/bin${pathextradirs}
- ROOTPATH=${ecudadir}/bin
- LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs}
- EOF
-
- # Cuda prepackages libraries, don't revdep-build on them
- insinto /etc/revdep-rebuild
- newins - 80${PN} <<-EOF
- SEARCH_DIRS_MASK="${ecudadir}"
- EOF
- # TODO: Add pkgconfig files for installed libraries
-}
-
-pkg_postinst_check() {
- local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)"
- local b="0.0"
- local v
- for v in ${a}; do
- ver_test "${v}" -gt "${b}" && b="${v}"
- done
-
- # if gcc and if not gcc-version is at least greatest supported
- if tc-is-gcc && \
- ver_test $(gcc-version) -gt "${b}"; then
- ewarn
- ewarn "gcc > ${b} will not work with CUDA"
- ewarn "Make sure you set an earlier version of gcc with gcc-config"
- ewarn "or append --compiler-bindir= pointing to a gcc bindir like"
- ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}"
- ewarn "to the nvcc compiler flags"
- ewarn
- fi
-}
-
-pkg_postinst() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- pkg_postinst_check
- fi
-
- if use profiler || use nsight; then
- einfo
- einfo "nvidia-drivers restrict access to performance counters."
- einfo "You'll need to either run profiling tools (nvprof, nsight) "
- einfo "using sudo (needs cap SYS_ADMIN) or add the following line to "
- einfo "a modprobe configuration file "
- einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): "
- einfo
- einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0"
- einfo
- fi
-}
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.0-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.0-r1.ebuild
deleted file mode 100644
index 3f17f8437a86..000000000000
--- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.0-r1.ebuild
+++ /dev/null
@@ -1,253 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit check-reqs toolchain-funcs unpacker
-
-DRIVER_PV="465.19.01"
-
-DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)"
-HOMEPAGE="https://developer.nvidia.com/cuda-zone"
-SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run"
-
-LICENSE="NVIDIA-CUDA"
-SLOT="0/${PV}"
-KEYWORDS="-* ~amd64 ~amd64-linux"
-IUSE="debugger nsight profiler vis-profiler sanitizer"
-RESTRICT="bindist mirror"
-
-BDEPEND=""
-RDEPEND="
- <sys-devel/gcc-11_pre[cxx]
- >=x11-drivers/nvidia-drivers-${DRIVER_PV}
- debugger? (
- dev-libs/openssl
- sys-libs/libtermcap-compat
- sys-libs/ncurses-compat:5[tinfo]
- )
- vis-profiler? (
- dev-libs/openssl
- >=virtual/jre-1.8:*
- )"
-
-S="${WORKDIR}"
-
-QA_PREBUILT="opt/cuda/*"
-CHECKREQS_DISK_BUILD="6800M"
-
-pkg_setup() {
- check-reqs_pkg_setup
-}
-
-src_prepare() {
- # ATTENTION: change requires revbump
- local cuda_supported_gcc="6.5 7.5 8.4 9.3 10.2 10.3"
-
- sed \
- -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
- "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
-
- default
-}
-
-src_install() {
- local cudadir=/opt/cuda
- local ecudadir="${EPREFIX}${cudadir}"
- local pathextradirs ldpathextradirs
- dodir ${cudadir}
- into ${cudadir}
-
- # Install standard sub packages
- local builddirs=(
- builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust}
- builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg}
- $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "")
- $(usex vis-profiler "builds/cuda_nvvp" "")
- $(usex debugger "builds/cuda_gdb" "")
- )
-
- local d f
- for d in "${builddirs[@]}"; do
- ebegin "Installing ${d}"
- [[ -d ${d} ]] || die "Directory does not exist: ${d}"
-
- if [[ -d ${d}/bin ]]; then
- for f in ${d}/bin/*; do
- if [[ -f ${f} ]]; then
- dobin "${f}"
- else
- insinto ${cudadir}/bin
- doins -r "${f}"
- fi
- done
- fi
-
- insinto ${cudadir}
- if [[ -d ${d}/targets ]]; then
- doins -r "${d}"/targets
- fi
- if [[ -d ${d}/share ]]; then
- doins -r "${d}"/share
- fi
- if [[ -d ${d}/extras ]]; then
- doins -r "${d}"/extras
- fi
- eend
- done
- dobin "${T}"/cuda-config
-
- doins builds/EULA.txt
- # nvml and nvvm need special handling
- ebegin "Installing nvvm"
- doins -r builds/cuda_nvcc/nvvm
- fperms +x ${cudadir}/nvvm/bin/cicc
- eend
-
- ebegin "Installing nvml"
- doins -r builds/cuda_nvml_dev/nvml
- eend
-
- if use sanitizer; then
- ebegin "Installing sanitizer"
- dobin builds/integration/Sanitizer/compute-sanitizer
- doins -r builds/cuda_sanitizer_api/compute-sanitizer
- # special handling for the executable
- fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer
- eend
- fi
-
- use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64"
-
- if use vis-profiler; then
- ebegin "Installing libnvvp"
- doins -r builds/cuda_nvvp/libnvvp
- # special handling for the executable
- fperms +x ${cudadir}/libnvvp/nvvp
- eend
- pathextradirs+=":${ecudadir}/libnvvp"
- fi
-
- if use nsight; then
- local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml)
- ebegin "Installing ${ncu_dir}"
- mv builds/nsight_compute builds/${ncu_dir} || die
- doins -r builds/${ncu_dir}
-
- # check this list on every bump
- local exes=(
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui
- ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper
- ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu
- )
-
- dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli}
- eend
-
- local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml)
- ebegin "Installing ${nsys_dir}"
- mv builds/nsight_systems builds/${nsys_dir} || die
- doins -r builds/${nsys_dir}
-
- # check this list on every bump
- exes+=(
- ${nsys_dir}/host-linux-x64/nsys-ui
- ${nsys_dir}/host-linux-x64/nsys-ui.bin
- ${nsys_dir}/host-linux-x64/ResolveSymbols
- ${nsys_dir}/host-linux-x64/ImportNvtxt
- ${nsys_dir}/host-linux-x64/CrashReporter
- ${nsys_dir}/host-linux-x64/QdstrmImporter
- ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess
- ${nsys_dir}/target-linux-x64/nsys
- ${nsys_dir}/target-linux-x64/launcher
- ${nsys_dir}/target-linux-x64/nvgpucs
- ${nsys_dir}/target-linux-x64/nsys-launcher
- ${nsys_dir}/target-linux-x64/sqlite3
- ${nsys_dir}/target-linux-x64/python/bin/python
- )
-
- dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui}
- eend
-
- # nsight scripts and binaries need to have their executable bit set, #691284
- for f in "${exes[@]}"; do
- fperms +x ${cudadir}/${f}
- done
-
- # remove foreign archs (triggers SONAME warning, #749903)
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die
- rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die
- rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die
-
- # TODO: unbundle qt5
- # TODO: unbundle boost
- # TODO: unbundle icu
- # TODO: unbundle openssl
- # TODO: unbundle mesa
- # TODO: unbundle libz
- # TODO: unbundle libstdc++
- # TODO: unbundle libSshClient
- # TODO: unbundle sqlite
- # TODO: unbundle libpfm ?
- fi
-
- # Add include and lib symlinks
- dosym targets/x86_64-linux/include ${cudadir}/include
- dosym targets/x86_64-linux/lib ${cudadir}/lib64
-
- newenvd - 99cuda <<-EOF
- PATH=${ecudadir}/bin${pathextradirs}
- ROOTPATH=${ecudadir}/bin
- LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs}
- EOF
-
- # Cuda prepackages libraries, don't revdep-build on them
- insinto /etc/revdep-rebuild
- newins - 80${PN} <<-EOF
- SEARCH_DIRS_MASK="${ecudadir}"
- EOF
- # TODO: Add pkgconfig files for installed libraries
-}
-
-pkg_postinst_check() {
- local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)"
- local b="0.0"
- local v
- for v in ${a}; do
- ver_test "${v}" -gt "${b}" && b="${v}"
- done
-
- # if gcc and if not gcc-version is at least greatest supported
- if tc-is-gcc && \
- ver_test $(gcc-version) -gt "${b}"; then
- ewarn
- ewarn "gcc > ${b} will not work with CUDA"
- ewarn "Make sure you set an earlier version of gcc with gcc-config"
- ewarn "or append --compiler-bindir= pointing to a gcc bindir like"
- ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}"
- ewarn "to the nvcc compiler flags"
- ewarn
- fi
-}
-
-pkg_postinst() {
- if [[ ${MERGE_TYPE} != binary ]]; then
- pkg_postinst_check
- fi
-
- if use profiler || use nsight; then
- einfo
- einfo "nvidia-drivers restrict access to performance counters."
- einfo "You'll need to either run profiling tools (nvprof, nsight) "
- einfo "using sudo (needs cap SYS_ADMIN) or add the following line to "
- einfo "a modprobe configuration file "
- einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): "
- einfo
- einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0"
- einfo
- fi
-}