Merge pull request #38971 from knedlsepp/fix-darwin-gpu-stuff

Fix clblas and libgpuarray on darwin
This commit is contained in:
Jörg Thalheim
2018-04-17 13:58:54 +01:00
committed by GitHub
3 changed files with 19 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ buildPythonPackage rec {
libraryPath = lib.makeLibraryPath (
[]
++ lib.optionals cudaSupport [ cudatoolkit.lib cudatoolkit.out ]
++ lib.optionals openclSupport [ ocl-icd clblas ]
++ lib.optionals openclSupport ([ clblas ] ++ lib.optional (!stdenv.isDarwin) ocl-icd)
);
preBuild = ''
@@ -47,7 +47,7 @@ buildPythonPackage rec {
postFixup = ''
rm $out/lib/libgpuarray-static.a
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
function fixRunPath {
p=$(patchelf --print-rpath $1)
patchelf --set-rpath "$p:$libraryPath" $1
@@ -75,7 +75,7 @@ buildPythonPackage rec {
description = "Library to manipulate tensors on GPU.";
license = licenses.free;
maintainers = with maintainers; [ artuuge ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}