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

View file

@ -53,7 +53,7 @@ final: _: {
autoAddCudaCompatRunpathHook = autoAddCudaCompatRunpathHook =
final.callPackage final.callPackage
( (
{makeSetupHook, cuda_compat ? throw "autoAddCudaCompatRunpathHook: No cuda_compat for CUDA ${final.cudaMajorMinorVersion}" }: {makeSetupHook, cuda_compat ? null }:
makeSetupHook makeSetupHook
{ {
name = "auto-add-cuda-compat-runpath-hook"; name = "auto-add-cuda-compat-runpath-hook";
@ -61,7 +61,12 @@ final: _: {
# Hotfix Ofborg evaluation # Hotfix Ofborg evaluation
libcudaPath = if final.flags.isJetsonBuild then "${cuda_compat}/compat" else null; libcudaPath = if final.flags.isJetsonBuild then "${cuda_compat}/compat" else null;
}; };
meta.broken = !final.flags.isJetsonBuild; 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 ./auto-add-cuda-compat-runpath.sh
) )