8e800cedaf
cudaPackages.cuda_compat: ignore missing libs provided at runtime cudaPackages.gpus: Jetson should never build by default cudaPackages.flags: don't build Jetson capabilities by default cudaPackages: re-introduce filter for pre-existing CUDA redist packages in overrides cudaPackages: only recurseIntoAttrs for the latest of each major version cudaPackages.nvccCompatabilities: use GCC 10 through CUDA 11.5 to avoid a GLIBC incompatability cudaPackages.cutensor: acquire libcublas through cudatoolkit prior to 11.4 cudaPackages.cuda_compat: mark as broken on aarch64-linux if not targeting Jetson cudaPackages.cutensor_1_4: fix build cudaPackages: adjust use of autoPatchelfIgnoreMissingDeps cudaPackages.cuda_nvprof: remove unecessary override to add addOpenGLRunpath cudaPackages: use getExe' to avoid patchelf warning about missing meta.mainProgram cudaPackages: fix evaluation with Nix 2.3 cudaPackages: fix platform detection for Jetson/non-Jetson aarch64-linux python3Packages.tensorrt: mark as broken if required packages are missing Note: evaluating the name of the derivation will fail if tensorrt is not present, which is why we wrap the value in `lib.optionalString`. cudaPackages.flags.getNixSystem: add guard based on jetsonTargets cudaPackages.cudnn: use explicit path to patchelf cudaPackages.tensorrt: use explicit path to patchelf
39 lines
1.5 KiB
Nix
39 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
nvccCompatibilities,
|
|
cudaVersion,
|
|
buildPackages,
|
|
overrideCC,
|
|
stdenv,
|
|
wrapCCWith,
|
|
}:
|
|
let
|
|
gccMajorVersion = nvccCompatibilities.${cudaVersion}.gccMaxMajorVersion;
|
|
# We use buildPackages (= pkgsBuildHost) because we look for a gcc that
|
|
# runs on our build platform, and that produces executables for the host
|
|
# platform (= platform on which we deploy and run the downstream packages).
|
|
# The target platform of buildPackages.gcc is our host platform, so its
|
|
# .lib output should be the libstdc++ we want to be writing in the runpaths
|
|
# Cf. https://github.com/NixOS/nixpkgs/pull/225661#discussion_r1164564576
|
|
nixpkgsCompatibleLibstdcxx = buildPackages.gcc.cc.lib;
|
|
nvccCompatibleCC = buildPackages."gcc${gccMajorVersion}".cc;
|
|
|
|
cc = wrapCCWith {
|
|
cc = nvccCompatibleCC;
|
|
|
|
# This option is for clang's libcxx, but we (ab)use it for gcc's libstdc++.
|
|
# Note that libstdc++ maintains forward-compatibility: if we load a newer
|
|
# libstdc++ into the process, we can still use libraries built against an
|
|
# older libstdc++. This, in practice, means that we should use libstdc++ from
|
|
# the same stdenv that the rest of nixpkgs uses.
|
|
# We currently do not try to support anything other than gcc and linux.
|
|
libcxx = nixpkgsCompatibleLibstdcxx;
|
|
};
|
|
cudaStdenv = overrideCC stdenv cc;
|
|
passthruExtra = {
|
|
inherit nixpkgsCompatibleLibstdcxx;
|
|
# cc already exposed
|
|
};
|
|
assertCondition = true;
|
|
in
|
|
lib.extendDerivation assertCondition passthruExtra cudaStdenv
|