diff options
Diffstat (limited to 'dev-util/nvidia-cuda-toolkit')
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/Manifest | 10 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.7.0-r4.ebuild | 275 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r4.ebuild (renamed from dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r3.ebuild) | 12 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.0.1-r1.ebuild | 293 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.0-r1.ebuild | 308 | ||||
-rw-r--r-- | dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1-r1.ebuild (renamed from dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1.ebuild) | 27 |
6 files changed, 25 insertions, 900 deletions
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest index 15159413c926..c108768ef55d 100644 --- a/dev-util/nvidia-cuda-toolkit/Manifest +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -1,12 +1,6 @@ AUX cuda-config.in 407 BLAKE2B 5f7a0d50d774db58c180b767f00bead7c7dbf5f6b3b4a2f960dfc3b8450f7abf5c2b67c6620c5318f1331646dd2003d61c70a4c31359efd16ff418ecc9d0b446 SHA512 363903b999c43a47a48c52e8898c6044fadcc66d259338ee22863e859c2bc9873a2f1392aa83c9182486d3aa4eaeb5f164cf8ccf29cc74fd8ad56245f76a039a -DIST cuda_11.7.0_515.43.04_linux.run 3490450898 BLAKE2B f5984a3ae67a116f7944d8e1c2b3b0a25b41aa5081bff869dd30ea2213cc96d23459dffdfd84ec145d5a860bd683d81d212f331939d7b39f9d9b5f17c838f13c SHA512 070c9a4b3bb11503d99212cf483ead88ae182e7da7eabd7390a0211b57ea550fb8a806ed3c009b8bae654529a7dc6c11dd35c0d59066f6f4eebe064c94d4e071 DIST cuda_11.8.0_520.61.05_linux.run 4336730777 BLAKE2B cfdb4a51c49ee504e56a4a95de4e477ef207b678527cbb633c1e83e667f1a62c0f67038befd0b10f7ae24cda9c8bc5c54293d06a05b2e45be6cf677e40f71f17 SHA512 e96e1389abed34b5093b3a1d4e6ae9f3d4f8406621b1475f378efae65868657efce22da03b5b4e0a548d9635e406b8690b18b17b186d03ecb3ca0703c5d5787a -DIST cuda_12.0.1_525.85.12_linux.run 4207617207 BLAKE2B d99b70b253decb03f37e73c783771b50aa057c02b31a4fa629c4ba2ac91dce8f87b8316d205ee1393ab936e19aebd7753cff339d00f91dcd4cfe7a968f98364e SHA512 edd73c6e989e8469d73a8a8c4c927aa0654c1c299eff77c8b30dafd5da6e4e368626cec48978785f8e94fe8d1b7b73f1df6d5d03a80a6f58a07fa2d1f15c7f86 -DIST cuda_12.1.0_530.30.02_linux.run 4245586997 BLAKE2B 96695088ceef502da79f701d45d2706491e3dadd615776501125ca402e8f4f036dfc5e8d0b6b6cceea460e53ec2431b20bdaef5527c1e0d5cdea51a8e9b01704 SHA512 4a224475aa4baa202999c919c312615cee30283830a0a6a88ca24834548f8392dbc747fbb5fc8291797dff358c369b099cdd8a18a0e83f0768de747a3a7338de DIST cuda_12.1.1_530.30.02_linux.run 4317456991 BLAKE2B 562865cc63202906d0a5c2511387c3ded069c45576810b3076908730021125188017c96e88704b31f0401e29435f01dd87dfe33ca36fce8122683c27e1b928ea SHA512 2f5b07b6253a7268afa81345acc8be9fc3ab80f7f5c565d199f72ac74467d562eb83b72f87f33bafa90c88612b16366c3e209cbec1cb0b5907839e5823520323 -EBUILD nvidia-cuda-toolkit-11.7.0-r4.ebuild 7971 BLAKE2B 3c4d3872c27748286432d4880bba46e61c16c98e1cf6536c96a461bdf5bb33bc608f91f5806054b8bc441eb6614b04b8a9d97267d7f76d7c8ffeb0234fba19d3 SHA512 d0a32abbbb5700f3bd6925a380cca95cd03ff0a0fc77dfd259410359b8a785464fe81d91391741b01a56dd788d6e90019aa6d06237f19f4829b48041cf6250fc -EBUILD nvidia-cuda-toolkit-11.8.0-r3.ebuild 7996 BLAKE2B 2b33d330b9865a62ef5789035107958034f26d16d416a1589c04e6d2444e94ecf752584043d1e55828baa3f1aa7a790dd1450edbe88b00a50793192fdbd29cb3 SHA512 3c4efaf3363dbe8e7d3bdd8b838d53bda3c4bbb029dee4bd389a8b0efa6d274b5cda1f5e62bfec45f1984771d08ac2a62e0836f94461824928e0e47828d03067 -EBUILD nvidia-cuda-toolkit-12.0.1-r1.ebuild 8695 BLAKE2B 29756d28b9e67350051556dee977dca4725309c372759abb9568f13b10885ab849782dab914aa230b38ab1de2646e81d07002dcb097b6ea4940352c3951e2982 SHA512 5fb8240ed117c299ed2935c5a57734740d46e5d62c7d6deeab896442d4fb59977b476e566399c1008b706547a0163d03bb9006ca8534021e240360f9a9d1f913 -EBUILD nvidia-cuda-toolkit-12.1.0-r1.ebuild 9138 BLAKE2B 9d90f50b37656dca322bd568bf07a6c226cbe0e6be529f4dea5dd8844ff9a77b6935d78ad19254d47350212b4d24cee9f49a0d18d73452a8242c406a08885269 SHA512 88aeb612b7adef115ee27b6dbcf0969da2689f72c0f01e5487719f43132a76aa2c62df7807c376a029fbcd19ce443390c744ac688645752a14fadbced3e85b23 -EBUILD nvidia-cuda-toolkit-12.1.1.ebuild 9136 BLAKE2B 9d347a48b68ce7642fc70ffc7e7fac1afeebf832323852c7152617d19570aebdc6e42900f47b559f376ff6b2fd99aff656a4d8f1bad730c54e9aa587638af27d SHA512 a5788c2fe73e915b21ed1e16ddf4df1db2a8a0873b3ec431c858c4c5001e33af08e0b57ef3355ff252e7021d84b7852c1c9c98579d60a4ce622ea5e128724e4f +EBUILD nvidia-cuda-toolkit-11.8.0-r4.ebuild 7954 BLAKE2B 36c445919fa5e4473586238183d096d21c6a28fac216e8f787f8b8f65fd83bf14262aa4ea9df746271f0949add5915f5e5da30f3d6735374fe35a7878822f329 SHA512 77fd07e4e1b41abc445e768c27c728d5da497f8d1222e980b3d2deab5ec6acf6e5a753e002ca7e60d9ca4e253780eb32782d9e42aaa8fe8e70dfed5a70596291 +EBUILD nvidia-cuda-toolkit-12.1.1-r1.ebuild 9279 BLAKE2B edd0a07f5995a7ef15c58ff385e5c6e7046f6530f469a1650a39c8f2a3d5ebdb7c1b662b34f93f49f722a7fc93d9b5930b5ed5e9f2c1021a6990415a7e47a2e2 SHA512 f6326ab72edc7d3c0ad612018f0a112f7f70b46bc0b308b4928c552d35515ceacb7b79c85fca0f990f233008200ab5bd6e0a986bd60f1d7b7938ef8011351b20 MISC metadata.xml 761 BLAKE2B a6ae653c6206cbc05349297499b6dde91bce6d543e10bd5ea915cfe9729dfa6f1eb954ae09c2e4d3997f51315ae090b38606c21b5099e750596ea66fdd93e817 SHA512 9133517d805201d25b651e48abed90394c88ef33a2571ab20b3b19d365f85a90478486c7c087c9150d7d9f6e4026873c5236c64ed649fd3bfc8f9b81479dcc59 diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.7.0-r4.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.7.0-r4.ebuild deleted file mode 100644 index 6522048a1f71..000000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.7.0-r4.ebuild +++ /dev/null @@ -1,275 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="515.43.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" -S="${WORKDIR}" - -LICENSE="NVIDIA-CUDA" -SLOT="0/${PV}" -KEYWORDS="-* ~amd64 ~amd64-linux" -IUSE="debugger nsight profiler vis-profiler sanitizer" -RESTRICT="bindist mirror" - -# since CUDA 11, the bundled toolkit driver (== ${DRIVER_PV}) and the -# actual required minimum driver version are different. Lowering the -# bound helps Kepler sm_35 and sm_37 users. -# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-major-component-versions -RDEPEND=" - <sys-devel/gcc-12_pre[cxx] - >=x11-drivers/nvidia-drivers-450.80.02 - nsight? ( - dev-libs/libpfm - dev-libs/wayland - || ( - dev-libs/openssl-compat:1.1.1 - =dev-libs/openssl-1.1.1* - ) - || ( - media-libs/tiff-compat:4 - media-libs/tiff:0/0 - ) - sys-libs/zlib - ) - vis-profiler? ( - >=virtual/jre-1.8:* - )" - -QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="6800M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - # ATTENTION: change requires revbump - local cuda_supported_gcc="8.5 9.4 9.5 10 10.3 10.4 11 11.1 11.2 11.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_{cccl,cudart,cuobjdump,cuxxfilt,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}/ncu - ${ncu_dir}/ncu-ui - ${ncu_dir}/nv-nsight-cu - ${ncu_dir}/nv-nsight-cu-cli - ${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/OpenGLVersionChecker - ${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 - - # unbundle libstdc++ - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die - - # unbundle openssl - rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libssl.so* || die - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libssl.so* || die - - # unbundle libz - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libz.so* || die - - # unbundle libpfm - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libpfm.so* || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle mesa - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - 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.8.0-r3.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r4.ebuild index b1bad01426b7..81874e5dce5f 100644 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r3.ebuild +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -28,14 +28,12 @@ RDEPEND=" nsight? ( dev-libs/libpfm dev-libs/wayland + dev-qt/qtwayland:6 || ( dev-libs/openssl-compat:1.1.1 =dev-libs/openssl-1.1.1* ) - || ( - media-libs/tiff-compat:4 - media-libs/tiff:0/0 - ) + media-libs/tiff-compat:4 sys-libs/zlib ) vis-profiler? ( @@ -43,7 +41,7 @@ RDEPEND=" )" QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="6800M" +CHECKREQS_DISK_BUILD="15000M" pkg_setup() { check-reqs_pkg_setup @@ -51,7 +49,7 @@ pkg_setup() { src_prepare() { # ATTENTION: change requires revbump - local cuda_supported_gcc="8.5 9.4 9.5 10 10.3 10.4 11 11.1 11.2 11.3" + local cuda_supported_gcc="8.5 9.5 10 11" sed \ -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.0.1-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.0.1-r1.ebuild deleted file mode 100644 index c3abce45c73a..000000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.0.1-r1.ebuild +++ /dev/null @@ -1,293 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="525.85.12" - -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" - -# since CUDA 11, the bundled toolkit driver (== ${DRIVER_PV}) and the -# actual required minimum driver version are different. Lowering the -# bound helps Kepler sm_35 and sm_37 users. -# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-major-component-versions -RDEPEND=" - <sys-devel/gcc-13_pre[cxx] - >=x11-drivers/nvidia-drivers-525.60.13 - nsight? ( - dev-libs/libpfm - dev-libs/wayland - || ( - dev-libs/openssl-compat:1.1.1 - =dev-libs/openssl-1.1.1* - ) - media-libs/tiff-compat:4 - sys-libs/zlib - ) - vis-profiler? ( - >=virtual/jre-1.8:* - )" - -QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="7500M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - # ATTENTION: change requires revbump, see link below for supported GCC # versions - # https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements - local cuda_supported_gcc="8.5 9.4 9.5 10 10.3 10.4 11 11.1 11.2 11.3 12 12.1 12.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_{cccl,cudart,cuobjdump,cuxxfilt,demo_suite,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,opencl} - builds/lib{cublas,cufft,cufile,curand,cusolver,cusparse,npp,nvjitlink,nvjpeg} - builds/nvidia_fs - $(usex profiler "builds/cuda_nvprof builds/cuda_cupti builds/cuda_profiler_api" "") - $(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 debugger && ldpathextradirs+=":${ecudadir}/extras/Debugger/lib64" - 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}/ncu - ${ncu_dir}/ncu-ui - ${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/OpenGLVersionChecker - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/QdstrmImporter - ${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/TreeLauncherSubreaper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu - ) - - dobin builds/integration/nsight-compute/{ncu,ncu-ui} - 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 - - # unbundle libstdc++ - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die - - # unbundle openssl - rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libssl.so* || die - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libssl.so* || die - - # unbundle libz - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libz.so* || die - - # unbundle libpfm - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libpfm.so* || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle mesa - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - fi - - exes=( - extras/demo_suite/bandwidthTest - extras/demo_suite/busGrind - extras/demo_suite/deviceQuery - extras/demo_suite/nbody - extras/demo_suite/oceanFFT - extras/demo_suite/randomFog - extras/demo_suite/vectorAdd - ) - - # set executable bit on demo_suite binaries - for f in "${exes[@]}"; do - fperms +x ${cudadir}/${f} - done - - # Add include and lib symlinks - dosym targets/x86_64-linux/include ${ecudadir}/include - dosym targets/x86_64-linux/lib ${ecudadir}/lib64 - - # Remove bad symlinks - rm "${ED}"/${cudadir}/targets/x86_64-linux/include/include || die - rm "${ED}"/${cudadir}/targets/x86_64-linux/lib/lib64 || die - - 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-12.1.0-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.0-r1.ebuild deleted file mode 100644 index 138f95c19eb0..000000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.0-r1.ebuild +++ /dev/null @@ -1,308 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="530.30.02" - -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 rdma vis-profiler sanitizer" -RESTRICT="bindist mirror" - -# since CUDA 11, the bundled toolkit driver (== ${DRIVER_PV}) and the -# actual required minimum driver version are different. -RDEPEND=" - <sys-devel/gcc-13_pre[cxx] - >=x11-drivers/nvidia-drivers-525.60.13 - nsight? ( - dev-libs/libpfm - dev-libs/wayland - || ( - dev-libs/openssl-compat:1.1.1 - =dev-libs/openssl-1.1.1* - ) - media-libs/tiff-compat:4 - sys-libs/zlib - ) - rdma? ( sys-cluster/rdma-core ) - vis-profiler? ( - >=virtual/jre-1.8:* - )" -BDEPEND="nsight? ( dev-util/patchelf )" - -QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="15000M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - # ATTENTION: change requires revbump, see link below for supported GCC # versions - # https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements - local cuda_supported_gcc="8.5 9.4 9.5 10 10.3 10.4 11 11.1 11.2 11.3 12 12.1 12.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_{cccl,cudart,cuobjdump,cuxxfilt,demo_suite,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,opencl} - builds/lib{cublas,cufft,cufile,curand,cusolver,cusparse,npp,nvjitlink,nvjpeg} - builds/nvidia_fs - $(usex profiler "builds/cuda_nvprof builds/cuda_cupti builds/cuda_profiler_api" "") - $(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 debugger && ldpathextradirs+=":${ecudadir}/extras/Debugger/lib64" - 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}/ncu - ${ncu_dir}/ncu-ui - ${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/OpenGLVersionChecker - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/QdstrmImporter - ${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/TreeLauncherSubreaper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu - ) - - dobin builds/integration/nsight-compute/{ncu,ncu-ui} - eend $? - - # remove rdma libs (unless USE=rdma) - if ! use rdma; then - rm -r "${ED}"/${cudadir}/${ncu_dir}/host/target-linux-x64/CollectX || die - fi - - 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 - ) - - # remove rdma libs (unless USE=rdma) - if ! use rdma; then - rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-x64/CollectX || die - fi - - 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 - - # fix broken RPATHs - patchelf --set-rpath '$ORIGIN' "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libarrow.so || die - patchelf --set-rpath '$ORIGIN' "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libarrow.so || die - - # 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 - - # unbundle libstdc++ - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die - - # unbundle openssl - rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libssl.so* || die - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libssl.so* || die - - # unbundle libpfm - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libpfm.so* || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle mesa - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - fi - - exes=( - extras/demo_suite/bandwidthTest - extras/demo_suite/busGrind - extras/demo_suite/deviceQuery - extras/demo_suite/nbody - extras/demo_suite/oceanFFT - extras/demo_suite/randomFog - extras/demo_suite/vectorAdd - ) - - # remove rdma libs (unless USE=rdma) - if ! use rdma; then - rm "${ED}"/${cudadir}/targets/x86_64-linux/lib/libcufile_rdma* || die - fi - - # set executable bit on demo_suite binaries - for f in "${exes[@]}"; do - fperms +x ${cudadir}/${f} - done - - # Add include and lib symlinks - dosym targets/x86_64-linux/include ${ecudadir}/include - dosym targets/x86_64-linux/lib ${ecudadir}/lib64 - - # Remove bad symlinks - rm "${ED}"/${cudadir}/targets/x86_64-linux/include/include || die - rm "${ED}"/${cudadir}/targets/x86_64-linux/lib/lib64 || die - - 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 -} - -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-12.1.1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1-r1.ebuild index 62ec30e38401..3d56dff74f93 100644 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1.ebuild +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-12.1.1-r1.ebuild @@ -15,7 +15,7 @@ S="${WORKDIR}" LICENSE="NVIDIA-CUDA" SLOT="0/${PV}" KEYWORDS="-* ~amd64 ~amd64-linux" -IUSE="debugger nsight profiler rdma vis-profiler sanitizer" +IUSE="debugger examples nsight profiler rdma vis-profiler sanitizer" RESTRICT="bindist mirror" # since CUDA 11, the bundled toolkit driver (== ${DRIVER_PV}) and the @@ -23,9 +23,14 @@ RESTRICT="bindist mirror" RDEPEND=" <sys-devel/gcc-13_pre[cxx] >=x11-drivers/nvidia-drivers-525.60.13 + examples? ( + media-libs/freeglut + media-libs/glu + ) nsight? ( dev-libs/libpfm dev-libs/wayland + dev-qt/qtwayland:6 || ( dev-libs/openssl-compat:1.1.1 dev-libs/openssl:0/1.1 @@ -49,7 +54,7 @@ pkg_setup() { src_prepare() { # ATTENTION: change requires revbump, see link below for supported GCC # versions # https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements - local cuda_supported_gcc="8.5 9.4 9.5 10 10.3 10.4 11 11.1 11.2 11.3 12 12.1 12.2" + local cuda_supported_gcc="8.5 9.5 10 11 12" sed \ -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ @@ -227,7 +232,8 @@ src_install() { # TODO: unbundle sqlite fi - exes=( + if use examples; then + local exes=( extras/demo_suite/bandwidthTest extras/demo_suite/busGrind extras/demo_suite/deviceQuery @@ -235,18 +241,21 @@ src_install() { extras/demo_suite/oceanFFT extras/demo_suite/randomFog extras/demo_suite/vectorAdd - ) + ) + + # set executable bit on demo_suite binaries + for f in "${exes[@]}"; do + fperms +x ${cudadir}/${f} + done + else + rm -r "${ED}"/${cudadir}/extras/demo_suite || die + fi # remove rdma libs (unless USE=rdma) if ! use rdma; then rm "${ED}"/${cudadir}/targets/x86_64-linux/lib/libcufile_rdma* || die fi - # set executable bit on demo_suite binaries - for f in "${exes[@]}"; do - fperms +x ${cudadir}/${f} - done - # Add include and lib symlinks dosym targets/x86_64-linux/include ${ecudadir}/include dosym targets/x86_64-linux/lib ${ecudadir}/lib64 |