diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-01-29 09:05:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-29 09:05:35 +0100 |
commit | af848756dbafd263dad23cfb90b2114c6c0dacb6 (patch) | |
tree | 7bf725e9134dcc39ec555405baf02e782df933ec /pkgs | |
parent | 9d9e27f2fe7717fde4104c8310627617b042de5d (diff) | |
parent | f813bf39a90e9dd8a816568b805f27fc202a000c (diff) |
Merge pull request #213208 from Madouura/pr/rocm-hydra
rocm-related: fix hydra workarounds
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/composable_kernel/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/rocfft/default.nix | 19 |
2 files changed, 28 insertions, 3 deletions
diff --git a/pkgs/development/libraries/composable_kernel/default.nix b/pkgs/development/libraries/composable_kernel/default.nix index 9ced4e0a44d5a..8b0ac955810e8 100644 --- a/pkgs/development/libraries/composable_kernel/default.nix +++ b/pkgs/development/libraries/composable_kernel/default.nix @@ -28,8 +28,7 @@ let "example" ]; - # There is now a release, but it's cpu-only it seems to be for a very specific purpose - # Thus, we're sticking with the develop branch for now... + # ROCm 5.6 should release composable_kernel as stable with a tag in the future src = fetchFromGitHub { owner = "ROCmSoftwarePlatform"; repo = "composable_kernel"; @@ -53,6 +52,7 @@ let "-DCMAKE_CXX_COMPILER=hipcc" ] ++ lib.optionals (gpuTargets != [ ]) [ "-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" + "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" ] ++ lib.optionals buildTests [ "-DGOOGLETEST_DIR=${gtest.src}" # Custom linker names ]; @@ -82,7 +82,6 @@ let license = with licenses; [ mit ]; maintainers = teams.rocm.members; platforms = platforms.linux; - broken = buildExamples; # bin/example_grouped_gemm_xdl_bfp16] Error 139 }; }); @@ -93,6 +92,7 @@ in stdenv.mkDerivation { inherit (ck) pname version outputs src passthru meta; dontUnpack = true; + dontPatch = true; dontConfigure = true; dontBuild = true; @@ -109,4 +109,10 @@ in stdenv.mkDerivation { '' + '' runHook postInstall ''; + + # Fix paths + preFixup = '' + substituteInPlace $out/lib/cmake/composable_kernel/*.cmake \ + --replace "${ck}" "$out" + ''; } diff --git a/pkgs/development/libraries/rocfft/default.nix b/pkgs/development/libraries/rocfft/default.nix index 375e6a7b432e0..39d714ce84e8a 100644 --- a/pkgs/development/libraries/rocfft/default.nix +++ b/pkgs/development/libraries/rocfft/default.nix @@ -135,6 +135,7 @@ in stdenv.mkDerivation { inherit (rocfft) pname version outputs src passthru meta; dontUnpack = true; + dontPatch = true; dontConfigure = true; dontBuild = true; @@ -155,4 +156,22 @@ in stdenv.mkDerivation { '' + '' runHook postInstall ''; + + # Fix paths + preFixup = '' + substituteInPlace $out/include/*.h $out/rocfft/include/*.h \ + --replace "${rocfft}" "$out" + + patchelf --set-rpath \ + $(patchelf --print-rpath $out/lib/librocfft.so | sed 's,${rocfft}/lib,'"$out/lib"',') \ + $out/lib/librocfft.so + '' + lib.optionalString buildTests '' + patchelf --set-rpath \ + $(patchelf --print-rpath $test/bin/rocfft-test | sed 's,${rocfft}/lib,'"$out/lib"',') \ + $test/bin/rocfft-test + '' + lib.optionalString buildBenchmarks '' + patchelf --set-rpath \ + $(patchelf --print-rpath $benchmark/bin/rocfft-rider | sed 's,${rocfft}/lib,'"$out/lib"',') \ + $benchmark/bin/rocfft-rider + ''; } |