cudaPackages_11_4.saxpy: clean(er) eval error

This commit is contained in:
Someone Serge 2024-01-12 17:34:35 +00:00
parent 875e43dfd7
commit 18b114d8bf
No known key found for this signature in database
GPG Key ID: 7B0E3B1390D61DA4
2 changed files with 12 additions and 5 deletions

View File

@ -16,6 +16,7 @@ let
libcublas
setupCudaHook
;
inherit (lib) getDev getLib getOutput;
in
backendStdenv.mkDerivation {
pname = "saxpy";
@ -36,9 +37,9 @@ backendStdenv.mkDerivation {
buildInputs =
lib.optionals (lib.versionOlder cudaVersion "11.4") [cudatoolkit]
++ lib.optionals (lib.versionAtLeast cudaVersion "11.4") [
libcublas.dev
libcublas.lib
libcublas.static
(getDev libcublas)
(getLib libcublas)
(getOutput "static" libcublas)
cuda_cudart
]
++ lib.optionals (lib.versionAtLeast cudaVersion "12.0") [cuda_cccl];
@ -50,10 +51,11 @@ backendStdenv.mkDerivation {
))
];
meta = {
meta = rec {
description = "A simple (Single-precision AX Plus Y) FindCUDAToolkit.cmake example for testing cross-compilation";
license = lib.licenses.mit;
maintainers = lib.teams.cuda.members;
platforms = lib.platforms.unix;
badPlatforms = lib.optionals flags.isJetsonBuild platforms;
};
}

View File

@ -53,7 +53,7 @@ final: _: {
autoAddCudaCompatRunpathHook =
final.callPackage
(
{makeSetupHook, cuda_compat ? throw "autoAddCudaCompatRunpathHook: No cuda_compat for CUDA ${final.cudaMajorMinorVersion}" }:
{makeSetupHook, cuda_compat ? null }:
makeSetupHook
{
name = "auto-add-cuda-compat-runpath-hook";
@ -61,7 +61,12 @@ final: _: {
# Hotfix Ofborg evaluation
libcudaPath = if final.flags.isJetsonBuild then "${cuda_compat}/compat" else null;
};
meta.broken = !final.flags.isJetsonBuild;
# Pre-cuda_compat CUDA release:
meta.badPlatforms = final.lib.optionals (cuda_compat == null) final.lib.platforms.all;
meta.platforms = cuda_compat.platforms or [ ];
}
./auto-add-cuda-compat-runpath.sh
)