Skip to content

Commit 57a704b

Browse files
committed
Update for CUDA/gcc changes
1 parent 34084b1 commit 57a704b

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

lib/torch-extension/arch.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
build2cmake,
1111
cmake,
1212
cmakeNvccThreadsHook,
13+
cuda_nvcc,
1314
get-kernel-check,
1415
kernel-abi-check,
1516
ninja,
@@ -133,7 +134,7 @@ stdenv.mkDerivation (prevAttrs: {
133134
]
134135
++ lib.optionals cudaSupport [
135136
cmakeNvccThreadsHook
136-
cudaPackages.cuda_nvcc
137+
cuda_nvcc
137138
]
138139
++ lib.optionals rocmSupport [
139140
clr

lib/torch-extension/default.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
callPackage,
77
stdenv,
88
stdenvGlibc_2_27,
9+
cudaPackages,
910
rocmPackages,
1011
writeScriptBin,
1112
xpuPackages,
@@ -28,6 +29,12 @@ let
2829
}
2930
);
3031

32+
cuda_nvcc = cudaPackages.cuda_nvcc.override {
33+
backendStdenv = cudaPackages.backendStdenv.override {
34+
stdenv = effectiveStdenv;
35+
};
36+
};
37+
3138
oneapi-torch-dev = xpuPackages.oneapi-torch-dev.override { stdenv = effectiveStdenv; };
3239
onednn-xpu = xpuPackages.onednn-xpu.override {
3340
inherit oneapi-torch-dev;
@@ -45,6 +52,7 @@ in
4552
mkExtension = callPackage ./arch.nix {
4653
inherit
4754
clr
55+
cuda_nvcc
4856
oneapi-torch-dev
4957
onednn-xpu
5058
torch

pkgs/stdenv-glibc-2_27/default.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
cudaSupport ? config.cudaSupport,
44
fetchFromGitHub,
55
overrideCC,
6-
system,
76
wrapBintoolsWith,
87
wrapCCWith,
9-
gcc12Stdenv,
8+
gcc13Stdenv,
109
stdenv,
1110
bintools-unwrapped,
1211
cudaPackages,
@@ -19,7 +18,7 @@ let
1918
repo = "nixpkgs";
2019
rev = "a9eb3eed170fa916e0a8364e5227ee661af76fde";
2120
hash = "sha256-1ycrr9HMrGA3ZDM8qmKcZICBupE5UShnIIhPRWdvAzA=";
22-
}) { inherit system; };
21+
}) { inherit (stdenv.hostPlatform) system; };
2322

2423
glibc_2_27 = nixpkgs_20191230.glibc.overrideAttrs (prevAttrs: {
2524
# Slight adjustments for compatibility with modern nixpkgs:
@@ -64,10 +63,9 @@ let
6463
bintools = bintools-unwrapped;
6564
libc = newGlibc;
6665
};
67-
libcxx = cc.lib;
6866
};
6967
in
7068
overrideCC stdenv compilerWrapped;
7169

7270
in
73-
stdenvWith glibc_2_27 (if cudaSupport then cudaPackages.backendStdenv else gcc12Stdenv).cc.cc stdenv
71+
stdenvWith glibc_2_27 (if cudaSupport then cudaPackages.backendStdenv else gcc13Stdenv).cc.cc stdenv

versions.nix

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@
137137
}
138138

139139
# Non-standard versions; not included in bundle builds.
140-
{
141-
torchVersion = "2.8";
142-
cudaVersion = "12.4";
143-
cxx11Abi = true;
144-
systems = [
145-
"x86_64-linux"
146-
"aarch64-linux"
147-
];
148-
sourceBuild = true;
149-
}
140+
#{
141+
# torchVersion = "2.8";
142+
# cudaVersion = "12.4";
143+
# cxx11Abi = true;
144+
# systems = [
145+
# "x86_64-linux"
146+
# "aarch64-linux"
147+
# ];
148+
# sourceBuild = true;
149+
#}
150150
]

0 commit comments

Comments
 (0)