commit:     94b9a3477b05ed3c5b20a1fc256c4a078de53c90
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Mon Jun 16 16:13:24 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 16 17:39:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94b9a347

sci-libs/hipBLASLt: support AMDGPU_TARGETS="gfx1200 gfx1201"

Applied patch to fix https://github.com/ROCm/hipBLASLt/issues/2060

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42628
Closes: https://github.com/gentoo/gentoo/pull/42628
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/hipBLASLt-6.4.1-upstream-clang.patch          | 17 +++++++++++++++++
 sci-libs/hipBLASLt/hipBLASLt-6.4.1.ebuild               |  3 ++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/sci-libs/hipBLASLt/files/hipBLASLt-6.4.1-upstream-clang.patch 
b/sci-libs/hipBLASLt/files/hipBLASLt-6.4.1-upstream-clang.patch
new file mode 100644
index 000000000000..2b0d0448d173
--- /dev/null
+++ b/sci-libs/hipBLASLt/files/hipBLASLt-6.4.1-upstream-clang.patch
@@ -0,0 +1,17 @@
+Fix detection of non-AMD clang. Without it, version is set to 0.0.0,
+and tensile produces incorrect LLVM code (LLVM<19 syntax for LLVM 20).
+
+Upstream bug: https://github.com/ROCm/hipBLASLt/issues/2060
+--- a/tensilelite/Tensile/Common.py
++++ b/tensilelite/Tensile/Common.py
+@@ -1753,8 +1753,8 @@ def assignGlobalParameters(config, cxxCompiler=None):
+       if 'HIP version' in line:
+         globalParameters['HipClangVersion'] = line.split()[2]
+         print1("# Found hipcc version " + globalParameters['HipClangVersion'])
+-      if 'AMD clang version' in line:
+-        globalParameters['AMDClangVersion'] = line.split()[3]
++      if 'clang version ' in line:
++        globalParameters['AMDClangVersion'] = line.split('clang version ')[1]
+         print1("# Found clang version " + globalParameters['AMDClangVersion'])
+ 
+   except (subprocess.CalledProcessError, OSError) as e:

diff --git a/sci-libs/hipBLASLt/hipBLASLt-6.4.1.ebuild 
b/sci-libs/hipBLASLt/hipBLASLt-6.4.1.ebuild
index d735d84b5ff8..34d0ae2abde6 100644
--- a/sci-libs/hipBLASLt/hipBLASLt-6.4.1.ebuild
+++ b/sci-libs/hipBLASLt/hipBLASLt-6.4.1.ebuild
@@ -18,7 +18,7 @@ LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
 KEYWORDS="~amd64"
 
-SUPPORTED_GPUS=( gfx908 gfx90a gfx940 gfx941 gfx942 gfx1100 gfx1101 )
+SUPPORTED_GPUS=( gfx908 gfx90a gfx940 gfx941 gfx942 gfx1100 gfx1101 gfx1200 
gfx1201 )
 IUSE_TARGETS=( "${SUPPORTED_GPUS[@]/#/amdgpu_targets_}" )
 IUSE="${IUSE_TARGETS[@]/#/+} benchmark roctracer test"
 RESTRICT="!test? ( test )"
@@ -62,6 +62,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-6.4.1-headers.patch
        "${FILESDIR}"/${PN}-6.4.1-libcxx-integrals.patch
        "${FILESDIR}"/${PN}-6.4.1-gentoopath.patch
+       "${FILESDIR}"/${PN}-6.4.1-upstream-clang.patch
 )
 
 python_check_deps() {

Reply via email to