gpu-burn: tidy up after CUDA changes

Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
This commit is contained in:
Connor Baker
2025-10-22 13:14:52 -07:00
parent 9c1181a75e
commit 6abb73f115
+7 -3
View File
@@ -6,7 +6,6 @@
lib,
}:
let
inherit (lib.attrsets) getBin;
inherit (lib.lists) last map optionals;
inherit (lib.trivial) boolToString;
inherit (config) cudaSupport;
@@ -36,7 +35,11 @@ backendStdenv.mkDerivation {
substituteInPlace gpu_burn-drv.cpp \
--replace-fail \
'#define COMPARE_KERNEL "compare.ptx"' \
"#define COMPARE_KERNEL \"$out/share/compare.ptx\""
'#define COMPARE_KERNEL "${placeholder "out"}/share/compare.ptx"'
substituteInPlace Makefile \
--replace-fail \
'${''''${CUDAPATH}/bin/nvcc''}' \
'${lib.getExe cuda_nvcc}'
'';
nativeBuildInputs = [
@@ -52,7 +55,8 @@ backendStdenv.mkDerivation {
];
makeFlags = [
"CUDAPATH=${getBin cuda_nvcc}"
# NOTE: CUDAPATH assumes cuda_cudart is a single output containing all of lib, dev, and stubs.
"CUDAPATH=${cuda_cudart}"
"COMPUTE=${last (map dropDots cudaCapabilities)}"
"IS_JETSON=${boolToString isJetsonBuild}"
];