From 8af89d087539c7e161df2f14ecfdb76f4cf66241 Mon Sep 17 00:00:00 2001 From: Connor Baker Date: Thu, 23 Oct 2025 16:47:29 -0700 Subject: [PATCH] cudaPackages: allow expressions to be used with older versions of CUDA Signed-off-by: Connor Baker --- .../cuda-modules/packages/cuda_gdb.nix | 22 +- .../cuda-modules/packages/cuda_nvprof.nix | 6 + .../cuda-modules/packages/cuda_nvrtc.nix | 12 +- .../cuda-modules/packages/libcudla.nix | 5 + .../cuda-modules/packages/libcufile.nix | 7 +- .../cuda-modules/packages/libcusolver.nix | 13 +- .../cuda-modules/packages/libcusparse.nix | 11 +- .../cuda-modules/packages/libnvjitlink.nix | 10 +- .../cuda-modules/packages/nsight_compute.nix | 182 +++++++------ .../cuda-modules/packages/nsight_systems.nix | 244 ++++++++++-------- .../cuda-modules/packages/tensorrt.nix | 2 +- 11 files changed, 306 insertions(+), 208 deletions(-) diff --git a/pkgs/development/cuda-modules/packages/cuda_gdb.nix b/pkgs/development/cuda-modules/packages/cuda_gdb.nix index 0eb1e56f65c2..8dc2812fd325 100644 --- a/pkgs/development/cuda-modules/packages/cuda_gdb.nix +++ b/pkgs/development/cuda-modules/packages/cuda_gdb.nix @@ -23,17 +23,17 @@ buildRedist { allowFHSReferences = true; - buildInputs = [ - gmp - ] - # aarch64, sbsa needs expat - ++ lib.optionals backendStdenv.hostPlatform.isAarch64 [ expat ] - # From 12.5, cuda-gdb comes with Python TUI wrappers - ++ lib.optionals (cudaAtLeast "12.5") [ - libxcrypt-legacy - ncurses - python3 - ]; + buildInputs = + # only needs gmp from 12.0 and on + lib.optionals (cudaAtLeast "12.0") [ gmp ] + # aarch64, sbsa needs expat + ++ lib.optionals backendStdenv.hostPlatform.isAarch64 [ expat ] + # From 12.5, cuda-gdb comes with Python TUI wrappers + ++ lib.optionals (cudaAtLeast "12.5") [ + libxcrypt-legacy + ncurses + python3 + ]; # Remove binaries requiring Python3 versions we do not have postInstall = lib.optionalString (cudaAtLeast "12.5") '' diff --git a/pkgs/development/cuda-modules/packages/cuda_nvprof.nix b/pkgs/development/cuda-modules/packages/cuda_nvprof.nix index 2b8f1bbd379c..994e6ea1126d 100644 --- a/pkgs/development/cuda-modules/packages/cuda_nvprof.nix +++ b/pkgs/development/cuda-modules/packages/cuda_nvprof.nix @@ -1,6 +1,9 @@ { + backendStdenv, buildRedist, cuda_cupti, + cudaAtLeast, + lib, }: buildRedist { redistName = "cuda"; @@ -10,6 +13,9 @@ buildRedist { outputs = [ "out" + ] + # The `bin` and `lib` output are only available on SBSA starting with CUDA 11.8. + ++ lib.optionals (backendStdenv.hostRedistSystem != "linux-sbsa" || cudaAtLeast "11.8") [ "bin" "lib" ]; diff --git a/pkgs/development/cuda-modules/packages/cuda_nvrtc.nix b/pkgs/development/cuda-modules/packages/cuda_nvrtc.nix index 88828bd15050..d3cc276ab67e 100644 --- a/pkgs/development/cuda-modules/packages/cuda_nvrtc.nix +++ b/pkgs/development/cuda-modules/packages/cuda_nvrtc.nix @@ -1,4 +1,8 @@ -{ buildRedist }: +{ + buildRedist, + cudaAtLeast, + lib, +}: buildRedist { redistName = "cuda"; pname = "cuda_nvrtc"; @@ -8,9 +12,9 @@ buildRedist { "dev" "include" "lib" - "static" - "stubs" - ]; + ] + ++ lib.optionals (cudaAtLeast "11.5") [ "static" ] + ++ [ "stubs" ]; allowFHSReferences = true; diff --git a/pkgs/development/cuda-modules/packages/libcudla.nix b/pkgs/development/cuda-modules/packages/libcudla.nix index fc82b278786a..a24a06b80b36 100644 --- a/pkgs/development/cuda-modules/packages/libcudla.nix +++ b/pkgs/development/cuda-modules/packages/libcudla.nix @@ -1,6 +1,7 @@ { backendStdenv, buildRedist, + cudaMajorMinorVersion, lib, }: buildRedist { @@ -17,6 +18,10 @@ buildRedist { autoPatchelfIgnoreMissingDeps = [ "libnvcudla.so" + ] + ++ lib.optionals (cudaMajorMinorVersion == "11.8") [ + "libcuda.so.1" + "libnvdla_runtime.so" ]; platformAssertions = [ diff --git a/pkgs/development/cuda-modules/packages/libcufile.nix b/pkgs/development/cuda-modules/packages/libcufile.nix index c68303395213..c32a0d0478f1 100644 --- a/pkgs/development/cuda-modules/packages/libcufile.nix +++ b/pkgs/development/cuda-modules/packages/libcufile.nix @@ -1,5 +1,7 @@ { buildRedist, + cudaOlder, + lib, numactl, rdma-core, }: @@ -17,14 +19,17 @@ buildRedist { allowFHSReferences = true; + # TODO(@connorbaker): At some point before 12.6, libcufile depends on libcublas. buildInputs = [ numactl rdma-core ]; + # Before 11.7 libcufile depends on itself for some reason. autoPatchelfIgnoreMissingDeps = [ "libcuda.so.1" - ]; + ] + ++ lib.optionals (cudaOlder "11.7") [ "libcufile.so.0" ]; meta = { description = "Library to leverage GDS technology"; diff --git a/pkgs/development/cuda-modules/packages/libcusolver.nix b/pkgs/development/cuda-modules/packages/libcusolver.nix index 90a9f6de8f37..0ff5e26d7d52 100644 --- a/pkgs/development/cuda-modules/packages/libcusolver.nix +++ b/pkgs/development/cuda-modules/packages/libcusolver.nix @@ -1,5 +1,6 @@ { buildRedist, + cudaAtLeast, lib, libcublas, libcusparse, @@ -18,11 +19,13 @@ buildRedist { "stubs" ]; - buildInputs = [ - (lib.getLib libcublas) - (lib.getLib libcusparse) - libnvjitlink - ]; + buildInputs = + # Always depends on this + [ (lib.getLib libcublas) ] + # Dependency from 12.0 and on + ++ lib.optionals (cudaAtLeast "12.0") [ libnvjitlink ] + # Dependency from 12.1 and on + ++ lib.optionals (cudaAtLeast "12.1") [ (lib.getLib libcusparse) ]; meta = { description = "Collection of dense and sparse direct linear solvers and Eigen solvers"; diff --git a/pkgs/development/cuda-modules/packages/libcusparse.nix b/pkgs/development/cuda-modules/packages/libcusparse.nix index 9553d2da4903..959cbf8d343b 100644 --- a/pkgs/development/cuda-modules/packages/libcusparse.nix +++ b/pkgs/development/cuda-modules/packages/libcusparse.nix @@ -1,4 +1,9 @@ -{ buildRedist, libnvjitlink }: +{ + buildRedist, + cudaAtLeast, + lib, + libnvjitlink, +}: buildRedist { redistName = "cuda"; pname = "libcusparse"; @@ -12,7 +17,9 @@ buildRedist { "stubs" ]; - buildInputs = [ libnvjitlink ]; + buildInputs = + # Dependency from 12.0 and on + lib.optionals (cudaAtLeast "12.0") [ libnvjitlink ]; meta = { description = "GPU-accelerated basic linear algebra subroutines for sparse matrix computations for unstructured sparsity"; diff --git a/pkgs/development/cuda-modules/packages/libnvjitlink.nix b/pkgs/development/cuda-modules/packages/libnvjitlink.nix index 4124d3fa86a6..c641cea10d38 100644 --- a/pkgs/development/cuda-modules/packages/libnvjitlink.nix +++ b/pkgs/development/cuda-modules/packages/libnvjitlink.nix @@ -1,4 +1,8 @@ -{ buildRedist }: +{ + buildRedist, + cudaAtLeast, + lib, +}: buildRedist { redistName = "cuda"; pname = "libnvjitlink"; @@ -9,8 +13,8 @@ buildRedist { "include" "lib" "static" - "stubs" - ]; + ] + ++ lib.optionals (cudaAtLeast "12.2") [ "stubs" ]; meta = { description = "APIs which can be used at runtime to link together GPU device code"; diff --git a/pkgs/development/cuda-modules/packages/nsight_compute.nix b/pkgs/development/cuda-modules/packages/nsight_compute.nix index 6173decdff4d..6f7f1d0772b2 100644 --- a/pkgs/development/cuda-modules/packages/nsight_compute.nix +++ b/pkgs/development/cuda-modules/packages/nsight_compute.nix @@ -2,12 +2,16 @@ backendStdenv, buildRedist, cudaAtLeast, + cudaMajorMinorVersion, cudaOlder, e2fsprogs, elfutils, flags, + gst_all_1, lib, - qt6, + libjpeg8, + qt5 ? null, + qt6 ? null, rdma-core, ucx, }: @@ -20,86 +24,116 @@ let .${backendStdenv.hostPlatform.system} or (throw "Unsupported system: ${backendStdenv.hostPlatform.system}"); in -buildRedist { - redistName = "cuda"; - pname = "nsight_compute"; +buildRedist ( + finalAttrs: + let + qt = if lib.versionOlder finalAttrs.version "2022.2.0" then qt5 else qt6; + qtwayland = + if lib.versions.major qt.qtbase.version == "5" then + lib.getBin qt.qtwayland + else + lib.getLib qt.qtwayland; + inherit (qt) wrapQtAppsHook qtwebengine qtwebview; + in + { + redistName = "cuda"; + pname = "nsight_compute"; - # NOTE(@connorbaker): It might be a problem that when nsight_compute contains hosts and targets of different - # architectures, that we patchelf just the binaries matching the builder's platform; autoPatchelfHook prints - # messages like - # skipping [$out]/host/linux-desktop-glibc_2_11_3-x64/libQt6Core.so.6 because its architecture (x64) differs from - # target (AArch64) - outputs = [ "out" ]; + # NOTE(@connorbaker): It might be a problem that when nsight_compute contains hosts and targets of different + # architectures, that we patchelf just the binaries matching the builder's platform; autoPatchelfHook prints + # messages like + # skipping [$out]/host/linux-desktop-glibc_2_11_3-x64/libQt6Core.so.6 because its architecture (x64) differs from + # target (AArch64) + outputs = [ "out" ]; - allowFHSReferences = true; + allowFHSReferences = true; - nativeBuildInputs = [ qt6.wrapQtAppsHook ]; + nativeBuildInputs = [ wrapQtAppsHook ]; - buildInputs = [ - (lib.getLib qt6.qtwayland) - qt6.qtwebview - qt6.qtwebengine - rdma-core - ] - ++ lib.optionals (cudaOlder "12.7") [ - e2fsprogs - ucx - ] - ++ lib.optionals (cudaAtLeast "12.9") [ elfutils ]; + buildInputs = [ + (lib.getLib qtwayland) + qtwebengine + qtwebview + rdma-core + ] + ++ lib.optionals (cudaMajorMinorVersion == "12.0" && backendStdenv.hostPlatform.isAarch64) [ + libjpeg8 + ] + ++ lib.optionals (cudaAtLeast "12.1" && cudaOlder "12.4") [ + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + ] + ++ lib.optionals (cudaAtLeast "12.0" && cudaOlder "12.7") [ + e2fsprogs + ucx + ] + ++ lib.optionals (cudaAtLeast "12.9") [ elfutils ]; - dontWrapQtApps = true; + dontWrapQtApps = true; - preInstall = '' - if [[ -d nsight-compute ]]; then - nixLog "Lifting components of Nsight Compute to the top level" - mv -v nsight-compute/*/* . - nixLog "Removing empty directories" - rmdir -pv nsight-compute/* - fi + preInstall = '' + if [[ -d nsight-compute ]]; then + nixLog "Lifting components of Nsight Compute to the top level" + mv -v nsight-compute/*/* . + nixLog "Removing empty directories" + rmdir -pv nsight-compute/* + fi - rm -rf host/${archDir}/Mesa/ + rm -rf host/${archDir}/Mesa/ - patchShebangs . - ''; - - postInstall = '' - moveToOutput 'ncu' "''${!outputBin}/bin" - moveToOutput 'ncu-ui' "''${!outputBin}/bin" - moveToOutput 'host/${archDir}' "''${!outputBin}/bin" - moveToOutput 'target/${archDir}' "''${!outputBin}/bin" - wrapQtApp "''${!outputBin}/bin/host/${archDir}/ncu-ui.bin" - '' - # NOTE(@connorbaker): No idea what this platform is or how to patchelf for it. - + lib.optionalString (flags.isJetsonBuild && cudaOlder "12.9") '' - nixLog "Removing QNX 700 target directory for Jetson builds" - rm -rfv "''${!outputBin}/target/qnx-700-t210-a64" - '' - + lib.optionalString (flags.isJetsonBuild && cudaAtLeast "12.8") '' - nixLog "Removing QNX 800 target directory for Jetson builds" - rm -rfv "''${!outputBin}/target/qnx-800-tegra-a64" - ''; - - # lib needs libtiff.so.5, but nixpkgs provides libtiff.so.6 - preFixup = '' - patchelf --replace-needed libtiff.so.5 libtiff.so "''${!outputBin}/bin/host/${archDir}/Plugins/imageformats/libqtiff.so" - ''; - - autoPatchelfIgnoreMissingDeps = [ - "libcuda.so.1" - "libnvidia-ml.so.1" - ]; - - meta = { - description = "Interactive profiler for CUDA and NVIDIA OptiX"; - longDescription = '' - NVIDIA Nsight Compute is an interactive profiler for CUDA and NVIDIA OptiX that provides detailed performance - metrics and API debugging via a user interface and command-line tool. Users can run guided analysis and compare - results with a customizable and data-driven user interface, as well as post-process and analyze results in their - own workflows. + patchShebangs . ''; - homepage = "https://developer.nvidia.com/nsight-compute"; - changelog = "https://docs.nvidia.com/nsight-compute/ReleaseNotes"; - mainProgram = "ncu"; - }; -} + postInstall = '' + moveToOutput 'ncu' "''${!outputBin}/bin" + moveToOutput 'ncu-ui' "''${!outputBin}/bin" + moveToOutput 'host/${archDir}' "''${!outputBin}/bin" + moveToOutput 'target/${archDir}' "''${!outputBin}/bin" + wrapQtApp "''${!outputBin}/bin/host/${archDir}/ncu-ui.bin" + '' + # NOTE(@connorbaker): No idea what this platform is or how to patchelf for it. + + lib.optionalString (flags.isJetsonBuild && cudaAtLeast "11.8" && cudaOlder "12.9") '' + nixLog "Removing QNX 700 target directory for Jetson builds" + rm -rfv "''${!outputBin}/target/qnx-700-t210-a64" + '' + + lib.optionalString (flags.isJetsonBuild && cudaAtLeast "12.8") '' + nixLog "Removing QNX 800 target directory for Jetson builds" + rm -rfv "''${!outputBin}/target/qnx-800-tegra-a64" + ''; + + # lib needs libtiff.so.5, but nixpkgs provides libtiff.so.6 + preFixup = '' + patchelf --replace-needed libtiff.so.5 libtiff.so "''${!outputBin}/bin/host/${archDir}/Plugins/imageformats/libqtiff.so" + ''; + + autoPatchelfIgnoreMissingDeps = [ + "libcuda.so.1" + "libnvidia-ml.so.1" + ]; + + brokenAssertions = [ + { + message = "Qt 5 is required and available"; + assertion = lib.versionOlder finalAttrs.version "2022.2.0" -> qt5 != null; + } + { + message = "Qt 6 is required and available"; + assertion = lib.versionAtLeast finalAttrs.version "2022.2.0" -> qt6 != null; + } + ]; + + meta = { + description = "Interactive profiler for CUDA and NVIDIA OptiX"; + longDescription = '' + NVIDIA Nsight Compute is an interactive profiler for CUDA and NVIDIA OptiX that provides detailed performance + metrics and API debugging via a user interface and command-line tool. Users can run guided analysis and compare + results with a customizable and data-driven user interface, as well as post-process and analyze results in their + own workflows. + ''; + homepage = "https://developer.nvidia.com/nsight-compute"; + changelog = "https://docs.nvidia.com/nsight-compute/ReleaseNotes"; + + mainProgram = "ncu"; + }; + } +) diff --git a/pkgs/development/cuda-modules/packages/nsight_systems.nix b/pkgs/development/cuda-modules/packages/nsight_systems.nix index 1bf7392494ed..3f575214a2ef 100644 --- a/pkgs/development/cuda-modules/packages/nsight_systems.nix +++ b/pkgs/development/cuda-modules/packages/nsight_systems.nix @@ -2,21 +2,21 @@ backendStdenv, boost178, buildRedist, + cudaAtLeast, e2fsprogs, gst_all_1, lib, nss, numactl, pulseaudio, - qt6, + qt5 ? null, + qt6 ? null, rdma-core, ucx, wayland, xorg, }: let - qtwayland = lib.getLib qt6.qtwayland; - qtWaylandPlugins = "${qtwayland}/${qt6.qtbase.qtPluginPrefix}"; # NOTE(@connorbaker): nsight_systems doesn't support Jetson, so no need for case splitting on aarch64-linux. hostDir = { @@ -33,114 +33,144 @@ let .${backendStdenv.hostPlatform.system} or (throw "Unsupported system: ${backendStdenv.hostPlatform.system}"); in -buildRedist { - redistName = "cuda"; - pname = "nsight_systems"; +buildRedist ( + finalAttrs: + let + qt = if lib.strings.versionOlder finalAttrs.version "2022.4.2.1" then qt5 else qt6; + qtwayland = + if lib.versions.major qt.qtbase.version == "5" then + lib.getBin qt.qtwayland + else + lib.getLib qt.qtwayland; + qtWaylandPlugins = "${qtwayland}/${qt.qtbase.qtPluginPrefix}"; + inherit (qt) wrapQtAppsHook qtwebengine; + in + { + redistName = "cuda"; + pname = "nsight_systems"; - allowFHSReferences = true; + allowFHSReferences = true; - outputs = [ "out" ]; + outputs = [ "out" ]; - # An ad hoc replacement for - # https://github.com/ConnorBaker/cuda-redist-find-features/issues/11 - env.rmPatterns = toString [ - "${hostDir}/lib{arrow,jpeg}*" - "${hostDir}/lib{ssl,ssh,crypto}*" - "${hostDir}/libboost*" - "${hostDir}/libexec" - "${hostDir}/libstdc*" - "${hostDir}/python/bin/python" - "${hostDir}/Mesa" - ]; + # An ad hoc replacement for + # https://github.com/ConnorBaker/cuda-redist-find-features/issues/11 + env.rmPatterns = toString [ + "${hostDir}/lib{arrow,jpeg}*" + "${hostDir}/lib{ssl,ssh,crypto}*" + "${hostDir}/libboost*" + "${hostDir}/libexec" + "${hostDir}/libstdc*" + "${hostDir}/python/bin/python" + "${hostDir}/Mesa" + ]; - # NOTE(@connorbaker): nsight-exporter and nsight-sys are deprecated scripts wrapping nsys, it's fine to remove them. - prePatch = '' - if [[ -d bin ]]; then - nixLog "Removing bin wrapper scripts" - for knownWrapper in bin/{nsys{,-ui},nsight-{exporter,sys}}; do - [[ -e $knownWrapper ]] && rm -v "$knownWrapper" - done - unset -v knownWrapper + # NOTE(@connorbaker): nsight-exporter and nsight-sys are deprecated scripts wrapping nsys, it's fine to remove them. + prePatch = '' + if [[ -d bin ]]; then + nixLog "Removing bin wrapper scripts" + for knownWrapper in bin/{nsys{,-ui},nsight-{exporter,sys}}; do + [[ -e $knownWrapper ]] && rm -v "$knownWrapper" + done + unset -v knownWrapper - nixLog "Removing empty bin directory" - rmdir -v bin - fi + nixLog "Removing empty bin directory" + rmdir -v bin + fi - if [[ -d nsight-systems ]]; then - nixLog "Lifting components of Nsight System to the top level" - mv -v nsight-systems/*/* . - nixLog "Removing empty nsight-systems directory" - rmdir -pv nsight-systems/* - fi - ''; - - postPatch = '' - for path in $rmPatterns; do - rm -r "$path" - done - patchShebangs nsight-systems - ''; - - nativeBuildInputs = [ qt6.wrapQtAppsHook ]; - - dontWrapQtApps = true; - - buildInputs = [ - qt6.qtdeclarative - qt6.qtsvg - qt6.qtimageformats - qt6.qtpositioning - qt6.qtscxml - qt6.qttools - qt6.qtwebengine - qt6.qtwayland - boost178 - e2fsprogs - gst_all_1.gst-plugins-base - gst_all_1.gstreamer - nss - numactl - pulseaudio - qt6.qtbase - qtWaylandPlugins - rdma-core - ucx - wayland - xorg.libXcursor - xorg.libXdamage - xorg.libXrandr - xorg.libXtst - ] - # NOTE(@connorbaker): Seems to be required only for aarch64-linux. - ++ lib.optionals backendStdenv.hostPlatform.isAarch64 [ - gst_all_1.gst-plugins-bad - ]; - - postInstall = '' - moveToOutput '${hostDir}' "''${!outputBin}" - moveToOutput '${targetDir}' "''${!outputBin}" - moveToOutput 'bin' "''${!outputBin}" - wrapQtApp "''${!outputBin}/${hostDir}/nsys-ui.bin" - ''; - - # lib needs libtiff.so.5, but nixpkgs provides libtiff.so.6 - preFixup = '' - patchelf --replace-needed libtiff.so.5 libtiff.so "''${!outputBin}/${hostDir}/Plugins/imageformats/libqtiff.so" - ''; - - autoPatchelfIgnoreMissingDeps = [ - "libcuda.so.1" - "libnvidia-ml.so.1" - ]; - - meta = { - description = "System-wide performance analysis and visualization tool"; - longDescription = '' - NVIDIA Nsight Systems is a system-wide performance analysis tool designed to visualize an application's - algorithms, identify the largest opportunities to optimize, and tune to scale efficiently across any quantity or - size of CPUs and GPUs, from large servers to our smallest systems-on-a-chip (SoCs). + if [[ -d nsight-systems ]]; then + nixLog "Lifting components of Nsight System to the top level" + mv -v nsight-systems/*/* . + nixLog "Removing empty nsight-systems directory" + rmdir -pv nsight-systems/* + fi ''; - homepage = "https://developer.nvidia.com/nsight-systems"; - changelog = "https://docs.nvidia.com/nsight-systems/ReleaseNotes"; - }; -} + + postPatch = '' + for path in $rmPatterns; do + rm -r "$path" + done + patchShebangs nsight-systems + ''; + + nativeBuildInputs = [ wrapQtAppsHook ]; + + dontWrapQtApps = true; + + # TODO(@connorbaker): Fix dependencies for earlier (CUDA <12.6) versions of nsight_systems. + buildInputs = [ + qt6.qtdeclarative + qt6.qtsvg + qt6.qtimageformats + qt6.qtpositioning + qt6.qtscxml + qt6.qttools + qtwebengine + qt6.qtwayland + boost178 + e2fsprogs + gst_all_1.gst-plugins-base + gst_all_1.gstreamer + nss + numactl + pulseaudio + qt6.qtbase + qtWaylandPlugins + rdma-core + ucx + wayland + xorg.libXcursor + xorg.libXdamage + xorg.libXrandr + xorg.libXtst + ] + # NOTE(@connorbaker): Seems to be required only for aarch64-linux. + ++ lib.optionals (backendStdenv.hostPlatform.isAarch64 && cudaAtLeast "11.8") [ + gst_all_1.gst-plugins-bad + ]; + + postInstall = '' + moveToOutput '${hostDir}' "''${!outputBin}" + moveToOutput '${targetDir}' "''${!outputBin}" + moveToOutput 'bin' "''${!outputBin}" + wrapQtApp "''${!outputBin}/${hostDir}/nsys-ui.bin" + ''; + + # lib needs libtiff.so.5, but nixpkgs provides libtiff.so.6 + preFixup = '' + patchelf --replace-needed libtiff.so.5 libtiff.so "''${!outputBin}/${hostDir}/Plugins/imageformats/libqtiff.so" + ''; + + autoPatchelfIgnoreMissingDeps = [ + "libcuda.so.1" + "libnvidia-ml.so.1" + ]; + + brokenAssertions = [ + { + # Boost 1.70 has been deprecated in Nixpkgs; releases older than the one for CUDA 11.8 are not supported. + message = "Boost 1.70 is required and available"; + assertion = lib.versionAtLeast finalAttrs.version "2022.4.2.1"; + } + { + message = "Qt 5 is required and available"; + assertion = lib.versionOlder finalAttrs.version "2022.4.2.1" -> qt5 != null; + } + { + message = "Qt 6 is required and available"; + assertion = lib.versionAtLeast finalAttrs.version "2022.4.2.1" -> qt6 != null; + } + ]; + + meta = { + description = "System-wide performance analysis and visualization tool"; + longDescription = '' + NVIDIA Nsight Systems is a system-wide performance analysis tool designed to visualize an application's + algorithms, identify the largest opportunities to optimize, and tune to scale efficiently across any quantity or + size of CPUs and GPUs, from large servers to our smallest systems-on-a-chip (SoCs). + ''; + homepage = "https://developer.nvidia.com/nsight-systems"; + changelog = "https://docs.nvidia.com/nsight-systems/ReleaseNotes"; + }; + } +) diff --git a/pkgs/development/cuda-modules/packages/tensorrt.nix b/pkgs/development/cuda-modules/packages/tensorrt.nix index 377d8d19ee2f..0a1192090e90 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt.nix @@ -87,7 +87,7 @@ buildRedist ( fi ''; - autoPatchelfIgnoreMissingDeps = optionals libcudla.meta.available [ + autoPatchelfIgnoreMissingDeps = optionals hasJetsonCudaCapability [ "libnvdla_compiler.so" ];