python3Packages.torch: use magma-static

This commit is contained in:
Connor Baker
2023-06-18 17:30:24 +00:00
parent fb11cd4929
commit e5c51a38d9
3 changed files with 12 additions and 1 deletions
@@ -28,6 +28,7 @@
, ninja
, openmp
, rocmSupport ? false
, static ? false
, stdenv
, symlinkJoin
}:
@@ -145,6 +146,8 @@ stdenv.mkDerivation {
cmakeFlags = [
"-DGPU_TARGET=${gpuTargetString}"
] ++ lists.optionals static [
"-DBUILD_SHARED_LIBS=OFF"
] ++ lists.optionals cudaSupport [
"-DCMAKE_CUDA_ARCHITECTURES=${cudaArchitecturesString}"
"-DMIN_ARCH=${minArch}" # Disarms magma's asserts
+4
View File
@@ -38238,6 +38238,10 @@ with pkgs;
rocmSupport = false;
};
magma-cuda-static = magma-cuda.override {
static = true;
};
# TODO:AMD won't compile with anything newer than 2.6.2 -- it fails at the linking stage.
magma-hip = magma_2_6_2.override {
cudaSupport = false;
+5 -1
View File
@@ -12319,6 +12319,10 @@ self: super: with self; {
torch = callPackage ../development/python-modules/torch {
cudaSupport = pkgs.config.cudaSupport or false;
magma =
if pkgs.config.cudaSupport or false
then pkgs.magma-cuda-static
else pkgs.magma;
inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate CoreServices;
inherit (pkgs.darwin) libobjc;
inherit (pkgs.llvmPackages_rocm) openmp;
@@ -12329,7 +12333,7 @@ self: super: with self; {
};
torchWithCuda = self.torch.override {
magma = pkgs.magma-cuda;
magma = pkgs.magma-cuda-static;
cudaSupport = true;
rocmSupport = false;
};