Merge pull request #38971 from knedlsepp/fix-darwin-gpu-stuff
Fix clblas and libgpuarray on darwin
This commit is contained in:
commit
be5ad658df
|
@ -7,6 +7,7 @@
|
||||||
, python
|
, python
|
||||||
, ocl-icd
|
, ocl-icd
|
||||||
, opencl-headers
|
, opencl-headers
|
||||||
|
, Accelerate, CoreGraphics, CoreVideo, OpenCL
|
||||||
, gtest
|
, gtest
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -40,11 +41,19 @@ stdenv.mkDerivation rec {
|
||||||
gfortran
|
gfortran
|
||||||
blas
|
blas
|
||||||
python
|
python
|
||||||
ocl-icd
|
|
||||||
opencl-headers
|
|
||||||
boost
|
boost
|
||||||
gtest
|
gtest
|
||||||
];
|
] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
|
||||||
|
ocl-icd
|
||||||
|
opencl-headers
|
||||||
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||||
|
Accelerate
|
||||||
|
CoreGraphics
|
||||||
|
CoreVideo
|
||||||
|
];
|
||||||
|
propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [
|
||||||
|
OpenCL
|
||||||
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
@ -56,7 +65,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ artuuge ];
|
maintainers = with maintainers; [ artuuge ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ buildPythonPackage rec {
|
||||||
libraryPath = lib.makeLibraryPath (
|
libraryPath = lib.makeLibraryPath (
|
||||||
[]
|
[]
|
||||||
++ lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out ]
|
++ lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out ]
|
||||||
++ lib.optionals openclSupport [ ocl-icd clblas ]
|
++ lib.optionals openclSupport ([ clblas ] ++ lib.optional (!stdenv.isDarwin) ocl-icd)
|
||||||
);
|
);
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
@ -47,7 +47,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
rm $out/lib/libgpuarray-static.a
|
rm $out/lib/libgpuarray-static.a
|
||||||
|
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||||
function fixRunPath {
|
function fixRunPath {
|
||||||
p=$(patchelf --print-rpath $1)
|
p=$(patchelf --print-rpath $1)
|
||||||
patchelf --set-rpath "$p:$libraryPath" $1
|
patchelf --set-rpath "$p:$libraryPath" $1
|
||||||
|
@ -75,7 +75,7 @@ buildPythonPackage rec {
|
||||||
description = "Library to manipulate tensors on GPU.";
|
description = "Library to manipulate tensors on GPU.";
|
||||||
license = licenses.free;
|
license = licenses.free;
|
||||||
maintainers = with maintainers; [ artuuge ];
|
maintainers = with maintainers; [ artuuge ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19783,7 +19783,9 @@ with pkgs;
|
||||||
|
|
||||||
blas = callPackage ../development/libraries/science/math/blas { };
|
blas = callPackage ../development/libraries/science/math/blas { };
|
||||||
|
|
||||||
clblas = callPackage ../development/libraries/science/math/clblas { };
|
clblas = callPackage ../development/libraries/science/math/clblas {
|
||||||
|
inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo OpenCL;
|
||||||
|
};
|
||||||
|
|
||||||
cliquer = callPackage ../development/libraries/science/math/cliquer { };
|
cliquer = callPackage ../development/libraries/science/math/cliquer { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue