From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/nvidia-cuda-toolkit/
Date: Mon, 28 Jun 2021 08:46:33 +0000 (UTC) [thread overview]
Message-ID: <1624869966.a1c343a9d4fa30b48a8ad3beb83043ee12a0c94d.soap@gentoo> (raw)
commit: a1c343a9d4fa30b48a8ad3beb83043ee12a0c94d
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 28 08:46:06 2021 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jun 28 08:46:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1c343a9
dev-util/nvidia-cuda-toolkit: add 11.3.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>
dev-util/nvidia-cuda-toolkit/Manifest | 1 +
.../nvidia-cuda-toolkit-11.3.1.ebuild | 253 +++++++++++++++++++++
2 files changed, 254 insertions(+)
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest
index 8a4ad6bc0f4..7899f2d63dd 100644
--- a/dev-util/nvidia-cuda-toolkit/Manifest
+++ b/dev-util/nvidia-cuda-toolkit/Manifest
@@ -3,4 +3,5 @@ DIST cuda_11.1.1_455.32.00_linux.run 3532172082 BLAKE2B f4af6bd87c419c002b4913ea
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_9.2.88_396.26_linux.run 1758421686 BLAKE2B 5068b2dfae87e43c124a6a72ac98b7c562aebc7161e7c977cfba68342127e99705228be531aa5bb8af0318e17c4ef8fe36257452d0f507fc3b82e3fbd0184bdc SHA512 2d0d87926e11a1b21d6d3377138753df458a53ba9539d8399f9f252e0784cb41e2c63a5c724ca81ded82b9657b97fda51d812b467b0827e7d361aa2ad73b2dba
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild
new file mode 100644
index 00000000000..60cb5fa59a9
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs cuda 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"
+S="${WORKDIR}"
+
+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:*
+ )"
+
+QA_PREBUILT="opt/cuda/*"
+CHECKREQS_DISK_BUILD="6800M"
+
+pkg_setup() {
+ # We don't like to run cuda_pkg_setup as it depends on us
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ # ATTENTION: change requires revbump
+ local cuda_supported_gcc="8.5 9.3 9.4 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
+}
next reply other threads:[~2021-06-28 8:46 UTC|newest]
Thread overview: 127+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 8:46 David Seifert [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-09-11 9:59 [gentoo-commits] repo/gentoo:master commit in: dev-util/nvidia-cuda-toolkit/ David Seifert
2024-08-27 15:49 David Seifert
2024-07-19 7:25 David Seifert
2024-06-30 14:46 David Seifert
2024-06-06 12:50 David Seifert
2024-06-06 9:38 David Seifert
2024-04-07 9:37 David Seifert
2024-04-07 9:37 David Seifert
2024-03-30 18:35 David Seifert
2024-02-02 10:35 David Seifert
2024-01-03 21:15 David Seifert
2023-12-03 16:49 David Seifert
2023-11-21 12:37 David Seifert
2023-10-31 14:59 David Seifert
2023-10-31 14:59 David Seifert
2023-09-23 9:37 David Seifert
2023-09-04 14:28 David Seifert
2023-08-23 9:02 David Seifert
2023-08-14 7:57 Benda XU
2023-08-11 11:57 David Seifert
2023-07-29 9:41 David Seifert
2023-07-08 12:24 Andreas K. Hüttel
2023-06-29 10:18 David Seifert
2023-06-29 10:18 David Seifert
2023-06-27 14:26 David Seifert
2023-06-27 14:26 David Seifert
2023-06-27 13:11 David Seifert
2023-06-07 6:47 Guilherme Amadio
2023-05-14 21:13 David Seifert
2023-04-18 7:14 Guilherme Amadio
2023-03-30 8:52 David Seifert
2023-02-19 12:24 David Seifert
2023-02-13 9:56 Guilherme Amadio
2022-12-17 19:55 Sam James
2022-11-22 20:52 Sam James
2022-11-19 7:52 Sam James
2022-11-19 7:52 Sam James
2022-11-19 7:44 Sam James
2022-11-19 4:48 David Seifert
2022-11-10 5:06 Arthur Zamarin
2022-10-23 19:57 David Seifert
2022-10-18 18:43 David Seifert
2022-08-22 12:30 David Seifert
2022-06-17 12:55 David Seifert
2022-06-16 16:30 Sam James
2022-06-09 9:28 Guilherme Amadio
2022-03-28 12:43 Guilherme Amadio
2022-02-23 9:48 Guilherme Amadio
2022-01-14 14:02 David Seifert
2021-12-20 10:57 David Seifert
2021-12-05 20:55 David Seifert
2021-12-04 16:37 David Seifert
2021-11-26 20:17 David Seifert
2021-11-09 15:59 Guilherme Amadio
2021-10-21 11:58 David Seifert
2021-10-21 11:58 David Seifert
2021-09-24 9:26 David Seifert
2021-09-09 20:04 David Seifert
2021-08-23 14:23 David Seifert
2021-08-23 8:57 David Seifert
2021-08-13 16:51 David Seifert
2021-08-10 22:03 David Seifert
2021-08-01 4:14 Sam James
2021-07-14 22:45 Marek Szuba
2021-07-14 22:45 Marek Szuba
2021-06-30 21:21 David Seifert
2021-04-30 14:54 David Seifert
2021-04-29 9:14 Guilherme Amadio
2021-04-29 8:47 Guilherme Amadio
2021-04-29 8:42 Guilherme Amadio
2021-04-29 8:42 Guilherme Amadio
2021-04-24 13:24 David Seifert
2021-04-09 15:15 David Seifert
2021-03-21 15:53 David Seifert
2021-02-14 15:49 David Seifert
2021-01-10 20:51 David Seifert
2020-12-27 20:09 David Seifert
2020-12-27 20:09 David Seifert
2020-12-07 11:05 David Seifert
2020-10-24 8:38 Jason Zaman
2020-09-29 7:29 Guilherme Amadio
2020-09-20 13:27 David Seifert
2020-06-27 11:04 Andreas Sturmlechner
2020-06-27 10:21 Pacho Ramos
2020-05-13 4:00 Benda XU
2020-02-16 20:35 David Seifert
2020-02-16 20:35 David Seifert
2020-02-16 20:24 David Seifert
2020-02-16 13:35 Jason Zaman
2019-12-05 17:02 Jason Zaman
2019-12-02 14:50 Jason Zaman
2019-12-02 14:50 Jason Zaman
2019-12-01 12:04 Benda XU
2019-11-13 8:44 Benda XU
2019-10-09 18:31 Jason Zaman
2019-10-01 19:14 Michał Górny
2019-06-24 13:28 Jason Zaman
2019-04-29 13:29 Jason Zaman
2019-04-05 15:41 Jason Zaman
2019-04-05 15:41 Jason Zaman
2018-11-30 15:26 Jason Zaman
2018-06-07 10:36 Alexey Shvetsov
2018-01-26 21:42 David Seifert
2017-12-10 14:13 Michał Górny
2017-11-26 11:39 David Seifert
2017-11-13 14:30 Guilherme Amadio
2017-11-10 13:25 Guilherme Amadio
2017-07-06 8:56 Guilherme Amadio
2017-05-20 21:24 Michał Górny
2017-03-02 7:50 David Seifert
2017-01-02 23:00 Justin Lecher
2017-01-02 22:09 Justin Lecher
2016-12-21 16:24 Tobias Klausmann
2016-12-11 15:11 Justin Lecher
2016-12-11 12:58 Justin Lecher
2016-12-11 11:21 Justin Lecher
2016-10-27 12:33 Mikhail Pukhlikov
2016-10-26 21:32 David Seifert
2016-04-20 15:19 Ian Stakenvicius
2016-01-11 8:27 Justin Lecher
2015-10-12 11:43 Justin Lecher
2015-09-17 18:28 Justin Lecher
2015-09-17 7:31 Justin Lecher
2015-09-17 7:30 Justin Lecher
2015-09-17 7:17 Justin Lecher
2015-09-09 9:49 Justin Lecher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1624869966.a1c343a9d4fa30b48a8ad3beb83043ee12a0c94d.soap@gentoo \
--to=soap@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox