Unverified Commit f579c74f authored by Gavin Zhao's avatar Gavin Zhao
Browse files

rocmPackages: extend rocm-runtime ISA compatibility



Signed-off-by: default avatarGavin Zhao <git@gzgz.dev>
parent e4e95ef5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -111,6 +111,8 @@ in stdenv.mkDerivation (finalAttrs: {
      url = "https://github.com/ROCm/clr/commit/77c581a3ebd47b5e2908973b70adea66891159ee.patch";
      hash = "sha256-auBedbd7rghlKav7A9V6l64J7VmtE9GizIdi5gWj+fs=";
    })
    ./0001-Improve-hipamd-compat-check.patch
    ./0001-improve-rocclr-isa-compatibility-check.patch
  ];

  postPatch = ''
@@ -124,6 +126,10 @@ in stdenv.mkDerivation (finalAttrs: {

    substituteInPlace hipamd/src/hip_embed_pch.sh \
      --replace "\''$LLVM_DIR/bin/clang" "${clang}/bin/clang"

    # https://lists.debian.org/debian-ai/2024/02/msg00178.html
    substituteInPlace rocclr/utils/flags.hpp \
      --replace-fail "HIP_USE_RUNTIME_UNBUNDLER, false" "HIP_USE_RUNTIME_UNBUNDLER, true"
  '';

  postInstall = ''
+10 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, rocmUpdateScript
, pkg-config
, cmake
@@ -42,6 +43,15 @@ stdenv.mkDerivation (finalAttrs: {
    libxml2
  ];

  patches = [
    (fetchpatch {
      name = "extend-isa-compatibility-check.patch";
      url = "https://salsa.debian.org/rocm-team/rocr-runtime/-/raw/076026d43bbee7f816b81fea72f984213a9ff961/debian/patches/0004-extend-isa-compatibility-check.patch";
      hash = "sha256-cC030zVGS4kNXwaztv5cwfXfVwOldpLGV9iYgEfPEnY=";
      stripLen = 1;
    })
  ];

  postPatch = ''
    patchShebangs image/blit_src/create_hsaco_ascii_file.sh
    patchShebangs core/runtime/trap_handler/create_trap_handler_header.sh