rocmPackages.rocblas: split up output for hydra caching
This commit is contained in:
parent
68c237239b
commit
1abbe92d90
1 changed files with 159 additions and 100 deletions
|
@ -2,6 +2,7 @@
|
|||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, rocmUpdateScript
|
||||
, runCommand
|
||||
, cmake
|
||||
, rocm-cmake
|
||||
, clr
|
||||
|
@ -24,9 +25,8 @@
|
|||
, tensileLibFormat ? "msgpack"
|
||||
, gpuTargets ? [ "all" ]
|
||||
}:
|
||||
|
||||
# rocBLAS is 3.7GB... I'll have to figure out hydra in another PR
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
let
|
||||
rocblas = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocblas";
|
||||
version = "5.7.0";
|
||||
|
||||
|
@ -138,4 +138,63 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
platforms = platforms.linux;
|
||||
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version;
|
||||
};
|
||||
});
|
||||
|
||||
gfx80 = runCommand "rocblas-gfx80" { preferLocalBuild = true; } ''
|
||||
mkdir -p $out/lib/rocblas/library
|
||||
cp -a ${rocblas}/lib/rocblas/library/*gfx80* $out/lib/rocblas/library
|
||||
'';
|
||||
|
||||
gfx90 = runCommand "rocblas-gfx90" { preferLocalBuild = true; } ''
|
||||
mkdir -p $out/lib/rocblas/library
|
||||
cp -a ${rocblas}/lib/rocblas/library/*gfx90* $out/lib/rocblas/library
|
||||
'';
|
||||
|
||||
gfx94 = runCommand "rocblas-gfx94" { preferLocalBuild = true; } ''
|
||||
mkdir -p $out/lib/rocblas/library
|
||||
cp -a ${rocblas}/lib/rocblas/library/*gfx94* $out/lib/rocblas/library
|
||||
'';
|
||||
|
||||
gfx10 = runCommand "rocblas-gfx10" { preferLocalBuild = true; } ''
|
||||
mkdir -p $out/lib/rocblas/library
|
||||
cp -a ${rocblas}/lib/rocblas/library/*gfx10* $out/lib/rocblas/library
|
||||
'';
|
||||
|
||||
gfx11 = runCommand "rocblas-gfx11" { preferLocalBuild = true; } ''
|
||||
mkdir -p $out/lib/rocblas/library
|
||||
cp -a ${rocblas}/lib/rocblas/library/*gfx11* $out/lib/rocblas/library
|
||||
'';
|
||||
in stdenv.mkDerivation (finalAttrs: {
|
||||
inherit (rocblas) pname version src passthru meta;
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
] ++ lib.optionals buildTests [
|
||||
"test"
|
||||
] ++ lib.optionals buildBenchmarks [
|
||||
"benchmark"
|
||||
];
|
||||
|
||||
dontUnpack = true;
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -a --no-preserve=mode ${rocblas}/* $out
|
||||
ln -sf ${gfx80}/lib/rocblas/library/* $out/lib/rocblas/library
|
||||
ln -sf ${gfx90}/lib/rocblas/library/* $out/lib/rocblas/library
|
||||
ln -sf ${gfx94}/lib/rocblas/library/* $out/lib/rocblas/library
|
||||
ln -sf ${gfx10}/lib/rocblas/library/* $out/lib/rocblas/library
|
||||
ln -sf ${gfx11}/lib/rocblas/library/* $out/lib/rocblas/library
|
||||
'' + lib.optionalString buildTests ''
|
||||
cp -a ${rocblas.test} $test
|
||||
'' + lib.optionalString buildBenchmarks ''
|
||||
cp -a ${rocblas.benchmark} $benchmark
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue