Unverified Commit 41f94617 authored by Gavin Zhao's avatar Gavin Zhao
Browse files

rocmPackages: extend rocblas ISA compatibility



Signed-off-by: default avatarGavin Zhao <git@gzgz.dev>
parent d6adc4b1
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
, lib
, stdenv
, fetchFromGitHub
, fetchpatch
, rocmUpdateScript
, runCommand
, cmake
@@ -21,8 +22,13 @@
, buildBenchmarks ? false
, tensileLogic ? "asm_full"
, tensileCOVersion ? "default"
, tensileSepArch ? true
, tensileLazyLib ? true
# https://github.com/ROCm/Tensile/issues/1757
# Allows gfx101* users to use rocBLAS normally.
# Turn the below two values to `true` after the fix has been cherry-picked
# into a release. Just backporting that single fix is not enough because it
# depends on some previous commits.
, tensileSepArch ? false
, tensileLazyLib ? false
, tensileLibFormat ? "msgpack"
, gpuTargets ? [ "all" ]
}:
@@ -141,6 +147,14 @@ in stdenv.mkDerivation (finalAttrs: {
    "-DCMAKE_CXX_FLAGS=-I${amd-blis}/include/blis"
  ];

  patches = [
    (fetchpatch {
      name = "Extend-rocBLAS-HIP-ISA-compatibility.patch";
      url = "https://github.com/GZGavinZhao/rocBLAS/commit/89b75ff9cc731f71f370fad90517395e117b03bb.patch";
      hash = "sha256-W/ohOOyNCcYYLOiQlPzsrTlNtCBdJpKVxO8s+4G7sjo=";
    })
  ];

  postPatch = lib.optionalString (finalAttrs.pname != "rocblas") ''
    # Return early and install tensile files manually
    substituteInPlace library/src/CMakeLists.txt \