cudaPackages.flags: add cmakeCudaArchitectures and cmakeCudaArchitecturesString
This commit is contained in:
parent
5ee7bfc443
commit
e77b24b159
@ -211,6 +211,16 @@ let
|
||||
# E.g. "-gencode=arch=compute_75,code=sm_75 ... -gencode=arch=compute_86,code=compute_86"
|
||||
gencodeString = strings.concatStringsSep " " gencode;
|
||||
|
||||
# cmakeCudaArchitectures :: List String
|
||||
# A list of CUDA capabilities without dots, suitable for passing to CMake.
|
||||
# E.g. [ "75" "86" ]
|
||||
cmakeCudaArchitectures = lists.map dropDot cudaCapabilities;
|
||||
|
||||
# cmakeCudaArchitecturesString :: String
|
||||
# A semicolon-separated string of CUDA capabilities without dots, suitable for passing to CMake.
|
||||
# E.g. "75;86"
|
||||
cmakeCudaArchitecturesString = strings.concatStringsSep ";" cmakeCudaArchitectures;
|
||||
|
||||
# Jetson devices cannot be targeted by the same binaries which target non-Jetson devices. While
|
||||
# NVIDIA provides both `linux-aarch64` and `linux-sbsa` packages, which both target `aarch64`,
|
||||
# they are built with different settings and cannot be mixed.
|
||||
@ -274,6 +284,12 @@ assert
|
||||
];
|
||||
gencodeString = "-gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_86,code=compute_86";
|
||||
|
||||
cmakeCudaArchitectures = [
|
||||
"75"
|
||||
"86"
|
||||
];
|
||||
cmakeCudaArchitecturesString = "75;86";
|
||||
|
||||
isJetsonBuild = false;
|
||||
};
|
||||
actual = formatCapabilities {
|
||||
@ -343,6 +359,12 @@ assert
|
||||
];
|
||||
gencodeString = "-gencode=arch=compute_62,code=sm_62 -gencode=arch=compute_72,code=sm_72 -gencode=arch=compute_72,code=compute_72";
|
||||
|
||||
cmakeCudaArchitectures = [
|
||||
"62"
|
||||
"72"
|
||||
];
|
||||
cmakeCudaArchitecturesString = "62;72";
|
||||
|
||||
isJetsonBuild = true;
|
||||
};
|
||||
actual = formatCapabilities {
|
||||
|
Loading…
Reference in New Issue
Block a user