rocmPackages: extend rocm-runtime ISA compatibility

Signed-off-by: Gavin Zhao <git@gzgz.dev>
This commit is contained in:
Gavin Zhao 2024-03-23 11:37:42 -04:00
parent e4e95ef523
commit f579c74f3c
No known key found for this signature in database
GPG Key ID: 574EFE0659B5B1CF
2 changed files with 16 additions and 0 deletions

View File

@ -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 = ''

View File

@ -1,6 +1,7 @@
{ 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