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/Manifest4
-rw-r--r--dev-util/nvidia-cuda-toolkit/metadata.xml9
-rw-r--r--dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.0.3.ebuild242
3 files changed, 251 insertions, 4 deletions
diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest
index 0325ed210f52..5c192a2cb7b8 100644
--- a/dev-util/nvidia-cuda-toolkit/Manifest
+++ b/dev-util/nvidia-cuda-toolkit/Manifest
@@ -4,6 +4,7 @@ DIST cuda_10.1.105_418.39_linux.run 2423314285 BLAKE2B 924872eaaa4e8ecd6b81765c9
DIST cuda_10.1.168_418.67_linux.run 2526901749 BLAKE2B ed2207400730600c63895cc894e02a14dce59c6293f198ea2a94f6dd0fab25a005d4754f91376c267cb95f3fdc66ee08e4353ec17b69d28881c59190b9eb4746 SHA512 85635012ec7081e200fb46f973852939f9709e802f495c288d5f31ff1fbd283a578fdaca0afa8955e6e0c7ca6c4862428da5168e0938b48390952d8633350910
DIST cuda_10.1.243_418.87.00_linux.run 2572375299 BLAKE2B df9cb4faeeeeecc536e72697c6c73d544219f1b23cacb7fed646b0908fc7e573e85920861d56f76776ba637d84964cd1c789a0fe0d6541a4e0adf618b6c74d3c SHA512 f92b19d0242969a65a6e6db43bc293e442abc07a9e168c9e995692e1a401679504598c782e511be3879e1650b90f71a50bbc63c9ee45654c26b5007cdf33c4fe
DIST cuda_10.2.89_440.33.01_linux.run 2645419389 BLAKE2B 236aa70a7b45e3636c2c229fffa7d1ca0699ab4365865a73edab607a209c42c2899133dd6a83c61c5929fa754668ad15aec4d847639af1c00a8e6657c8487c77 SHA512 ad8da539ff5df7caf411d1e497ff3d6978cfa8a1fd9150fa4846089e92a604ea56be8631f3efdfe7229a655b8d2d28e6edb32f5731530a77d6f00241cc7aab6e
+DIST cuda_11.0.3_450.51.06_linux.run 3112522594 BLAKE2B f458aeebee3f7145f46c5607d1743d350ed96e9b8fd824fd94d2c998bcd8ccf3ef924cf37e95ce002ba92f464edd5004164497e820084953613ec2deb6edb144 SHA512 e7014c868c0bf40c000b1fd14d156265773a399782937cc85a2b09cd62abddcacdc20b412e1cc91c3877d01563cf054b1e021f047b32cfff4ab516e7167382dd
DIST cuda_6.5.14_linux_32.run 76788277 BLAKE2B 75e79dce6cac5155bde8a3cafa945047c489b10272f8a3b94bf55d499df4b9c8b82506a81a20f9fd816bd4fd0514e515a6435399db1cb62b027c76490bd4dfae SHA512 89649ee0f4543b37037b7c8f5ed0b8bd502512afb4d93e3158b3df4786123be05a5288986b5abbfe15c14eb010777d2527b715225bea96a354a898c34e4a2fcc
DIST cuda_6.5.14_linux_64.run 972320904 BLAKE2B 4a4361fb7a90989ec4b4aa433189e7b358e5a2272fb9b9c59429e0014ac14e3b8de1b247ee98dc30c3f3ee4cc009eca4fdd86027bd3b9527a683353d60bdf5c6 SHA512 fecca731b86955f5bc7b09d88b02951e3ee5d4b1f1cf5f92658227a029b87cd35d6ac22956a5fa0afe62dcdc57191f1d12bb08c9f7cc05128727cd8455947b1e
DIST cuda_6.5.19_linux_32.run 81882112 BLAKE2B cf55ef7c969503c156431fc56301ed4e9a1234ae0cb867f12649636069f35e56bf6fc9df7482b6baade45d78c8baa2d98c41a28696da59294e0f575c4a0344ce SHA512 1ce9bd6b472b7e4f1fb181eb340dfcb757714d59a89aaa02146cfe1a97c8ccb7eb7699b4ec823276f277eb4d82d95050eaba17e7ed5fd2e47b9b5d78531c5d4e
@@ -19,6 +20,7 @@ EBUILD nvidia-cuda-toolkit-10.1.105-r3.ebuild 3925 BLAKE2B 6a5bef41d998a705c8abc
EBUILD nvidia-cuda-toolkit-10.1.168-r2.ebuild 3925 BLAKE2B e43bab5926ca7649293281a6a964b93ee639da955519e616fe82b0d607c52874fa153f622496259d3848146ea08b4d447002714b10382ea417be26effe255746 SHA512 379e6ab18e78e5f66fdc9976556e3edc9b8937de57a7e582567e6237cfd5e412637ce0127e84504bb2b750f40062112488bd8a29faf0b8940a8f04d6e68ea1ee
EBUILD nvidia-cuda-toolkit-10.1.243-r3.ebuild 4238 BLAKE2B 07fdf4e6eb0ac919a73b0f9d72e7859446f6c9a4f2500430537e79d8cb6f512659c2a56624bec7d7913723f9e6000ecf83746da30e745a43f7631a17648aecbb SHA512 3a5e9a96999c0f23b05f2b3c7452b0f662985e7e3a0ae94cf0619ffd12c96387d540fc2fa58ba2e69933f6fc046387668b06003a1e9d6efec127254ec3043d34
EBUILD nvidia-cuda-toolkit-10.2.89-r2.ebuild 3992 BLAKE2B 858d1b4db64e393f061a36c3e8f22dfa83bb2e4d083ca5d987eb80b1e74ed2fb51923ecc49a4e32f52291d6ef84e1d82ab257bb345d11225e92be1368b5f4f9d SHA512 047735e7b92f12a7152b950c88d8c6b09da7772a31f4b133c8af5c8295f55d81b312b796b481dd7f6ae6767d3f2632a280533c6bcd5a22ec705dfcbd3933a94b
+EBUILD nvidia-cuda-toolkit-11.0.3.ebuild 6555 BLAKE2B 4637b8fd2819d8f16fbbaf74e3c2aee7738c2fcede4db13c8fb90df55290362db1ba43f9605fb1cbca32053dcad5ccb9e1a28c8408b9a4e07a65bebbac9b8049 SHA512 1d65ed5613c789341a05dc2549954ac4a23e16f23e05d8ed992033edd93361f1d001f8bc955102da37078f425fd790e279cab250ee94e32aa6c549132219c062
EBUILD nvidia-cuda-toolkit-6.5.14.ebuild 3902 BLAKE2B fb559c6ca55638853cede289104f9528bc939f10c20b9c67d168caf6cc3962c06e56f25961a17acfef4c143a95648efbc7d37f2362ef4af3f40d9d289ef88dcf SHA512 c810885c9fd7747d61078fedcefe4180da8aaa4ee7fa8822908f7d8dc649fd488781ea570f9f078c6a91ac7949cef3f112e8fe8a6bca3bb0d662abbe0ba755e9
EBUILD nvidia-cuda-toolkit-6.5.19-r1.ebuild 3928 BLAKE2B a3cc31983db891d496f5172bce661a5f1fd77a10afe0fb4ea1e243121530fc5560257c5846cc240da52986c7e6157feaace7047d0c675d0653144f5a42263a21 SHA512 9705c2ee7e76b5a66b20e08ca84c4ff998405a0816bbdd2e3d56eed21115ca154219d079943966525c71460baafdaf2858e2c7c6e08c44eff45db1be4d8c1f0f
EBUILD nvidia-cuda-toolkit-7.5.18-r2.ebuild 3439 BLAKE2B d1f61624448cdcd69db1a592d6fa4a78004fa8021b591efaa64dcd46263a2803f4983782b87ec9a3a89834e4ed99ab26f7dd706dee2a631887b1ac96b2080d4d SHA512 0c191cb31f5349a7a09c88c1d06e52ce025421a61a2c2bfc925a058b33f855585ccf20d538943c8e7f4d77fd1bb926d16fed76efa467e0a4380ba4b7f93f2c7f
@@ -27,4 +29,4 @@ EBUILD nvidia-cuda-toolkit-8.0.61.ebuild 3435 BLAKE2B f404d22f374dad343031ed38a7
EBUILD nvidia-cuda-toolkit-9.0.176.ebuild 3442 BLAKE2B da89d56a1c4e12b9048f3251464a21aa10b287c294f16e9e03d5182f4f7684efb05ab3c6f7fb0e1b7b326899405ce79f407468f00f04a5b12cfb6a4fcc4ceaca SHA512 469619f9ba3dac697353d0761b47e169833571bc20e3b7f59c124df3bc0237a9d1e8eaca74ffafa0fe615bbc0950cd829b358b10bf6939cd0236f7f37d22f6ff
EBUILD nvidia-cuda-toolkit-9.1.85.ebuild 3418 BLAKE2B 27debd5814eb6814fbffdc2241015663643c5028d6144426bb530705f974383153c3a5a0480e8c3a837fb157811a44dfd3800c58a9e30ba919c91623b32d21a7 SHA512 4972987db01a4826a86386313caa11d27a6f3e7a5c0e87096a7a299a7a83314a10170e9d8f22c3d5dcda29c7ef000824226def568a968ebe668d437193d4f952
EBUILD nvidia-cuda-toolkit-9.2.88.ebuild 3420 BLAKE2B c0b4f78b1a1947b8414ab2dd163365b189edf15b49465c24f104b424bc11b9b92bd36c633226f5b1a4c01b84721247e58b4501952f96f60531ed42b1eebff3f8 SHA512 c9e5bf620e9d29495d623c70a574e5f1847eef4464820229a77c6ceb25b150be5c8d0c2612193b2ba5fd1642d60d8d0a619f679825355cd7bd42cbaea03f1620
-MISC metadata.xml 456 BLAKE2B 9c2baf84429d6969aad82a907a25acb5080bcfb3a5eb996f235ad05ed6ef5345df1c268bee9398c105f5926184f6179f46f98b396397266eef82ee9f6e7db470 SHA512 7745eb56d4a3a9a7d01e3143e807f2018d288c00bcc6c3bd0624c989d4e15ac5521dc087553cd643ff04392c1ac9964578fe03d05947eb2ed4cae21bceb9c67c
+MISC metadata.xml 725 BLAKE2B c1a42a486876a7d4c8c08f3ee49786941c4425be0dc9e0ae1c0e8de672b4512c365cab425e5a4c99cedd34dc559c63f9111f203e9afff0f9717d8cca368d8722 SHA512 de7189cd9928b3becc20a50bedb6ef9c0056815784d24f2f38662faf60d6d1550e2573c6896bedc51d4e365b669d10d460529de18d5c000140760eec8854c2c1
diff --git a/dev-util/nvidia-cuda-toolkit/metadata.xml b/dev-util/nvidia-cuda-toolkit/metadata.xml
index 4b8ba09a6653..27507c5dec4a 100644
--- a/dev-util/nvidia-cuda-toolkit/metadata.xml
+++ b/dev-util/nvidia-cuda-toolkit/metadata.xml
@@ -6,8 +6,11 @@
<name>Gentoo Science Project</name>
</maintainer>
<use>
- <flag name="profiler">Installs the NVIDIA CUDA visual profiler</flag>
- <flag name="debugger">Installs the CUDA debugger</flag>
- <flag name="eclipse">Install plugins for eclipse</flag>
+ <flag name="debugger">Install the CUDA debugger</flag>
+ <flag name="eclipse">Install Eclipse plugins</flag>
+ <flag name="nsight">Install profiling and optimizing tools (nsight-compute, nsight-systems)</flag>
+ <flag name="profiler">Install the NVIDIA CUDA profiler (nvprof) and the related libraries</flag>
+ <flag name="sanitizer">Install compute-sanitiazer tool</flag>
+ <flag name="vis-profiler">Install the NVIDIA CUDA visual profiler (nvvp)</flag>
</use>
</pkgmetadata>
diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.0.3.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.0.3.ebuild
new file mode 100644
index 000000000000..019039d5007a
--- /dev/null
+++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.0.3.ebuild
@@ -0,0 +1,242 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs cuda toolchain-funcs unpacker
+
+DRIVER_PV="450.51.06"
+
+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 doc nsight profiler vis-profiler sanitizer"
+RESTRICT="bindist mirror"
+
+BDEPEND=""
+RDEPEND="
+ <sys-devel/gcc-10[cxx]
+ >=x11-drivers/nvidia-drivers-${DRIVER_PV}[X,uvm]
+ debugger? (
+ dev-libs/openssl-compat:1.0.0
+ sys-libs/libtermcap-compat
+ sys-libs/ncurses-compat:5[tinfo]
+ )
+ vis-profiler? (
+ dev-libs/openssl-compat:1.0.0
+ >=virtual/jre-1.6
+ )"
+
+S="${WORKDIR}"
+
+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() {
+ 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"
+
+ sed \
+ -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
+ "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
+
+ default
+}
+
+src_install() {
+ # Install docs and man pages
+ pushd builds/cuda_documentation >/dev/null || die
+
+ if use doc; then
+ DOCS+=( doc/pdf/. )
+ HTML_DOCS+=( doc/html/. )
+ fi
+ einstalldocs
+
+ mv doc/man/man3/{,cuda-}deprecated.3 || die
+ doman doc/man/man*/*
+
+ popd >/dev/null || die
+
+ local cudadir=/opt/cuda
+ local ecudadir="${EPREFIX}${cudadir}"
+ 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
+ for d in "${builddirs[@]}"; do
+ ebegin "Installing ${d}"
+ [[ -d ${d} ]] || die "Directory does not exist: ${d}"
+
+ if [[ -d ${d}/bin ]]; then
+ local f
+ 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
+ exeinto ${cudadir}/nvvm/bin
+ doexe builds/cuda_nvcc/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/Sanitizer
+ # special handling for the executable
+ exeinto ${cudadir}/Sanitizer
+ doexe builds/cuda_sanitizer_api/Sanitizer/compute-sanitizer
+ eend
+ fi
+
+ if use vis-profiler; then
+ ebegin "Installing libnvvp"
+ doins -r builds/cuda_nvvp/libnvvp
+ # special handling for the executable
+ exeinto ${cudadir}/libnvvp
+ doexe builds/cuda_nvvp/libnvvp/nvvp
+ eend
+ 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}
+
+ exeinto ${cudadir}/${ncu_dir}
+ doexe builds/${ncu_dir}/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli}
+
+ exeinto ${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64
+ doexe builds/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/{ncu-ui,ncu-ui.bin,CrashReporter}
+ 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}
+ exeinto ${cudadir}/${nsys_dir}/target-linux-x64
+ doexe builds/${nsys_dir}/target-linux-x64/nsys
+
+ exeinto ${cudadir}/${nsys_dir}/host-linux-x64
+ doexe builds/${nsys_dir}/host-linux-x64/{nsight-sys,nsight-sys.bin,nsys-ui,CrashReporter,ImportNvtxt,QdstrmImporter,ResolveSymbols}
+ dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui}
+ eend
+ # 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" ${ecudadir}/include
+ dosym "targets/x86_64-linux/lib" ${ecudadir}/lib64
+
+ newenvd - 99cuda <<-EOF
+ PATH=${ecudadir}/bin$(usex vis-profiler ":${ecudadir}/libnvvp" "")
+ ROOTPATH=${ecudadir}/bin
+ LDPATH=${ecudadir}/lib64:${ecudadir}/lib:${ecudadir}/nvvm/lib64
+ EOF
+
+ # Cuda prepackages libraries, don't revdep-build on them
+ insinto /etc/revdep-rebuild
+ newins - 80${PN} <<-EOF
+ SEARCH_DIRS_MASK="${ecudadir}"
+ EOF
+ # TODO: Find a better way to add +x permission to installed executables
+ # 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
+}