[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-07-28 Thread Patrick Lauer
commit: fedb97d84b3b6479be2f916c8267529e370debbe
Author: Patrick Lauer  gentoo  org>
AuthorDate: Sun Jul 28 08:03:37 2024 +
Commit: Patrick Lauer  gentoo  org>
CommitDate: Sun Jul 28 08:03:37 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fedb97d8

dev-util/hip: add 6.1.2

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/Manifest |   3 +
 dev-util/hip/hip-6.1.2.ebuild | 238 ++
 2 files changed, 241 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index e1af0c58b079..9da573a74ebe 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,7 +1,9 @@
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
 DIST hip-5.7.1.tar.gz 553774 BLAKE2B 
f88c235f688d3a662ec6cb4ad7fe3f82c0015015997871609cc30ab5b2f7fcb9709a08683d77194e45a6dbbe1d24c6355b128d2ecf655f1dea3468711c64e0a3
 SHA512 
68fa8753725b53c999d102d254c6b1dba53af4e00d6a48db93d10213cc02eec30b4a39c66e773d4f625dd9636cf8b0c5faa05b69fac27cf5a6b19dd3ddd2b905
 DIST hip-6.1.1.tar.gz 247192 BLAKE2B 
c40bb483fb61b3037693f456e546046598df7e0dd81a1f1c8d222ab0d9c0752092ce85c8533bd355f883dda5ce1f32f7ff2b2a58cebac50d53e0e7f4d85ca3ae
 SHA512 
3e6162938294a74af51bc2161ada38dc4ba19614e182238f320f2052a9025be6ea413e40f00cb80f4e86696793d6c4431e2417ea798a2330886a3f3e66aedf0d
+DIST hip-6.1.2.tar.gz 247193 BLAKE2B 
e343bdf233752e40cdefa0c2bbd56858bbb471155045ae1adcf651ddff2ed40dc7c7069998a35e9b26324fdf1c972e13e1222406bc52ae2591c23a45611864c5
 SHA512 
771f6494c7ff0ddb7d22193dfdbb3fb9461f6e4be347ecb879bb84c5a01a95fb4c4d3f7a0f039265d5369f6c6a5b66949af7bc91ed220f5e81a5b15ec98a68eb
 DIST hip-test-6.1.1.tar.gz 1080605 BLAKE2B 
7eddf648be31365479baa0cd4fd1c060a682a6b44d923cac1c4840c0768782db2fef4e5d97318ef0423be1e5c85b1a0cc6b9d324db789dad28be17f64ab38cae
 SHA512 
0dd679c5b94a59e192bea5789f4448b53ac23c8a03b24a347758b1d70ff692483fd4aaea0b19345eb6ffb82a4492ed21958398b53ae6244a244a660dfa33412f
+DIST hip-test-6.1.2.tar.gz 1080493 BLAKE2B 
ff501ab92c1d3207e330f5e9630e3300aa52f7c2acfae2173a964a2843952db90eea2b4ecf5db1ec6ba65d7764750b9eae3f2a9641d1a3fc71d5172e3a7264a8
 SHA512 
09fa4243c8b73ddbe163ff4c60f0f8f4182f1a37071e9747bf95ecdc219ba3a0407bdf1e2391481f537b223565a38f16e918667194666558a469d94f88a1e236
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 
9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11
 SHA512 
c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
@@ -9,6 +11,7 @@ DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B 
e6383a6b6b09f274a944d66effd345e38a191ec7
 DIST rocm-5.7.0.tar.gz 845881 BLAKE2B 
08255edc1407e5ef85895336b11496319695318fce265565728ad75175b5e1dfab98f696fee2d27e60c48e862f721fad4c53118cc70b807353fff5f97ed72ac2
 SHA512 
72420e16c7cfe9687e030331838666dabaa43d686bdad1d109431e44db99070a2cf6dd64b59e3275019abedd6612f6008c798a79275e7225b6b122fb9f644660
 DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 
3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4
 SHA512 
d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965
 DIST rocm-clr-6.1.1.tar.gz 2031034 BLAKE2B 
b0485bb015d31986f4988d1db0c029c826856e50b5bb1b58fac2097c14b398f1b8d41ec198889e27ac860497a8b3c081ec31d52390d5c9ff5db092bf7cce
 SHA512 
86925e8b9a9e77b06a57daefbc7279887b4ef7c6a79c3717bc2f2d3bf29926281c60063fd17e21c65d7def520d9f579bf88f69051d053a38750ba968f69ca3fc
+DIST rocm-clr-6.1.2.tar.gz 2031283 BLAKE2B 
d51d32a77794ea97f1a3817786c9fd6b482106b665eea6e2c9b4c11e4dce19a3486386eb5ba111554c2d82c30e2a93add7502eed5768caf3fb709fb5fbb2e71b
 SHA512 
e97224451864efe0084c4117f54893c9624a6a9f365a0b4abad08fd9635f008dea742dc589429fbb714e1b8177d06362c0f5a741f6c4a050d0fd4d48da72d54b
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA51

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/

2024-06-29 Thread Conrad Kostecki
commit: 188a859adfcc83c6948debd4761bae493a5f2167
Author: Michael Mair-Keimberger  levelnine  at>
AuthorDate: Sat Jun 29 09:18:15 2024 +
Commit: Conrad Kostecki  gentoo  org>
CommitDate: Sat Jun 29 23:56:57 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=188a859a

dev-util/hip: remove unused patches

Signed-off-by: Michael Mair-Keimberger  levelnine.at>
Signed-off-by: Conrad Kostecki  gentoo.org>

 dev-util/hip/files/hip-6.0.2-install.patch |  23 --
 ...p-6.1.0-extend-isa-compatibility-check-v2.patch |  35 ---
 .../hip-6.1.0-extend-isa-compatibility-check.patch | 236 -
 3 files changed, 294 deletions(-)

diff --git a/dev-util/hip/files/hip-6.0.2-install.patch 
b/dev-util/hip/files/hip-6.0.2-install.patch
deleted file mode 100644
index e2fc3a8852cb..
--- a/dev-util/hip/files/hip-6.0.2-install.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index 7ad30019d..e79ea0714 100755
 a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -398,18 +398,7 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "")
-   set(hipcc_bin ${hipcc_bin}.exe)
-   set(hipconfig_bin ${hipconfig_bin}.exe)
- endif()
--if(EXISTS ${hipcc_bin} AND EXISTS ${hipconfig_bin})
--  install(PROGRAMS ${hipcc_bin} DESTINATION bin)
--  install(PROGRAMS ${hipconfig_bin} DESTINATION bin)
--endif()
-   endif()
--  install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc DESTINATION bin)
--  install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig DESTINATION bin)
--  install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin)
--  install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin)
--  install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin)
--  install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin)
--  install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)
- endif()
- 
- #

diff --git 
a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch 
b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch
deleted file mode 100644
index d6e95c994c8f..
--- a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e188c092a987c45caf2ea4651686ea631ca47c3d Mon Sep 17 00:00:00 2001
-From: Paul Zander 
-Date: Tue, 25 Jun 2024 15:22:33 +0200
-Subject: [PATCH] prepare usage of old patch
-
-Signed-off-by: Paul Zander 

- hipamd/src/hip_code_object.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hipamd/src/hip_code_object.cpp b/hipamd/src/hip_code_object.cpp
-index 6b3a6d0..fef89df 100644
 a/hipamd/src/hip_code_object.cpp
-+++ b/hipamd/src/hip_code_object.cpp
-@@ -410,7 +410,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string 
co_triple_target_id,
-   if (co_triple_target_id == agent_triple_target_id) return true;
- 
-   // Parse code object triple target id
--  if (!consume(co_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) {
-+  if (!consume(co_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) 
{
- return false;
-   }
- 
-@@ -423,7 +423,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string 
co_triple_target_id,
-   if (!co_triple_target_id.empty()) return false;
- 
-   // Parse agent isa triple target id
--  if (!consume(agent_triple_target_id, std::string(kAmdgcnTargetTriple) + 
'-')) {
-+  if (!consume(agent_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + 
'-')) {
- return false;
-   }
- 
--- 
-2.45.2
-

diff --git a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch 
b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch
deleted file mode 100644
index 40ccf6fdc089..
--- a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check.patch
+++ /dev/null
@@ -1,236 +0,0 @@
-Combined with matching changes within rocr-runtime ebuild, this patch allows
-to load compatible kernels whenever possible.
-For example if AMDGPU_TARGETS is set to gfx1030 and some application
-was started on gfx1036, it loads gfx1030 kernel.
-
-Author: Cordell Bloor 
-https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0025-improve-rocclr-isa-compatibility-check.patch
-https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026-extend-hip-isa-compatibility-check.patch
 a/hipamd/src/hip_code_object.cpp
-+++ b/hipamd/src/hip_code_object.cpp
-@@ -390,47 +390,123 @@ static bool getTripleTargetID(std::string 
bundled_co_entry_id, const void* code_
-   return true;
- }
- 
--static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id,
-- std::string 
agent_triple_target_id) {
-+struct GfxPattern {
-+  std::string root;
-+  std::string suffixes;
-+};
-+
-+static bool matches(const GfxPattern& p, const std::string& s) {
-+  if (p.root.size() + 1 != s.size()) {
-+return false;
-+  }
-+  if (0 != std:

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2024-06-26 Thread Sam James
commit: 2523be861bded1342a5a50ae6200300886b14bc1
Author: Paul Zander  gmail  com>
AuthorDate: Tue Jun 25 20:47:10 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jun 26 09:19:28 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2523be86

dev-util/hip: rename patches

Signed-off-by: Paul Zander  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 ...ip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch} |  0
 ...DEV-352878-LLVM-pkg-search-directly-using-find_dep.patch} |  0
 ...DEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch} |  0
 ...3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch} |  0
 ...DEV-352878-Removed-relative-path-based-CLANG-inclu.patch} |  0
 dev-util/hip/hip-5.1.3-r4.ebuild |  4 ++--
 dev-util/hip/hip-5.3.3-r3.ebuild | 12 +++-
 dev-util/hip/hip-5.4.3.ebuild|  6 +++---
 dev-util/hip/hip-5.5.1.ebuild|  6 +++---
 9 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/dev-util/hip/files/0001-SWDEV-316128-HIP-surface-API-support.patch 
b/dev-util/hip/files/hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch
similarity index 100%
rename from dev-util/hip/files/0001-SWDEV-316128-HIP-surface-API-support.patch
rename to 
dev-util/hip/files/hip-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch

diff --git 
a/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch
 
b/dev-util/hip/files/hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch
similarity index 100%
rename from 
dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch
rename to 
dev-util/hip/files/hip-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch

diff --git 
a/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch
 
b/dev-util/hip/files/hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch
similarity index 100%
rename from 
dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch
rename to 
dev-util/hip/files/hip-5.3.3-0002-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch

diff --git 
a/dev-util/hip/files/0002-SWDEV-355608-Remove-clang-include-path-2996.patch 
b/dev-util/hip/files/hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch
similarity index 100%
rename from 
dev-util/hip/files/0002-SWDEV-355608-Remove-clang-include-path-2996.patch
rename to 
dev-util/hip/files/hip-5.3.3-0003-SWDEV-355608-Remove-clang-include-path-2996.patch

diff --git 
a/dev-util/hip/files/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch
 
b/dev-util/hip/files/hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch
similarity index 100%
rename from 
dev-util/hip/files/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch
rename to 
dev-util/hip/files/hip-5.3.3-0004-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch

diff --git a/dev-util/hip/hip-5.1.3-r4.ebuild b/dev-util/hip/hip-5.1.3-r4.ebuild
index a8654a3e0568..764d4f49f49b 100644
--- a/dev-util/hip/hip-5.1.3-r4.ebuild
+++ b/dev-util/hip/hip-5.1.3-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -51,7 +51,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.1.3-fix-hip_prof_gen.patch"
"${FILESDIR}/${PN}-5.1.3-correct-sample-install-location.patch"
"${FILESDIR}/${PN}-5.1.3-remove-cmake-doxygen-commands.patch"
-   "${FILESDIR}/0001-SWDEV-316128-HIP-surface-API-support.patch"
+   
"${FILESDIR}/${PN}-5.1.3-0001-SWDEV-316128-HIP-surface-API-support.patch"
"${FILESDIR}/${PN}-5.1.3-llvm-15-noinline-keyword.patch"
 )
 

diff --git a/dev-util/hip/hip-5.3.3-r3.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild
index c03da0d6effc..fe717ad3b84c 100644
--- a/dev-util/hip/hip-5.3.3-r3.ebuild
+++ b/dev-util/hip/hip-5.3.3-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -40,7 +40,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
"${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch"
"${FILESDIR}/${PN}-5.3.3-disable-Werror.patch"
-   
"${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch"
+   
"${FILESDIR}/${PN}-5.3.3-0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch"
 )
 
 S="${WORKDIR}/hipamd-rocm-${PV}"
@@ -78,9 +78,11 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch"
eapply "${FILESDIR}/${PN}-5.3.3-correct-ldflag.patch"
-   eapply 
"${FILESDIR}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch"

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-06-26 Thread Sam James
commit: 440c80fe2dac37d4a6e970436d498f73c165d3fd
Author: Paul Zander  gmail  com>
AuthorDate: Tue Jun 25 21:05:06 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jun 26 09:19:29 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=440c80fe

dev-util/hip: 6.1.1 add cuda support

Add platform options via video_cards.
Make HIP / OpenCL for CLR optional.

Signed-off-by: Paul Zander  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35998
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-6.1.1.ebuild | 86 +--
 dev-util/hip/metadata.xml |  6 +++
 2 files changed, 73 insertions(+), 19 deletions(-)

diff --git a/dev-util/hip/hip-6.1.1.ebuild b/dev-util/hip/hip-6.1.1.ebuild
index 3bc1a3162b5f..eab3697cf4ef 100644
--- a/dev-util/hip/hip-6.1.1.ebuild
+++ b/dev-util/hip/hip-6.1.1.ebuild
@@ -29,25 +29,42 @@ LICENSE="MIT"
 SLOT="0/$(ver_cut 1-2)"
 KEYWORDS="~amd64"
 
-IUSE="debug test"
+IUSE="debug +hip opencl test video_cards_amdgpu video_cards_nvidia"
 RESTRICT="!test? ( test )"
 
+REQUIRED_USE="
+   || ( hip opencl )
+   ^^ ( video_cards_amdgpu video_cards_nvidia )
+"
+
 DEPEND="
-   >=dev-util/rocminfo-5
-   $(llvm_gen_dep '
-   sys-devel/clang:${LLVM_SLOT}
-   ')
-   dev-libs/rocm-comgr:${SLOT}
-   dev-libs/rocr-runtime:${SLOT}
+   video_cards_amdgpu? (
+   >=dev-util/rocminfo-5
+   $(llvm_gen_dep '
+   sys-devel/clang:${LLVM_SLOT}
+   ')
+   dev-libs/rocm-comgr:${SLOT}
+   dev-libs/rocr-runtime:${SLOT}
+   )
+   video_cards_nvidia? (
+   dev-libs/hipother:${SLOT}
+   )
x11-base/xorg-proto
virtual/opengl
 "
-BDEPEND="test? ( dev-util/hipcc:${SLOT}[${LLVM_USEDEP}] )"
+BDEPEND="
+   video_cards_amdgpu? (
+   dev-util/hipcc:${SLOT}[${LLVM_USEDEP}]
+   )
+"
 RDEPEND="${DEPEND}
-   dev-util/hipcc:${SLOT}[${LLVM_USEDEP}]
-   dev-perl/URI-Encode
sys-devel/clang-runtime:=
-   >=dev-libs/roct-thunk-interface-5"
+   video_cards_amdgpu? (
+   dev-util/hipcc:${SLOT}[${LLVM_USEDEP}]
+   >=dev-libs/rocm-device-libs-${PV}
+   >=dev-libs/roct-thunk-interface-5
+   )
+"
 
 PATCHES=(
"${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch"
@@ -117,27 +134,50 @@ src_configure() {
 
local mycmakeargs=(
-DCMAKE_PREFIX_PATH="$(get_llvm_prefix)"
-   -DCMAKE_BUILD_TYPE=${buildtype}
-DCMAKE_SKIP_RPATH=ON
-   -DHIP_PLATFORM=amd
+   -D__HIP_ENABLE_PCH="no"
+
+   -DCLR_BUILD_HIP="$(usex hip)"
+   -DCLR_BUILD_OCL="$(usex opencl)"
+
-DHIP_COMMON_DIR="${WORKDIR}/HIP-rocm-${PV}"
-   -DROCM_PATH="${EPREFIX}/usr"
-   -DUSE_PROF_API=0
-   -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
-   -DCLR_BUILD_HIP=ON
-DHIPCC_BIN_DIR="${EPREFIX}/usr/bin"
+   -DROCM_PATH="${EPREFIX}/usr"
+   -DUSE_PROF_API="no"
+   -DFILE_REORG_BACKWARD_COMPATIBILITY="no"
+
-DOpenGL_GL_PREFERENCE="GLVND"
-DCMAKE_DISABLE_FIND_PACKAGE_Git="yes"
)
 
+   if use video_cards_amdgpu; then
+   mycmakeargs+=(
+   -DHIP_PLATFORM="amd"
+   )
+   elif use video_cards_nvidia; then
+   mycmakeargs+=(
+   -DHIPNV_DIR="${EPREFIX}/usr"
+   -DHIP_PLATFORM="nvidia"
+   )
+   fi
+
cmake_src_configure
 
if use test; then
local mycmakeargs=(
-   -DROCM_PATH="${BUILD_DIR}"/hipamd
-   -DHIP_PLATFORM=amd

-DCMAKE_MODULE_PATH="${TEST_S}/external/Catch2/cmake/Catch2"
)
+   if use video_cards_amdgpu; then
+   mycmakeargs+=(
+   -DROCM_PATH="${BUILD_DIR}/hipamd"
+   -DHIP_PLATFORM="amd"
+   )
+   elif use video_cards_nvidia; then
+   mycmakeargs+=(
+   -DROCM_PATH="${BUILD_DIR}/hipother"
+   -DHIP_PLATFORM="nvidia"
+   )
+   fi
HIP_PATH="${EPREFIX}/usr" hip_test_wrapper cmake_src_configure
fi
 }
@@ -187,4 +227,12 @@ src_install() {
EOF
 
dosym -r /usr/include/rocm-core/rocm_version.h 
/usr/include/rocm_version.h
+
+   if use video_cards_nvidia; then
+   newenvd - 99hipconfig <<-EOF
+   HIP_PLATFORM="nvidia"
+   HIP_RUNTIME="cuda"
+   CUDA_PATH="${EPREFIX}/opt/cuda"
+   EOF
+   fi
 }

diff --git a/dev-util/hip/metadata.xml b/dev-util/hip/meta

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2024-06-26 Thread Sam James
commit: cd5841411628af6aa1ea693b9d477e06658cfec8
Author: Paul Zander  gmail  com>
AuthorDate: Tue Jun 25 20:58:01 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jun 26 09:19:28 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd584141

dev-util/hip: 6.1.1 reuse patch

The extend-isa-compatibility-check patch already exists, so reuse it to safe
some space in /files

Signed-off-by: Paul Zander  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 ...p-6.1.0-extend-isa-compatibility-check-v2.patch | 35 ++
 dev-util/hip/hip-6.1.1.ebuild  | 11 ++-
 2 files changed, 45 insertions(+), 1 deletion(-)

diff --git 
a/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch 
b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch
new file mode 100644
index ..d6e95c994c8f
--- /dev/null
+++ b/dev-util/hip/files/hip-6.1.0-extend-isa-compatibility-check-v2.patch
@@ -0,0 +1,35 @@
+From e188c092a987c45caf2ea4651686ea631ca47c3d Mon Sep 17 00:00:00 2001
+From: Paul Zander 
+Date: Tue, 25 Jun 2024 15:22:33 +0200
+Subject: [PATCH] prepare usage of old patch
+
+Signed-off-by: Paul Zander 
+---
+ hipamd/src/hip_code_object.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/hipamd/src/hip_code_object.cpp b/hipamd/src/hip_code_object.cpp
+index 6b3a6d0..fef89df 100644
+--- a/hipamd/src/hip_code_object.cpp
 b/hipamd/src/hip_code_object.cpp
+@@ -410,7 +410,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string 
co_triple_target_id,
+   if (co_triple_target_id == agent_triple_target_id) return true;
+ 
+   // Parse code object triple target id
+-  if (!consume(co_triple_target_id, std::string(kAmdgcnTargetTriple) + '-')) {
++  if (!consume(co_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) 
{
+ return false;
+   }
+ 
+@@ -423,7 +423,7 @@ static bool isCodeObjectCompatibleWithDevice(std::string 
co_triple_target_id,
+   if (!co_triple_target_id.empty()) return false;
+ 
+   // Parse agent isa triple target id
+-  if (!consume(agent_triple_target_id, std::string(kAmdgcnTargetTriple) + 
'-')) {
++  if (!consume(agent_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + 
'-')) {
+ return false;
+   }
+ 
+-- 
+2.45.2
+

diff --git a/dev-util/hip/hip-6.1.1.ebuild b/dev-util/hip/hip-6.1.1.ebuild
index ecdf174fed4b..12f75f31f339 100644
--- a/dev-util/hip/hip-6.1.1.ebuild
+++ b/dev-util/hip/hip-6.1.1.ebuild
@@ -48,7 +48,6 @@ RDEPEND="${DEPEND}
 PATCHES=(
"${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch"
"${FILESDIR}/${PN}-6.1.0-install.patch"
-   "${FILESDIR}/${PN}-6.1.0-extend-isa-compatibility-check.patch"
"${FILESDIR}/${PN}-6.1.1-fix-musl.patch"
 )
 
@@ -60,6 +59,16 @@ hip_test_wrapper() {
 }
 
 src_prepare() {
+   # NOTE We do this head stand to safe the patch size.
+   # NOTE Adjust when we drop 5.7.1
+   sed \
+   -e 's:kAmdgcnTargetTriple:AMDGCN_TARGET_TRIPLE:g' \
+   -i hipamd/src/hip_code_object.cpp || die
+   eapply "${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch"
+   sed \
+   -e 's:AMDGCN_TARGET_TRIPLE:kAmdgcnTargetTriple:g' \
+   -i hipamd/src/hip_code_object.cpp || die
+
# hipamd is itself built by cmake, and should never provide a
# FindHIP.cmake module. But the reality is some package relies on it.
# Set HIP and HIP Clang paths directly, don't search using heuristics



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-06-26 Thread Sam James
commit: c6d5c5158871537f9c9c3822a983b6d992340bdd
Author: Paul Zander  gmail  com>
AuthorDate: Tue Jun 25 21:00:32 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jun 26 09:19:29 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6d5c515

dev-util/hip: 6.1.1 cleanup

Signed-off-by: Paul Zander  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-6.1.1.ebuild | 48 +--
 1 file changed, 28 insertions(+), 20 deletions(-)

diff --git a/dev-util/hip/hip-6.1.1.ebuild b/dev-util/hip/hip-6.1.1.ebuild
index 12f75f31f339..3bc1a3162b5f 100644
--- a/dev-util/hip/hip-6.1.1.ebuild
+++ b/dev-util/hip/hip-6.1.1.ebuild
@@ -15,9 +15,13 @@ TEST_PV=${PV}
 
 DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
 HOMEPAGE="https://github.com/ROCm/clr";
-SRC_URI="https://github.com/ROCm/clr/archive/refs/tags/rocm-${PV}.tar.gz -> 
rocm-clr-${PV}.tar.gz
+SRC_URI="
+   https://github.com/ROCm/clr/archive/refs/tags/rocm-${PV}.tar.gz -> 
rocm-clr-${PV}.tar.gz
https://github.com/ROCm/HIP/archive/refs/tags/rocm-${PV}.tar.gz -> 
hip-${PV}.tar.gz
-   
https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz -> 
hip-test-${TEST_PV}.tar.gz"
+   test? (
+   
https://github.com/ROCm/hip-tests/archive/refs/tags/rocm-${TEST_PV}.tar.gz -> 
hip-test-${TEST_PV}.tar.gz
+   )
+"
 S="${WORKDIR}/clr-rocm-${PV}/"
 TEST_S="${WORKDIR}/hip-tests-rocm-${TEST_PV}/catch"
 
@@ -55,7 +59,7 @@ hip_test_wrapper() {
local CMAKE_USE_DIR="${TEST_S}"
local BUILD_DIR="${TEST_S}_build"
cd "${TEST_S}" || die
-   $@
+   "${@}"
 }
 
 src_prepare() {
@@ -74,24 +78,26 @@ src_prepare() {
# Set HIP and HIP Clang paths directly, don't search using heuristics
sed -e "s:# Search for HIP installation:set(HIP_ROOT_DIR 
\"${EPREFIX}/usr\"):" \
-e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH 
\"$(get_llvm_prefix -d)/bin\"):" \
-   -i "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP.cmake || die
+   -i "${WORKDIR}/HIP-rocm-${PV}/cmake/FindHIP.cmake" || die
 
cmake_src_prepare
 
# With Clang>17 -amdgpu-early-inline-all=true causes OOMs in 
dependencies
# https://github.com/llvm/llvm-project/issues/86332
-   if [ "$LLVM_SLOT" != "17" ]; then
+   if [ "$LLVM_SLOT" -le "17" ]; then
sed -e "s/-mllvm=-amdgpu-early-inline-all=true //" -i 
hipamd/hip-config-amd.cmake || die
-   sed -e "s/-mllvm=-amdgpu-early-inline-all=true;//" -i 
"${WORKDIR}"/HIP-rocm-${PV}/hip-lang-config.cmake.in
+   sed -e "s/-mllvm=-amdgpu-early-inline-all=true;//" -i 
"${WORKDIR}/HIP-rocm-${PV}/hip-lang-config.cmake.in"
fi
 
-   local PATCHES=(
-   "${FILESDIR}"/hip-test-6.0.2-hipcc-system-install.patch
-   "${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch
-   "${FILESDIR}"/hip-test-6.1.0-disable-hipKerArgOptimization.patch
-   "${FILESDIR}"/hip-test-6.1.1-fix-musl.patch
-   )
-   hip_test_wrapper cmake_src_prepare
+   if use test; then
+   local PATCHES=(
+   "${FILESDIR}"/hip-test-6.0.2-hipcc-system-install.patch
+   
"${FILESDIR}"/hip-test-5.7.1-remove-incompatible-flag.patch
+   
"${FILESDIR}"/hip-test-6.1.0-disable-hipKerArgOptimization.patch
+   "${FILESDIR}"/hip-test-6.1.1-fix-musl.patch
+   )
+   hip_test_wrapper cmake_src_prepare
+   fi
 }
 
 src_configure() {
@@ -121,6 +127,7 @@ src_configure() {
-DCLR_BUILD_HIP=ON
-DHIPCC_BIN_DIR="${EPREFIX}/usr/bin"
-DOpenGL_GL_PREFERENCE="GLVND"
+   -DCMAKE_DISABLE_FIND_PACKAGE_Git="yes"
)
 
cmake_src_configure
@@ -171,12 +178,13 @@ src_install() {
 
# add version file that is required by some libraries
mkdir "${ED}"/usr/include/rocm-core || die
-   cat < "${ED}"/usr/include/rocm-core/rocm_version.h || die
-#pragma once
-#define ROCM_VERSION_MAJOR $(ver_cut 1)
-#define ROCM_VERSION_MINOR $(ver_cut 2)
-#define ROCM_VERSION_PATCH $(ver_cut 3)
-#define ROCM_BUILD_INFO "$(ver_cut 1-3).0--unknown"
-EOF
+   cat <<-EOF > "${ED}"/usr/include/rocm-core/rocm_version.h || die
+   #pragma once
+   #define ROCM_VERSION_MAJOR $(ver_cut 1)
+   #define ROCM_VERSION_MINOR $(ver_cut 2)
+   #define ROCM_VERSION_PATCH $(ver_cut 3)
+   #define ROCM_BUILD_INFO "$(ver_cut 1-3).0--unknown"
+   EOF
+
dosym -r /usr/include/rocm-core/rocm_version.h 
/usr/include/rocm_version.h
 }



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-03-11 Thread Sam James
commit: 554481e2e6faedd753f33555358440a89ae02fbf
Author: Eli Schwartz  gmail  com>
AuthorDate: Tue Mar 12 01:37:42 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Tue Mar 12 02:24:46 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=554481e2

dev-util/hip: mark as LTO-unsafe, strict-aliasing unsafe

Closes: https://bugs.gentoo.org/858383
Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-5.7.1-r2.ebuild | 8 
 dev-util/hip/hip-6.0.0.ebuild| 8 
 2 files changed, 16 insertions(+)

diff --git a/dev-util/hip/hip-5.7.1-r2.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild
index 35d67cf0be55..c6c7376c0297 100644
--- a/dev-util/hip/hip-5.7.1-r2.ebuild
+++ b/dev-util/hip/hip-5.7.1-r2.ebuild
@@ -81,6 +81,14 @@ src_prepare() {
 }
 
 src_configure() {
+   # -Werror=strict-aliasing
+   # https://bugs.gentoo.org/858383
+   # https://github.com/ROCm/clr/issues/64
+   #
+   # Do not trust it for LTO either
+   append-flags -fno-strict-aliasing
+   filter-lto
+
# Workaround for bug #923986
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
 

diff --git a/dev-util/hip/hip-6.0.0.ebuild b/dev-util/hip/hip-6.0.0.ebuild
index a2bd451fae26..ff53e07dc49a 100644
--- a/dev-util/hip/hip-6.0.0.ebuild
+++ b/dev-util/hip/hip-6.0.0.ebuild
@@ -79,6 +79,14 @@ src_prepare() {
 }
 
 src_configure() {
+   # -Werror=strict-aliasing
+   # https://bugs.gentoo.org/858383
+   # https://github.com/ROCm/clr/issues/64
+   #
+   # Do not trust it for LTO either
+   append-flags -fno-strict-aliasing
+   filter-lto
+
use debug && CMAKE_BUILD_TYPE="Debug"
 
# Fix ld.lld linker error: https://github.com/ROCm/HIP/issues/3382



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-03-08 Thread Sam James
commit: 2d572c991d49cdd8588264cdcf8ef1fd5e40adad
Author: Sv. Lockal  gmail  com>
AuthorDate: Sun Feb 18 11:57:10 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar  8 19:22:06 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d572c99

dev-util/hip: workaround for ld.lld hipExtModuleLaunchKernel symbol not defined 
error

Bug: https://bugs.gentoo.org/923986
Signed-off-by: Sv. Lockal  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-5.7.1-r2.ebuild | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dev-util/hip/hip-5.7.1-r2.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild
index 034378272f53..35d67cf0be55 100644
--- a/dev-util/hip/hip-5.7.1-r2.ebuild
+++ b/dev-util/hip/hip-5.7.1-r2.ebuild
@@ -7,7 +7,7 @@ DOCS_BUILDER="doxygen"
 DOCS_DEPEND="media-gfx/graphviz"
 ROCM_SKIP_GLOBALS=1
 
-inherit cmake docs llvm rocm
+inherit cmake docs llvm rocm flag-o-matic
 
 LLVM_MAX_SLOT=17
 
@@ -81,6 +81,9 @@ src_prepare() {
 }
 
 src_configure() {
+   # Workaround for bug #923986
+   append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
use debug && CMAKE_BUILD_TYPE="Debug"
 
local mycmakeargs=(



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-03-08 Thread Sam James
commit: 5223e983a0810e46633362ff4dbad6a194208819
Author: Sv. Lockal  gmail  com>
AuthorDate: Wed Jan 10 20:54:05 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar  8 19:22:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5223e983

dev-util/hip: install FindHIP.cmake: it contains hip_add_executable and other 
functions, required in rocTracer, pytorch, etc.

Signed-off-by: Sv. Lockal  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/{hip-5.7.1-r1.ebuild => hip-5.7.1-r2.ebuild} | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/dev-util/hip/hip-5.7.1-r1.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild
similarity index 92%
rename from dev-util/hip/hip-5.7.1-r1.ebuild
rename to dev-util/hip/hip-5.7.1-r2.ebuild
index 7b1a593f23e5..a2ec876aaf25 100644
--- a/dev-util/hip/hip-5.7.1-r1.ebuild
+++ b/dev-util/hip/hip-5.7.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -60,9 +60,10 @@ hip_test_wrapper() {
 }
 
 src_prepare() {
-   # hipamd is itself built by cmake, and should never provide a
-   # FindHIP.cmake module.
-   rm -r "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP* || die
+   # Set HIP and HIP Clang paths directly, don't search using heuristics
+   sed -e "s:# Search for HIP installation:set(HIP_ROOT_DIR 
\"${EPREFIX}/usr\"):" \
+   -e "s:#Set HIP_CLANG_PATH:set(HIP_CLANG_PATH 
\"$(get_llvm_prefix -d ${LLVM_MAX_SLOT})/bin\"):" \
+   -i "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP.cmake || die
 
# 
https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3
# 
https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2024-03-08 Thread Sam James
commit: d49991905031dbe78494f500730da8a43cd2763c
Author: Sv. Lockal  gmail  com>
AuthorDate: Sat Jan 20 15:25:20 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar  8 19:22:05 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4999190

dev-util/hip: add backported fix for OOM check

Fixes failure of oidnTest from media-libs/oidn with HIP from 
https://github.com/gentoo/gentoo/pull/34869

Signed-off-by: Sv. Lockal  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 .../hip/files/hip-5.7.1-fix-mmap-oom-check.patch   | 41 ++
 dev-util/hip/hip-5.7.1-r2.ebuild   |  1 +
 2 files changed, 42 insertions(+)

diff --git a/dev-util/hip/files/hip-5.7.1-fix-mmap-oom-check.patch 
b/dev-util/hip/files/hip-5.7.1-fix-mmap-oom-check.patch
new file mode 100644
index ..dbafe4e11a74
--- /dev/null
+++ b/dev-util/hip/files/hip-5.7.1-fix-mmap-oom-check.patch
@@ -0,0 +1,41 @@
+Backport of SWDEV-417691 - Error handling for MemoryMap OS calls.
+The issue was fixed in rocclr 6.0.0.
+https://github.com/ROCm/clr/commit/7a10423a44b8b353f67539dc1ae14c0b99c209b8
+--- a/rocclr/os/os_posix.cpp
 b/rocclr/os/os_posix.cpp
+@@ -214,7 +214,7 @@ address Os::reserveMemory(address start, size_t size, 
size_t alignment, MemProt
+ MAP_PRIVATE | MAP_NORESERVE | MAP_ANONYMOUS, 
0, 0);
+ 
+   // check for out of memory
+-  if (mem == NULL) return NULL;
++  if (mem == MAP_FAILED) return NULL;
+ 
+   address aligned = alignUp(mem, alignment);
+ 
+@@ -842,7 +842,7 @@ bool Os::MemoryMapFileDesc(FileDesc fdesc, size_t fsize, 
size_t foffset, const v
+   }
+ 
+   *mmap_ptr = mmap(NULL, fsize, PROT_READ, MAP_SHARED, fdesc, foffset);
+-  return true;
++  return (*mmap_ptr == MAP_FAILED) ? false : true;
+ }
+ 
+ bool Os::MemoryUnmapFile(const void* mmap_ptr, size_t mmap_size) {
+@@ -874,7 +874,7 @@ bool Os::MemoryMapFile(const char* fname, const void** 
mmap_ptr, size_t* mmap_si
+ 
+   close(fd);
+ 
+-  if (*mmap_ptr == nullptr) {
++  if (*mmap_ptr == MAP_FAILED) {
+ return false;
+   }
+ 
+@@ -899,7 +899,7 @@ bool Os::MemoryMapFileTruncated(const char* fname, const 
void** mmap_ptr, size_t
+ 
+   close(fd);
+ 
+-  if (*mmap_ptr == nullptr) {
++  if (*mmap_ptr == MAP_FAILED) {
+ return false;
+   }
+ 
\ No newline at end of file

diff --git a/dev-util/hip/hip-5.7.1-r2.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild
index f91ef2a7083c..034378272f53 100644
--- a/dev-util/hip/hip-5.7.1-r2.ebuild
+++ b/dev-util/hip/hip-5.7.1-r2.ebuild
@@ -47,6 +47,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.7.1-disable-stack-protector.patch"
"${FILESDIR}/${PN}-5.7.1-no_asan_doc.patch"
"${FILESDIR}/${PN}-5.7.1-extend-isa-compatibility-check.patch"
+   "${FILESDIR}/${PN}-5.7.1-fix-mmap-oom-check.patch"
 )
 
 S="${WORKDIR}/clr-rocm-${PV}/"



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-03-08 Thread Sam James
commit: d00e98ab2ba2745e6d36b756d7c87de47dccb796
Author: Sv. Lockal  gmail  com>
AuthorDate: Fri Jan 12 14:35:46 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Mar  8 19:22:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d00e98ab

dev-util/hip: add rocm_version.h header (required by some 
caffe2/fbgemm/rocprofiler)

Signed-off-by: Sv. Lockal  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-5.7.1-r2.ebuild | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/dev-util/hip/hip-5.7.1-r2.ebuild b/dev-util/hip/hip-5.7.1-r2.ebuild
index a2ec876aaf25..f91ef2a7083c 100644
--- a/dev-util/hip/hip-5.7.1-r2.ebuild
+++ b/dev-util/hip/hip-5.7.1-r2.ebuild
@@ -142,6 +142,17 @@ src_test() {
 src_install() {
cmake_src_install
 
+   # add version file that is required by some libraries
+   mkdir "${ED}"/usr/include/rocm-core || die
+   cat < "${ED}"/usr/include/rocm-core/rocm_version.h || die
+#pragma once
+#define ROCM_VERSION_MAJOR $(ver_cut 1)
+#define ROCM_VERSION_MINOR $(ver_cut 2)
+#define ROCM_VERSION_PATCH $(ver_cut 3)
+#define ROCM_BUILD_INFO "$(ver_cut 1-3).0--unknown"
+EOF
+   dosym -r /usr/include/rocm-core/rocm_version.h 
/usr/include/rocm_version.h
+
rm "${ED}/usr/include/hip/hcc_detail" || die
 
# files already installed by hipcc, which is a build dep



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-01-05 Thread Sam James
commit: 7d7e14a04b5f885578676e5d58e30a14628e6d38
Author: Sam James  gentoo  org>
AuthorDate: Sat Jan  6 07:21:04 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jan  6 07:21:28 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d7e14a0

dev-util/hip: apply undefined-version if linker supports it

Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-6.0.0.ebuild | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/dev-util/hip/hip-6.0.0.ebuild b/dev-util/hip/hip-6.0.0.ebuild
index 40efa9317ab4..a2bd451fae26 100644
--- a/dev-util/hip/hip-6.0.0.ebuild
+++ b/dev-util/hip/hip-6.0.0.ebuild
@@ -7,7 +7,7 @@ DOCS_BUILDER="doxygen"
 DOCS_DEPEND="media-gfx/graphviz"
 ROCM_SKIP_GLOBALS=1
 
-inherit cmake docs llvm rocm
+inherit cmake docs flag-o-matic llvm rocm
 
 LLVM_MAX_SLOT=17
 
@@ -83,13 +83,7 @@ src_configure() {
 
# Fix ld.lld linker error: https://github.com/ROCm/HIP/issues/3382
# See also: https://github.com/gentoo/gentoo/pull/29097
-
-   # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
-   # https://github.com/gentoo/gentoo/pull/28355
-   # mold needs this too but right now tc-ld-is-mold is also not available
-   if tc-ld-is-lld; then
-   append-ldflags -Wl,--undefined-version
-   fi
+   append-ldflags $(tc-flags-CCLD -Wl,--undefined-version)
 
local mycmakeargs=(
-DCMAKE_PREFIX_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2024-01-05 Thread Sam James
commit: 9fb562001ae0cf172c89dfa4561c6af6c996a406
Author: Sv. Lockal  gmail  com>
AuthorDate: Mon Jan  1 18:05:03 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jan  6 07:20:19 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fb56200

dev-util/hip: fix linker error for ld.lld: error: version script assignment 
issue

Closes: https://bugs.gentoo.org/921171
See also: https://github.com/gentoo/gentoo/pull/29097
Signed-off-by: Sv. Lockal  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34595
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-6.0.0.ebuild | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dev-util/hip/hip-6.0.0.ebuild b/dev-util/hip/hip-6.0.0.ebuild
index 9f8f62ca11ad..40efa9317ab4 100644
--- a/dev-util/hip/hip-6.0.0.ebuild
+++ b/dev-util/hip/hip-6.0.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -81,6 +81,16 @@ src_prepare() {
 src_configure() {
use debug && CMAKE_BUILD_TYPE="Debug"
 
+   # Fix ld.lld linker error: https://github.com/ROCm/HIP/issues/3382
+   # See also: https://github.com/gentoo/gentoo/pull/29097
+
+   # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+   # https://github.com/gentoo/gentoo/pull/28355
+   # mold needs this too but right now tc-ld-is-mold is also not available
+   if tc-ld-is-lld; then
+   append-ldflags -Wl,--undefined-version
+   fi
+
local mycmakeargs=(
-DCMAKE_PREFIX_PATH="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
-DCMAKE_BUILD_TYPE=${buildtype}



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-12-23 Thread 罗百科
commit: f01b5a948a8445e5777a4eb611c4fd47f257aa10
Author: Patrick Lauer  gentoo  org>
AuthorDate: Sat Dec 23 10:36:59 2023 +
Commit: 罗百科  gentoo  org>
CommitDate: Sat Dec 23 10:43:41 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f01b5a94

dev-util/hip: add 6.0.0

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/Manifest |   2 +
 dev-util/hip/hip-6.0.0.ebuild | 152 ++
 2 files changed, 154 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 13df1e2aaa2d..98d00a1edc40 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,11 +1,13 @@
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
 DIST hip-5.7.1.tar.gz 553774 BLAKE2B 
f88c235f688d3a662ec6cb4ad7fe3f82c0015015997871609cc30ab5b2f7fcb9709a08683d77194e45a6dbbe1d24c6355b128d2ecf655f1dea3468711c64e0a3
 SHA512 
68fa8753725b53c999d102d254c6b1dba53af4e00d6a48db93d10213cc02eec30b4a39c66e773d4f625dd9636cf8b0c5faa05b69fac27cf5a6b19dd3ddd2b905
+DIST hip-6.0.0.tar.gz 243451 BLAKE2B 
c404d23f7ee46a6c5601077d598edf4d6b2ca48da5e6cabf45c926ee1224eedc3d9eb6715948bc44cf3da2431a2feb879b1b8cd35bac69319c9dc066ab2e12f7
 SHA512 
2beb100812f9f515d6bc29fd4930913c2ff64c4f824727c9fc38d2e249841c840bd35357f652ab2b5022d166331de8f7409e72c49a5f69042f54f16a6a290339
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 
9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11
 SHA512 
c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
 DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B 
e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9
 SHA512 
4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f
 DIST rocm-5.7.0.tar.gz 845881 BLAKE2B 
08255edc1407e5ef85895336b11496319695318fce265565728ad75175b5e1dfab98f696fee2d27e60c48e862f721fad4c53118cc70b807353fff5f97ed72ac2
 SHA512 
72420e16c7cfe9687e030331838666dabaa43d686bdad1d109431e44db99070a2cf6dd64b59e3275019abedd6612f6008c798a79275e7225b6b122fb9f644660
 DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 
3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4
 SHA512 
d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965
+DIST rocm-clr-6.0.0.tar.gz 1983453 BLAKE2B 
2cf6ec7c3b0ec5dedeea94ff54af30662b781fc2eee22e3315094af61dc9d331eba33c1d9d463295848c5724e515a3137f9b189c1261273afad1a5f9d32226c2
 SHA512 
12e77a121150d8c25121b98bd7c6233c2568f9f4130bdbe6bc3ab225f14b8bea6a6bdc4ed497c0f999d3d3daabdca0de8caaa1b69911c11974b5d6f951734433
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
 DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 
7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb
 SHA512 
1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43

diff --git a/dev-util/hip/hip-6.0.0.ebuild b/dev-util/hip/hip-6.0.0.ebuild
new file mode 100644
index ..9f8f62ca11ad
--- /dev/null
+++ b/dev-util/hip/hip-6.0.0.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU Genera

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-12-14 Thread Benda XU
commit: 093aafa4f80f05873a812a69f072413609da50ac
Author: Sv. Lockal  gmail  com>
AuthorDate: Fri Oct 20 22:02:59 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Dec 14 15:01:59 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=093aafa4

dev-util/hip: add extend-isa-compatibility-check patch

Bug: https://github.com/gentoo/gentoo/pull/33400
Signed-off-by: Benda Xu  gentoo.org>
Signed-off-by: Sv. Lockal  gmail.com>

 .../hip-5.7.1-extend-isa-compatibility-check.patch | 236 +
 dev-util/hip/hip-5.7.1-r1.ebuild   |   1 +
 2 files changed, 237 insertions(+)

diff --git a/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch 
b/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch
new file mode 100644
index ..7853de693cde
--- /dev/null
+++ b/dev-util/hip/files/hip-5.7.1-extend-isa-compatibility-check.patch
@@ -0,0 +1,236 @@
+Combined with matching changes within rocr-runtime ebuild, this patch allows
+to load compatible kernels whenever possible.
+For example if AMDGPU_TARGETS is set to gfx1030 and some application
+was started on gfx1036, it loads gfx1030 kernel.
+
+Author: Cordell Bloor 
+https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0025-improve-rocclr-isa-compatibility-check.patch
+https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/master/debian/patches/0026-extend-hip-isa-compatibility-check.patch
+--- a/hipamd/src/hip_code_object.cpp
 b/hipamd/src/hip_code_object.cpp
+@@ -390,47 +390,123 @@ static bool getTripleTargetID(std::string 
bundled_co_entry_id, const void* code_
+   return true;
+ }
+ 
+-static bool isCodeObjectCompatibleWithDevice(std::string co_triple_target_id,
+- std::string 
agent_triple_target_id) {
++struct GfxPattern {
++  std::string root;
++  std::string suffixes;
++};
++
++static bool matches(const GfxPattern& p, const std::string& s) {
++  if (p.root.size() + 1 != s.size()) {
++return false;
++  }
++  if (0 != std::memcmp(p.root.data(), s.data(), p.root.size())) {
++return false;
++  }
++  return p.suffixes.find(s[p.root.size()]) != std::string::npos;
++}
++
++static bool isGfx900EquivalentProcessor(const std::string& processor) {
++  return matches(GfxPattern{"gfx90", "029c"}, processor);
++}
++
++static bool isGfx900SupersetProcessor(const std::string& processor) {
++  return matches(GfxPattern{"gfx90", "0269c"}, processor);
++}
++
++static bool isGfx1030EquivalentProcessor(const std::string& processor) {
++  return matches(GfxPattern{"gfx103", "0123456"}, processor);
++}
++
++static bool isGfx1010EquivalentProcessor(const std::string& processor) {
++  return matches(GfxPattern{"gfx101", "02"}, processor);
++}
++
++static bool isGfx1010SupersetProcessor(const std::string& processor) {
++  return matches(GfxPattern{"gfx101", "0123"}, processor);
++}
++
++enum CompatibilityScore {
++  CS_EXACT_MATCH   = 1 << 4,
++  CS_PROCESSOR_MATCH   = 1 << 3,
++  CS_PROCESSOR_COMPATIBLE  = 1 << 2,
++  CS_XNACK_SPECIALIZED = 1 << 1,
++  CS_SRAM_ECC_SPECIALIZED  = 1 << 0,
++  CS_INCOMPATIBLE  = 0,
++};
++
++static int getProcessorCompatibilityScore(const std::string& co_processor,
++  const std::string& agent_processor) 
{
++  if (co_processor == agent_processor)
++return CS_PROCESSOR_MATCH;
++
++  if (isGfx900SupersetProcessor(agent_processor))
++return isGfx900EquivalentProcessor(co_processor) ? 
CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE;
++
++  if (isGfx1010SupersetProcessor(agent_processor))
++return isGfx1010EquivalentProcessor(co_processor) ? 
CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE;
++
++  if (isGfx1030EquivalentProcessor(agent_processor))
++return isGfx1030EquivalentProcessor(co_processor) ? 
CS_PROCESSOR_COMPATIBLE : CS_INCOMPATIBLE;
++
++  return CS_INCOMPATIBLE;
++}
++
++static int getCompatiblityScore(std::string co_triple_target_id,
++std::string agent_triple_target_id) {
+   // Primitive Check
+-  if (co_triple_target_id == agent_triple_target_id) return true;
++  if (co_triple_target_id == agent_triple_target_id) return CS_EXACT_MATCH;
+ 
+   // Parse code object triple target id
+   if (!consume(co_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + '-')) 
{
+-return false;
++return CS_INCOMPATIBLE;
+   }
+ 
+   std::string co_processor;
+   char co_sram_ecc, co_xnack;
+   if (!getTargetIDValue(co_triple_target_id, co_processor, co_sram_ecc, 
co_xnack)) {
+-return false;
++return CS_INCOMPATIBLE;
+   }
+ 
+-  if (!co_triple_target_id.empty()) return false;
++  if (!co_triple_target_id.empty()) return CS_INCOMPATIBLE;
+ 
+   // Parse agent isa triple target id
+   if (!consume(agent_triple_target_id, std::string(AMDGCN_TARGET_TRIPLE) + 
'-')) {
+-return false;
++return CS_INCOMPATIBLE;
+   }
+ 
+   std::string agent_isa_processor;
+   char isa_s

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-12-14 Thread Benda XU
commit: 2f762d4c8b48897a82f79bd64b7b8bc1aee8b98f
Author: Benda Xu  gentoo  org>
AuthorDate: Sat Nov 18 03:41:01 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Dec 14 14:51:04 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f762d4c

dev-util/hip: depend on rocr-runtime.

HIP uses hsa_amd_memory_copy_engine_status() function, only available
in rocr-runtime newer than 5.6.0.

Closes: https://bugs.gentoo.org/913208
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.7.1-r1.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-util/hip/hip-5.7.1-r1.ebuild b/dev-util/hip/hip-5.7.1-r1.ebuild
index c9094afe5ba6..8eb15a833e66 100644
--- a/dev-util/hip/hip-5.7.1-r1.ebuild
+++ b/dev-util/hip/hip-5.7.1-r1.ebuild
@@ -26,6 +26,7 @@ DEPEND="
>=dev-util/rocminfo-5
sys-devel/clang:${LLVM_MAX_SLOT}
dev-libs/rocm-comgr:${SLOT}
+   >=dev-libs/rocr-runtime-5.6
x11-base/xorg-proto
virtual/opengl
 "



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-12-14 Thread Benda XU
commit: 5297819d6d04e8608d329a12afa05dd68ea4f10f
Author: Benda Xu  gentoo  org>
AuthorDate: Sat Nov 18 14:54:50 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Dec 14 15:01:47 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5297819d

dev-util/hip: include test suit.

The dev-util/hip upstream has separated its test cases into a full git
repository with an independent build system.  To run the test cases,
we have to call cmake twice in every src_* phase. I come up with a
wrapper to hack CMAKE_USE_DIR and BUILD_DIR values.

Ignore vulkan tests before someone could figure out how to properly
run them.

Reference: https://github.com/ROCm-Developer-Tools/HIP/issues/3292
Closes: https://github.com/gentoo/gentoo/pull/33906
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/Manifest  |  1 +
 ...test-5.7.0-rocm_agent_enumerator-location.patch | 15 +
 dev-util/hip/hip-5.7.1-r1.ebuild   | 75 +++---
 3 files changed, 82 insertions(+), 9 deletions(-)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index d84cbf43fe2e..13df1e2aaa2d 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -4,6 +4,7 @@ DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 
9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11
 SHA512 
c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
 DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B 
e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9
 SHA512 
4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f
+DIST rocm-5.7.0.tar.gz 845881 BLAKE2B 
08255edc1407e5ef85895336b11496319695318fce265565728ad75175b5e1dfab98f696fee2d27e60c48e862f721fad4c53118cc70b807353fff5f97ed72ac2
 SHA512 
72420e16c7cfe9687e030331838666dabaa43d686bdad1d109431e44db99070a2cf6dd64b59e3275019abedd6612f6008c798a79275e7225b6b122fb9f644660
 DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 
3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4
 SHA512 
d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87

diff --git 
a/dev-util/hip/files/hip-test-5.7.0-rocm_agent_enumerator-location.patch 
b/dev-util/hip/files/hip-test-5.7.0-rocm_agent_enumerator-location.patch
new file mode 100644
index ..1d967212ac9a
--- /dev/null
+++ b/dev-util/hip/files/hip-test-5.7.0-rocm_agent_enumerator-location.patch
@@ -0,0 +1,15 @@
+In Gentoo rocm_agent_enumerator is installed by rocminfo and is in PATH.
+
+--- catch/CMakeLists.txt~  2023-11-18 13:56:08.0 +0800
 catch/CMakeLists.txt   2023-11-18 13:59:28.136170638 +0800
+@@ -182,9 +182,8 @@
+ # rocm_agent_enumerator
+ if(NOT DEFINED OFFLOAD_ARCH_STR
+AND NOT DEFINED ENV{HCC_AMDGPU_TARGET}
+-   AND EXISTS "${ROCM_PATH}/bin/rocm_agent_enumerator"
+AND HIP_PLATFORM STREQUAL "amd" AND UNIX)
+-execute_process(COMMAND ${ROCM_PATH}/bin/rocm_agent_enumerator
++execute_process(COMMAND rocm_agent_enumerator
+  OUTPUT_VARIABLE HIP_GPU_ARCH
+  RESULT_VARIABLE ROCM_AGENT_ENUM_RESULT)
+ # Trim out gfx000

diff --git a/dev-util/hip/hip-5.7.1-r1.ebuild b/dev-util/hip/hip-5.7.1-r1.ebuild
index 8eb15a833e66..2bc703093df9 100644
--- a/dev-util/hip/hip-5.7.1-r1.ebuild
+++ b/dev-util/hip/hip-5.7.1-r1.ebuild
@@ -5,21 +5,26 @@ EAPI=8
 
 DOCS_BUILDER="doxygen"
 DOCS_DEPEND="media-gfx/graphviz"
+ROCM_SKIP_GLOBALS=1
 
-inherit cmake docs llvm
+inherit cmake docs llvm rocm
 
 LLVM_MAX_SLOT=17
 
+TEST_PV=5.7.0 # No hip-test-5.7.1 release
+
 DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
 HOMEPAGE="ht

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-12-14 Thread Benda XU
commit: bceba55c72407a9669165f0be9985e54d3a8f0a6
Author: Benda Xu  gentoo  org>
AuthorDate: Mon Nov 20 02:56:38 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Dec 14 15:01:59 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bceba55c

dev-util/hip: get rid of FindHIP and keep hip-config.

According to the cmake documentation, do not write find modules for
packages that themselves build with CMake. Instead provide a CMake
package configuration file with the package itself.

FindHIP is needed by HIP over CUDA, not what Gentoo is aiming for.

Reference: https://github.com/ROCmSoftwarePlatform/hipFFT/pull/66
Reference: https://cmake.org/cmake/help/latest/command/find_package.html
Bug: https://github.com/ROCm-Developer-Tools/hipamd/issues/39
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.7.1-r1.ebuild | 4 
 1 file changed, 4 insertions(+)

diff --git a/dev-util/hip/hip-5.7.1-r1.ebuild b/dev-util/hip/hip-5.7.1-r1.ebuild
index 2bc703093df9..25601091075f 100644
--- a/dev-util/hip/hip-5.7.1-r1.ebuild
+++ b/dev-util/hip/hip-5.7.1-r1.ebuild
@@ -59,6 +59,10 @@ hip_test_wrapper() {
 }
 
 src_prepare() {
+   # hipamd is itself built by cmake, and should never provide a
+   # FindHIP.cmake module.
+   rm -r "${WORKDIR}"/HIP-rocm-${PV}/cmake/FindHIP* || die
+
# 
https://github.com/ROCm-Developer-Tools/HIP/commit/405d029422ba8bb6be5a233d5eebedd2ad2e8bd3
# 
https://github.com/ROCm-Developer-Tools/clr/commit/ab6d34ae773f4d151e04170c0f4e46c1135ddf3e
# Migrated to hip-test, but somehow the change is not applied to the 
tarball.



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-11-19 Thread 罗百科
commit: 6939c8b154a1312c2b6c3ef71ebbe39c2d76b208
Author: Patrick Lauer  gentoo  org>
AuthorDate: Sun Nov 19 06:24:59 2023 +
Commit: 罗百科  gentoo  org>
CommitDate: Sun Nov 19 11:29:59 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6939c8b1

dev-util/hip: Force rebuild through revbump

Changes in last few commits are otherwise invisible

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/{hip-5.7.1.ebuild => hip-5.7.1-r1.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/dev-util/hip/hip-5.7.1.ebuild b/dev-util/hip/hip-5.7.1-r1.ebuild
similarity index 100%
rename from dev-util/hip/hip-5.7.1.ebuild
rename to dev-util/hip/hip-5.7.1-r1.ebuild



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2023-11-18 Thread Benda XU
commit: 74964e47d7cb86d9cbb992f02e9de25a554727ac
Author: Sv. Lockal  gmail  com>
AuthorDate: Wed Oct 18 18:34:10 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Sun Nov 19 02:18:21 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74964e47

dev-util/hip: fix crashes and QA issues.

- add fix-unaligned-memcpy.patch
- add exec-stack.patch
- add disable-stack-protector patch
- drop asan doc from the build system.

Closes: https://bugs.gentoo.org/915969
Bug: https://github.com/ROCm-Developer-Tools/clr/issues/18
Bug: https://github.com/gentoo/gentoo/pull/33400
Bug: https://github.com/ROCm-Developer-Tools/clr/issues/22
Bug: https://github.com/ROCm-Developer-Tools/clr/issues/21
Bug: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/issues/61
Signed-off-by: Sv. Lockal  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 .../files/hip-5.7.1-disable-stack-protector.patch  | 13 +
 dev-util/hip/files/hip-5.7.1-exec-stack.patch  | 31 ++
 .../hip/files/hip-5.7.1-fix-unaligned-access.patch | 67 ++
 dev-util/hip/files/hip-5.7.1-no_asan_doc.patch | 17 ++
 dev-util/hip/hip-5.7.1.ebuild  |  9 ++-
 5 files changed, 134 insertions(+), 3 deletions(-)

diff --git a/dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch 
b/dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch
new file mode 100644
index ..49d944ef4bc9
--- /dev/null
+++ b/dev-util/hip/files/hip-5.7.1-disable-stack-protector.patch
@@ -0,0 +1,13 @@
+Disable stack-protector (which is enabled by default gentoo-hardened) in 
device code.
+This is not required after https://github.com/llvm/llvm-project/pull/70799, 
but helps with older clang.
+Upstream bug: https://github.com/ROCm-Developer-Tools/clr/issues/21
+--- a/hipamd/src/hiprtc/hiprtcInternal.cpp
 b/hipamd/src/hiprtc/hiprtcInternal.cpp
+@@ -144,6 +144,7 @@ RTCCompileProgram::RTCCompileProgram(std::string name_) : 
RTCProgram(name_), fgp
+   compile_options_.push_back("-nogpuinc");
+   compile_options_.push_back("-Wno-gnu-line-marker");
+   compile_options_.push_back("-Wno-missing-prototypes");
++  compile_options_.push_back("-fno-stack-protector");
+ #ifdef _WIN32
+   compile_options_.push_back("-target");
+   compile_options_.push_back("x86_64-pc-windows-msvc");

diff --git a/dev-util/hip/files/hip-5.7.1-exec-stack.patch 
b/dev-util/hip/files/hip-5.7.1-exec-stack.patch
new file mode 100644
index ..744ca7b953c3
--- /dev/null
+++ b/dev-util/hip/files/hip-5.7.1-exec-stack.patch
@@ -0,0 +1,31 @@
+Upstream bug: https://github.com/ROCm-Developer-Tools/clr/issues/22
+--- a/hipamd/src/hip_embed_pch.sh
 b/hipamd/src/hip_embed_pch.sh
+@@ -178,6 +178,7 @@ EOF
+ 
+   echo "// Automatically generated script for HIP RTC." > $mcinFile
+   if [[ $isWindows -eq 0 ]]; then
++echo "  .section .note.GNU-stack,"",%progbits" >> $mcinFile
+ echo "  .type __hipRTC_header,@object" >> $mcinFile
+ echo "  .type __hipRTC_header_size,@object" >> $mcinFile
+   fi
+--- a/hipamd/src/hiprtc/cmake/HIPRTC.cmake
 b/hipamd/src/hiprtc/cmake/HIPRTC.cmake
+@@ -98,6 +98,7 @@ macro(generate_hiprtc_mcin HiprtcMcin 
HiprtcPreprocessedInput)
+ set(HIPRTC_TYPE_LINUX_ONLY "")
+   else()
+ set(HIPRTC_TYPE_LINUX_ONLY
++  "  .section .note.GNU-stack,\"\",%progbits\n"
+   "  .type __hipRTC_header,@object\n"
+   "  .type __hipRTC_header_size,@object")
+   endif()
+--- a/hipamd/src/hip_embed_pch.sh
 b/hipamd/src/hip_embed_pch.sh
+@@ -111,6 +111,7 @@ cat >$tmp/hip_pch.h <$tmp/hip_pch.mcin (dst)++,
+-  *reinterpret_cast(src)++);
+-}
+-size = size % sizeof(__m512i);
+-  #endif
+-
+-  #if defined(__AVX__)
+-for (auto i = 0u; i != size / sizeof(__m256i); ++i) {
+-  _mm256_stream_si256(reinterpret_cast<__m256i* __restrict&>(dst)++,
+-  *reinterpret_cast(src)++);
+-}
+-size = size % sizeof(__m256i);
+-  #endif
+-
+-  for (auto i = 0u; i != size / sizeof(__m128i); ++i) {
+-_mm_stream_si128(reinterpret_cast<__m128i* __restrict&>(dst)++,
+- *(reinterpret_cast(src)++));
+-  }
+-  size = size % sizeof(__m128i);
+-
+-  for (auto i = 0u; i != size 

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-10-30 Thread 罗百科
commit: 0dd665557da43c242e80202948ed39737ff3cfcb
Author: Patrick Lauer  gentoo  org>
AuthorDate: Mon Oct 30 09:18:30 2023 +
Commit: 罗百科  gentoo  org>
CommitDate: Mon Oct 30 09:22:28 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dd66555

dev-util/hip: Fix dependencies

xorg-proto is usually installed as a transitive dependency.
This fails when binpkgs are involved.
Make the implicit dependency explicit.

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/hip-5.7.1.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-util/hip/hip-5.7.1.ebuild b/dev-util/hip/hip-5.7.1.ebuild
index 53bce91a3f33..0bba0d2f560b 100644
--- a/dev-util/hip/hip-5.7.1.ebuild
+++ b/dev-util/hip/hip-5.7.1.ebuild
@@ -26,6 +26,7 @@ DEPEND="
>=dev-util/rocminfo-5
sys-devel/clang:${LLVM_MAX_SLOT}
dev-libs/rocm-comgr:${SLOT}
+   x11-base/xorg-proto
virtual/opengl
 "
 RDEPEND="${DEPEND}



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-10-27 Thread Andrew Ammerlaan
commit: 551e21f67cfdeb25d6c04d5b66bec0bc9308d248
Author: Yiyang Wu  gmail  com>
AuthorDate: Sun Oct 22 00:41:25 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Fri Oct 27 08:14:01 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=551e21f6

dev-util/hip: prefixify cmake variables

Closes: https://bugs.gentoo.org/916062
Signed-off-by: Yiyang Wu  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33437
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 dev-util/hip/hip-5.7.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-util/hip/hip-5.7.1.ebuild b/dev-util/hip/hip-5.7.1.ebuild
index bf7dd830e283..53bce91a3f33 100644
--- a/dev-util/hip/hip-5.7.1.ebuild
+++ b/dev-util/hip/hip-5.7.1.ebuild
@@ -59,7 +59,7 @@ src_configure() {
-DUSE_PROF_API=0
-DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
-DCLR_BUILD_HIP=ON
-   -DHIPCC_BIN_DIR=/usr/bin
+   -DHIPCC_BIN_DIR="${EPREFIX}/usr/bin"
-DOpenGL_GL_PREFERENCE="GLVND"
)
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-10-19 Thread 罗百科
commit: 3c9a4e09a3d70b77a886c8216913bd4ba543f592
Author: Patrick Lauer  gentoo  org>
AuthorDate: Thu Oct 19 10:38:31 2023 +
Commit: 罗百科  gentoo  org>
CommitDate: Thu Oct 19 10:38:46 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c9a4e09

dev-util/hip: add 5.7.1, drop 5.7.0

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/Manifest   | 4 ++--
 dev-util/hip/{hip-5.7.0.ebuild => hip-5.7.1.ebuild} | 0
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index b3a6181bb24a..d84cbf43fe2e 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,10 +1,10 @@
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
-DIST hip-5.7.0.tar.gz 553784 BLAKE2B 
bb22d46b04888301f45892380cf559f8b607215d0820431a9ecbf912af2c352d145a66d4d82c7485eb21d94c71d324d806be5f0c87d2a0ad501f223571b1a2d6
 SHA512 
02d42f0abb81c21a6929eff2257975eca4a022e6f9fc84e7ff46b84c8f40a69074bf3cad9f09ecd05a26c7a3bde30c67ef44cb028a5206e0738535a0dc4f6145
+DIST hip-5.7.1.tar.gz 553774 BLAKE2B 
f88c235f688d3a662ec6cb4ad7fe3f82c0015015997871609cc30ab5b2f7fcb9709a08683d77194e45a6dbbe1d24c6355b128d2ecf655f1dea3468711c64e0a3
 SHA512 
68fa8753725b53c999d102d254c6b1dba53af4e00d6a48db93d10213cc02eec30b4a39c66e773d4f625dd9636cf8b0c5faa05b69fac27cf5a6b19dd3ddd2b905
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 
9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11
 SHA512 
c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
 DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B 
e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9
 SHA512 
4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f
-DIST rocm-clr-5.7.0.tar.gz 2008521 BLAKE2B 
2edc6955a8b8bfd419f3e77e553081816fc3d8b8147d485f47006eb1aa2480dcc1aefa6641ca2ee610d855970946d194db13aa529830d09e74e411636b845bf2
 SHA512 
2c36e44ce488c01deaae4a73daad2b18d34c0a23a8ad1b72cee0936e6e3651f47275a84190f4f92eadd1dceb153cd4dd3746dd40066055bda65902aec40b8071
+DIST rocm-clr-5.7.1.tar.gz 2008647 BLAKE2B 
3db0760d6f83504e60caf88a2dd5e0bc02c7db9d6f263ad0eb2cfc79aa0f88a3699c412844a0158a796d9d02e79660287e791edad787d814eefffea4fd2298b4
 SHA512 
d79323481d82fc02c12a32cdcc0d14437d512af023e7737db0387b7eecb27fe6e4ae7c71d6adce57932a04bb24c880440d9dc10aeb5af11a4f2ca64d44330965
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
 DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 
7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb
 SHA512 
1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43

diff --git a/dev-util/hip/hip-5.7.0.ebuild b/dev-util/hip/hip-5.7.1.ebuild
similarity index 100%
rename from dev-util/hip/hip-5.7.0.ebuild
rename to dev-util/hip/hip-5.7.1.ebuild



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-10-09 Thread 罗百科
commit: 78d2ff1e77aa11557868517248f67c1bdde3181a
Author: Patrick Lauer  gentoo  org>
AuthorDate: Mon Oct  9 16:25:26 2023 +
Commit: 罗百科  gentoo  org>
CommitDate: Mon Oct  9 16:27:42 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78d2ff1e

dev-util/hip: add 5.7.0

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/Manifest  |  2 +
 dev-util/hip/files/hip-5.7.0-install.patch | 13 +
 dev-util/hip/hip-5.7.0.ebuild  | 85 ++
 3 files changed, 100 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 61341cfb54ec..b3a6181bb24a 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,8 +1,10 @@
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
+DIST hip-5.7.0.tar.gz 553784 BLAKE2B 
bb22d46b04888301f45892380cf559f8b607215d0820431a9ecbf912af2c352d145a66d4d82c7485eb21d94c71d324d806be5f0c87d2a0ad501f223571b1a2d6
 SHA512 
02d42f0abb81c21a6929eff2257975eca4a022e6f9fc84e7ff46b84c8f40a69074bf3cad9f09ecd05a26c7a3bde30c67ef44cb028a5206e0738535a0dc4f6145
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 
9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11
 SHA512 
c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
 DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B 
e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9
 SHA512 
4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f
+DIST rocm-clr-5.7.0.tar.gz 2008521 BLAKE2B 
2edc6955a8b8bfd419f3e77e553081816fc3d8b8147d485f47006eb1aa2480dcc1aefa6641ca2ee610d855970946d194db13aa529830d09e74e411636b845bf2
 SHA512 
2c36e44ce488c01deaae4a73daad2b18d34c0a23a8ad1b72cee0936e6e3651f47275a84190f4f92eadd1dceb153cd4dd3746dd40066055bda65902aec40b8071
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
 DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 
7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb
 SHA512 
1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43

diff --git a/dev-util/hip/files/hip-5.7.0-install.patch 
b/dev-util/hip/files/hip-5.7.0-install.patch
new file mode 100644
index ..668e24af7c52
--- /dev/null
+++ b/dev-util/hip/files/hip-5.7.0-install.patch
@@ -0,0 +1,13 @@
+diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
+index a472c5b7a..ac6fdc2ab 100755
+--- a/hipamd/CMakeLists.txt
 b/hipamd/CMakeLists.txt
+@@ -396,8 +396,6 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "")
+   install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin)
+   install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin)
+   install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin)
+-  install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin)
+-  install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin)
+ endif()
+ 
+ #

diff --git a/dev-util/hip/hip-5.7.0.ebuild b/dev-util/hip/hip-5.7.0.ebuild
new file mode 100644
index ..bf7dd830e283
--- /dev/null
+++ b/dev-util/hip/hip-5.7.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+D

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2023-09-02 Thread 罗百科
commit: b82c9c796475c8d55d310405190c97a38f6d1c7e
Author: Patrick Lauer  gentoo  org>
AuthorDate: Sun Sep  3 06:35:45 2023 +
Commit: 罗百科  gentoo  org>
CommitDate: Sun Sep  3 06:37:36 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b82c9c79

dev-util/hip: add 5.5.1

Closes: https://bugs.gentoo.org/908501
Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/Manifest |   4 +
 dev-util/hip/files/hip-5.5.1-disable-Werror.patch |  18 +++
 dev-util/hip/hip-5.5.1.ebuild | 152 ++
 3 files changed, 174 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 8cb4cece793c..61341cfb54ec 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -2,13 +2,17 @@ DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96ea
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
 DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 
9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11
 SHA512 
c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
+DIST rocclr-5.5.1.tar.gz 634330 BLAKE2B 
e6383a6b6b09f274a944d66effd345e38a191ec73ee5c5240f8ec8bb62a4df97b80835ce57f8f78c3834602b9da425b49289b5c7cd7e4c7071147ff409c6a6c9
 SHA512 
4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
 DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 
7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb
 SHA512 
1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43
+DIST rocm-hip-5.5.1.tar.gz 1235158 BLAKE2B 
2bd675c065fbe054a220f65b30834333d9db91fbd864c408f8ee915f3a511a2f607820562e4d6eacc8e5aa5dc3f8f37fe2b5675c9e89784e61c4a46a9357eef3
 SHA512 
9d57e96ff1d3eb14300d0809049a32dd8403851c70cd6d94cab8d17206a1210fef8b6f713063b041d35de37ef0ae10319e9d9803c65493a54fb59e66d29c9c4d
 DIST rocm-hipamd-5.1.3.tar.gz 331996 BLAKE2B 
176121fe199d53c02a0fc407015681c2f08c8a72104738b457581fd81b37d16efb8170a46d687fb85a45242ba8564246cdd5746e78d9b73dd0bdc9b24eb8378c
 SHA512 
daa6f4da97f71a5fd1f79d8c9e5fc43324743aec91362a05fa62e08966397a637d794abc7e14230eccf5f1271f9fac58d1336aaad1f2cded6cd10792845a494b
 DIST rocm-hipamd-5.3.3.tar.gz 383179 BLAKE2B 
45c4fbf28d639095db3cec0632e1b1d872104b3755bdca818ed37ac46caab399fcd2224330e6ac8df7ab155fb146b6272b3ed2efe00d7358b47f31ca2cb1e4f5
 SHA512 
34c62d915990b6742a2df9b37b6b2bad09f7383e561009519911095e8b65f6f1d79486f7f9b97fa76d7a9755b59fca5a5dff321d8c8b15fd83f2fd22ce08834c
 DIST rocm-hipamd-5.4.3.tar.gz 387070 BLAKE2B 
c5f30b606227692eea4bf9e35d35bff861648ef44357994996b7f1fb798ffe8b3ccf909bedd47d5486049c9742e426002f2d6636daabc679bae1b70e9ee5e89b
 SHA512 
f2e36ceeca2580fd85f6847dc8320640bd43382bcd584f67362b11580a1d429c36596adbde252967a96d3a2dfc2bdca4d34bd23f5fb0d5e5e73e7844f925b03b
+DIST rocm-hipamd-5.5.1.tar.gz 401791 BLAKE2B 
f6d0ce1ae684b51177a2c7b3d7f885cce48314ed7c76d075983e8ab6f1a15421feb11d0a718ea592c9c015c015d99ff92f892d69bee58a543a7fe0f0d476150f
 SHA512 
c979edf358a87abfeddaee0fe809d65c106b188c5684a1f229af962e5c4505f4108b1d14db160485048806d69cf5811ad330711b84a6c995386adb21916851c5
 DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 
64d9b42026d2be1d0e4aa666785699f6b4ec0584a927904a94bf830883050943503f8bdd7c97438a2fb11c71686a330d526f633959916c5c6c8da2e037841e79
 SHA512 
b83c3ae0bfad80f867bacce36710a8964f6dd7e64bf50da3ec6ce842217d6de63299d9ceaab9dc25a22252484520a85d02859809463dad5dda9b1f00a86863e0
 DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-04-05 Thread Benda XU
commit: 8039d6fb841d9bf4841574000b43c12ff9d30f37
Author: Yiyang Wu  gmail  com>
AuthorDate: Sun Mar 19 15:25:18 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Apr  5 16:09:29 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8039d6fb

dev-util/hip: fix HIP_CLANG_PATH detection in FindHIP.cmake

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

Closes: https://github.com/gentoo/gentoo/pull/29973

 .../hip-5.4.3-fix-HIP_CLANG_PATH-detection.patch   | 26 ++
 dev-util/hip/hip-5.3.3-r3.ebuild   |  1 +
 dev-util/hip/hip-5.4.3.ebuild  |  1 +
 3 files changed, 28 insertions(+)

diff --git a/dev-util/hip/files/hip-5.4.3-fix-HIP_CLANG_PATH-detection.patch 
b/dev-util/hip/files/hip-5.4.3-fix-HIP_CLANG_PATH-detection.patch
new file mode 100644
index ..28277d9d880c
--- /dev/null
+++ b/dev-util/hip/files/hip-5.4.3-fix-HIP_CLANG_PATH-detection.patch
@@ -0,0 +1,26 @@
+From 03a7fd2937c146142fa95d22a0ee10df40442788 Mon Sep 17 00:00:00 2001
+From: Yiyang Wu 
+Date: Sun, 19 Mar 2023 22:32:01 +0800
+Subject: [PATCH] FindHIP.cmake: fix HIP_CLANG_PATH detection via
+ HIP_CLANG_INSTALL_DIR
+
+---
+ cmake/FindHIP.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/FindHIP.cmake b/cmake/FindHIP.cmake
+index 109c9f65..5dc4c632 100644
+--- a/cmake/FindHIP.cmake
 b/cmake/FindHIP.cmake
+@@ -255,7 +255,7 @@ elseif("${HIP_COMPILER}" STREQUAL "clang")
+ if("x${HIP_CLANG_PATH}" STREQUAL "x")
+   # IF HIP_CLANG_INSTALL_DIR is Found
+   if( HIP_CLANG_INSTALL_DIR )
+-set(HIP_CLANG_PATH ${HIP_CLANG_INSTALL_DIR})
++set(HIP_CLANG_PATH "${HIP_CLANG_INSTALL_DIR}/bin")
+   else() # IF HIP_CLANG_INSTALL_DIR is not found
+ if(DEFINED ENV{HIP_CLANG_PATH})
+ set(HIP_CLANG_PATH $ENV{HIP_CLANG_PATH})
+-- 
+2.40.0
+

diff --git a/dev-util/hip/hip-5.3.3-r3.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild
index e73675209ae1..c03da0d6effc 100644
--- a/dev-util/hip/hip-5.3.3-r3.ebuild
+++ b/dev-util/hip/hip-5.3.3-r3.ebuild
@@ -81,6 +81,7 @@ src_prepare() {
eapply 
"${FILESDIR}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch"
eapply 
"${FILESDIR}/0002-SWDEV-355608-Remove-clang-include-path-2996.patch"
eapply 
"${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch"
+   eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch"
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \

diff --git a/dev-util/hip/hip-5.4.3.ebuild b/dev-util/hip/hip-5.4.3.ebuild
index 417b2b6c3290..7798aab3e444 100644
--- a/dev-util/hip/hip-5.4.3.ebuild
+++ b/dev-util/hip/hip-5.4.3.ebuild
@@ -81,6 +81,7 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-5.4.3-clang-version.patch"
eapply "${FILESDIR}/${PN}-5.4.3-clang-include.patch"
eapply 
"${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch"
+   eapply "${FILESDIR}/${PN}-5.4.3-fix-HIP_CLANG_PATH-detection.patch"
 
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
# which makes "stdlib.h" not found when using "#include_next" in header 
files;



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-03-02 Thread 罗百科
commit: dfd6445cf1acf78f133028f3e17494702346f464
Author: Patrick Lauer  gentoo  org>
AuthorDate: Thu Mar  2 17:29:46 2023 +
Commit: 罗百科  gentoo  org>
CommitDate: Thu Mar  2 17:45:50 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfd6445c

dev-util/hip: add 5.4.3

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/Manifest |   4 +
 dev-util/hip/files/hip-5.4.3-clang-include.patch  |  30 +
 dev-util/hip/files/hip-5.4.3-clang-version.patch  |  70 ++
 dev-util/hip/files/hip-5.4.3-correct-ldflag.patch |  20 +++
 dev-util/hip/hip-5.4.3.ebuild | 151 ++
 5 files changed, 275 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 91fbbb7d722a..8cb4cece793c 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,10 +1,14 @@
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
+DIST rocclr-5.4.3.tar.gz 640557 BLAKE2B 
9ab91bab7ffb06c9c0d1c2ae79533fccc597071dda289ac375e32eb2965c638a7029951d2a49d46eeead9d7d242fe3a0cedb3e444d877af1bbf0e2d801c91e11
 SHA512 
c1d1a2ca08c2d762a221c04d394469aa7aff46086151333b145e0db9a7c7eb3dbbf8b9693e50d816aa9a13c16b4ebacf5ff3d5d8ff3393a8a764728ef5172d3a
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
+DIST rocm-hip-5.4.3.tar.gz 1195173 BLAKE2B 
7452ee7a874bc4703b0d3aaaf9fa2a51e223d5650c65c34982a9981dbe14e8ec70c93d7e70c5ad36a8d02c3d2214fa6a393e20502a01418fb3320d8cfe363feb
 SHA512 
1f4100e114576dcbad83aae453e21ab85cf25bd8a6ada380bb11cfc30e5f92ba903055b7257a099321a84b65adb444dd52b8258e82567f4bc882e65d89369b43
 DIST rocm-hipamd-5.1.3.tar.gz 331996 BLAKE2B 
176121fe199d53c02a0fc407015681c2f08c8a72104738b457581fd81b37d16efb8170a46d687fb85a45242ba8564246cdd5746e78d9b73dd0bdc9b24eb8378c
 SHA512 
daa6f4da97f71a5fd1f79d8c9e5fc43324743aec91362a05fa62e08966397a637d794abc7e14230eccf5f1271f9fac58d1336aaad1f2cded6cd10792845a494b
 DIST rocm-hipamd-5.3.3.tar.gz 383179 BLAKE2B 
45c4fbf28d639095db3cec0632e1b1d872104b3755bdca818ed37ac46caab399fcd2224330e6ac8df7ab155fb146b6272b3ed2efe00d7358b47f31ca2cb1e4f5
 SHA512 
34c62d915990b6742a2df9b37b6b2bad09f7383e561009519911095e8b65f6f1d79486f7f9b97fa76d7a9755b59fca5a5dff321d8c8b15fd83f2fd22ce08834c
+DIST rocm-hipamd-5.4.3.tar.gz 387070 BLAKE2B 
c5f30b606227692eea4bf9e35d35bff861648ef44357994996b7f1fb798ffe8b3ccf909bedd47d5486049c9742e426002f2d6636daabc679bae1b70e9ee5e89b
 SHA512 
f2e36ceeca2580fd85f6847dc8320640bd43382bcd584f67362b11580a1d429c36596adbde252967a96d3a2dfc2bdca4d34bd23f5fb0d5e5e73e7844f925b03b
 DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 
64d9b42026d2be1d0e4aa666785699f6b4ec0584a927904a94bf830883050943503f8bdd7c97438a2fb11c71686a330d526f633959916c5c6c8da2e037841e79
 SHA512 
b83c3ae0bfad80f867bacce36710a8964f6dd7e64bf50da3ec6ce842217d6de63299d9ceaab9dc25a22252484520a85d02859809463dad5dda9b1f00a86863e0
 DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B 
a3f600a68183337f92b152a123241cb7025889cca2ef6814d9d5b5a2146a78703b171d20bcb432bc7a2cdd1f24ad349408c17816b25a66702e9f0f5345af9082
 SHA512 
391f0f244b7f02972df8cada821e69ee8d81d96b9cff3c14f1d0838da583d8fb136ec4bd5ee820f6dd261968e9eef5e9a5b10b7bb76b1b64625c399d79bcb03f
+DIST rocm-opencl-runtime-5.4.3.tar.gz 1005268 BLAKE2B 
f9398e4c2b0f045f1b5d8df9f31b7f2bef6a9201885aa6ee5fc5d71632cfde26a078d9a5ea38c3da12d3c187faf04c7bdcf1a8ecb9927cdba56b1efdfcdc44ee
 SHA512 
f65d4622ce8721a6b91ab5b5b306d142ba507d3e631ac3ab0b76c5bc6d8d18455e02debd954c82e7eb609f232b509f1ec1a013dc2fad467c2c2ad31fdf15755d
 DIST rocm-tr

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-02-22 Thread Sam James
commit: 7194f27eeb36d01d5e91bea55711d9cad668c09c
Author: Yiyang Wu  gmail  com>
AuthorDate: Sun Feb 19 03:29:10 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Feb 22 16:13:56 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7194f27e

dev-util/hip: Fix rocclr hsa.h include bug for 5.1.3

Same as f98177a3fe2ea8cf1818daec64268f9377176902, apply the patch to fix
for rocclr include bug

Closes: https://bugs.gentoo.org/894040
Signed-off-by: Yiyang Wu  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29657
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/hip-5.1.3-r4.ebuild | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dev-util/hip/hip-5.1.3-r4.ebuild b/dev-util/hip/hip-5.1.3-r4.ebuild
index 3ea312756ff5..a8654a3e0568 100644
--- a/dev-util/hip/hip-5.1.3-r4.ebuild
+++ b/dev-util/hip/hip-5.1.3-r4.ebuild
@@ -128,6 +128,9 @@ src_prepare() {
sed -e 
"/HIP_CLANG_INCLUDE_SEARCH_PATHS/s,\${_IMPORT_PREFIX}.*/include,${CLANG_RESOURCE_DIR}/include,"
 -i hip-lang-config.cmake.in || die
popd || die
sed -e 
"/HIP_CLANG_INCLUDE_SEARCH_PATHS/s,\${HIP_CLANG_ROOT}.*/include,${CLANG_RESOURCE_DIR}/include,"
 -i hip-config.cmake.in || die
+
+   pushd ${CLR_S} || die
+   eapply "${FILESDIR}/rocclr-5.3.3-fix-include.patch"
 }
 
 src_configure() {



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-02-19 Thread Sam James
commit: 1d983277e4fcd3db3a723bf3eeba896eadd67c2c
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Feb 20 01:59:55 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Feb 20 04:26:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d983277

dev-util/hip: backport patch to fix gcc-13 compile issue

Closes: https://bugs.gentoo.org/895396
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/files/rocclr-5.3.3-gcc13.patch | 25 +
 dev-util/hip/hip-5.3.3-r3.ebuild|  1 +
 2 files changed, 26 insertions(+)

diff --git a/dev-util/hip/files/rocclr-5.3.3-gcc13.patch 
b/dev-util/hip/files/rocclr-5.3.3-gcc13.patch
new file mode 100644
index ..17a64d20bf1e
--- /dev/null
+++ b/dev-util/hip/files/rocclr-5.3.3-gcc13.patch
@@ -0,0 +1,25 @@
+From ca70cd7c3d63b1036e604116f3b269ca123e7904 Mon Sep 17 00:00:00 2001
+From: Jeremy Newton 
+Date: Wed, 8 Feb 2023 14:03:58 -0500
+Subject: [PATCH] SWDEV-1 - device: Add missing include
+
+Newer GCC's seem to require this.
+
+Change-Id: I85926d4fa552b772f2eb9f8ede7863a546c47f54
+Signed-off-by: Jeremy Newton 
+---
+ device/devhcprintf.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/device/devhcprintf.cpp b/device/devhcprintf.cpp
+index b36f7758..a5aba4a4 100644
+--- a/device/devhcprintf.cpp
 b/device/devhcprintf.cpp
+@@ -23,6 +23,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 

diff --git a/dev-util/hip/hip-5.3.3-r3.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild
index b4f51b3ef7b0..e73675209ae1 100644
--- a/dev-util/hip/hip-5.3.3-r3.ebuild
+++ b/dev-util/hip/hip-5.3.3-r3.ebuild
@@ -105,6 +105,7 @@ src_prepare() {
 
pushd ${CLR_S} || die
eapply "${FILESDIR}/rocclr-${PV}-fix-include.patch"
+   eapply "${FILESDIR}/rocclr-5.3.3-gcc13.patch"
 }
 
 src_configure() {



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-02-09 Thread Sam James
commit: f98177a3fe2ea8cf1818daec64268f9377176902
Author: Yiyang Wu  gmail  com>
AuthorDate: Fri Feb 10 04:00:28 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Feb 10 04:25:42 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f98177a3

dev-util/hip: fix rocclr compile issue

Due to bbff88f734f62381b0a0624b4b2d182a8d4b8589, /usr/include/hsa.h is
gone, so backport patch for rocclr to fix compile error.

Bug: https://bugs.gentoo.org/893602
Signed-off-by: Yiyang Wu  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29513
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/files/rocclr-5.3.3-fix-include.patch | 218 ++
 dev-util/hip/hip-5.3.3-r3.ebuild  |   4 +
 2 files changed, 222 insertions(+)

diff --git a/dev-util/hip/files/rocclr-5.3.3-fix-include.patch 
b/dev-util/hip/files/rocclr-5.3.3-fix-include.patch
new file mode 100644
index ..e014fe374bec
--- /dev/null
+++ b/dev-util/hip/files/rocclr-5.3.3-fix-include.patch
@@ -0,0 +1,218 @@
+For https://bugs.gentoo.org/893602
+==
+From 197ea6f76f34e0b3c8ab46d96c2fa5014e467e37 Mon Sep 17 00:00:00 2001
+From: Maneesh Gupta 
+Date: Fri, 5 Aug 2022 05:42:39 +
+Subject: [PATCH] SWDEV-350289 - Fix build warnings due to file re-org
+
+Change-Id: I0066fa163b9f25fdde4c5b3baed1ef0654390c06
+---
+ device/comgrctx.hpp   | 2 +-
+ device/devkernel.hpp  | 2 +-
+ device/devprogram.hpp | 2 +-
+ device/rocm/pro/prodevice.cpp | 2 +-
+ device/rocm/pro/prodriver.hpp | 2 +-
+ device/rocm/roccounters.hpp   | 2 +-
+ device/rocm/rocdevice.hpp | 8 
+ device/rocm/rocglinterop.hpp  | 2 +-
+ device/rocm/rockernel.cpp | 2 +-
+ device/rocm/rocprogram.cpp| 2 +-
+ device/rocm/rocsignal.hpp | 4 ++--
+ device/rocm/rocvirtual.cpp| 4 ++--
+ device/rocm/rocvirtual.hpp| 8 
+ 13 files changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/device/comgrctx.hpp b/device/comgrctx.hpp
+index d69506e2..31ee24e1 100644
+--- a/device/comgrctx.hpp
 b/device/comgrctx.hpp
+@@ -23,7 +23,7 @@
+ #include 
+ #if defined(USE_COMGR_LIBRARY)
+ #include "top.hpp"
+-#include "amd_comgr.h"
++#include "amd_comgr/amd_comgr.h"
+ 
+ namespace amd {
+ typedef void (*t_amd_comgr_get_version)(size_t *major, size_t *minor);
+diff --git a/device/devkernel.hpp b/device/devkernel.hpp
+index 19b3212d..b256abf3 100644
+--- a/device/devkernel.hpp
 b/device/devkernel.hpp
+@@ -105,7 +105,7 @@ struct RuntimeHandle {
+   uint32_t group_segment_size;//!< From GROUP_SEGMENT_FIXED_SIZE
+ };
+ 
+-#include "amd_comgr.h"
++#include "amd_comgr/amd_comgr.h"
+ 
+ //  for Code Object V3
+ enum class ArgField : uint8_t {
+diff --git a/device/devprogram.hpp b/device/devprogram.hpp
+index 099d6a37..741d81b0 100644
+--- a/device/devprogram.hpp
 b/device/devprogram.hpp
+@@ -29,7 +29,7 @@
+ #include "devwavelimiter.hpp"
+ 
+ #if defined(USE_COMGR_LIBRARY)
+-#include "amd_comgr.h"
++#include "amd_comgr/amd_comgr.h"
+ #endif  // defined(USE_COMGR_LIBRARY)
+ 
+ namespace amd {
+diff --git a/device/rocm/pro/prodevice.cpp b/device/rocm/pro/prodevice.cpp
+index a0e49461..1e366cd2 100644
+--- a/device/rocm/pro/prodevice.cpp
 b/device/rocm/pro/prodevice.cpp
+@@ -20,7 +20,7 @@
+ 
+ #ifndef WITHOUT_HSA_BACKEND
+ 
+-#include "hsa_ext_amd.h"
++#include "hsa/hsa_ext_amd.h"
+ #include "lnxheaders.h"
+ #include "prodevice.hpp"
+ #include "amdgpu_drm.h"
+diff --git a/device/rocm/pro/prodriver.hpp b/device/rocm/pro/prodriver.hpp
+index bc420697..819ade27 100644
+--- a/device/rocm/pro/prodriver.hpp
 b/device/rocm/pro/prodriver.hpp
+@@ -23,7 +23,7 @@
+ #ifndef WITHOUT_HSA_BACKEND
+ 
+ #include "top.hpp"
+-#include "hsa.h"
++#include "hsa/hsa.h"
+ 
+ /*! \addtogroup HSA
+  *  @{
+diff --git a/device/rocm/roccounters.hpp b/device/rocm/roccounters.hpp
+index ffc9fad0..45ebbe66 100644
+--- a/device/rocm/roccounters.hpp
 b/device/rocm/roccounters.hpp
+@@ -24,7 +24,7 @@
+ #include "top.hpp"
+ #include "device/device.hpp"
+ #include "device/rocm/rocdevice.hpp"
+-#include "hsa_ven_amd_aqlprofile.h"
++#include "hsa/hsa_ven_amd_aqlprofile.h"
+ 
+ namespace roc {
+ 
+diff --git a/device/rocm/rocdevice.hpp b/device/rocm/rocdevice.hpp
+index d8cb4c6c..44339bb9 100644
+--- a/device/rocm/rocdevice.hpp
 b/device/rocm/rocdevice.hpp
+@@ -40,10 +40,10 @@
+ #include "device/rocm/rocprintf.hpp"
+ #include "device/rocm/rocglinterop.hpp"
+ 
+-#include "hsa.h"
+-#include "hsa_ext_image.h"
+-#include "hsa_ext_amd.h"
+-#include "hsa_ven_amd_loader.h"
++#include "hsa/hsa.h"
++#include "hsa/hsa_ext_image.h"
++#include "hsa/hsa_ext_amd.h"
++#include "hsa/hsa_ven_amd_loader.h"
+ 
+ #include 
+ #include 
+diff --git a/device/rocm/rocglinterop.hpp b/device/rocm/rocglinterop.hpp
+index a539cc6f..588d8a6f 100644
+--- a/device/rocm/rocglinterop.hpp
 b/device/rocm/rocglinterop.hpp
+@@ -34,7 +34,7 @@ typedef __GLXcontextRec* GLXContext;
+ 
+ #include "device/rocm/mesa

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2023-02-05 Thread Sam James
commit: 488879eeea7979b54150b096a326a33c62e5efe2
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Feb  6 02:48:10 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Feb  6 03:58:49 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=488879ee

dev-util/hip: add back patch to strip -rpath in hipcc

This fixes hipcc adding -rpath in compilation, which causes QA issue for
building ROCm libraries, and linking the incorrect BLAS/LAPACK
implementation to rocblas-test, which may cause testing performance
degrade.

Signed-off-by: Yiyang Wu  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29443
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/files/hip-5.3.3-correct-ldflag.patch| 20 
 .../hip/{hip-5.3.3-r2.ebuild => hip-5.3.3-r3.ebuild} |  1 +
 2 files changed, 21 insertions(+)

diff --git a/dev-util/hip/files/hip-5.3.3-correct-ldflag.patch 
b/dev-util/hip/files/hip-5.3.3-correct-ldflag.patch
new file mode 100644
index ..20d117841c2b
--- /dev/null
+++ b/dev-util/hip/files/hip-5.3.3-correct-ldflag.patch
@@ -0,0 +1,20 @@
+This removes ldflag -L"/usr/lib" and -Wl,-rpath=/usr/lib:/usr/lib which
+causes `ld: skipping incompatible /usr/lib/libm.so when searching for -lm`
+Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1166193820
+===
+Index: HIP-rocm-5.3.3/bin/hipcc.pl
+===
+--- HIP-rocm-5.3.3.orig/bin/hipcc.pl
 HIP-rocm-5.3.3/bin/hipcc.pl
+@@ -711,9 +711,9 @@ if ($HIP_PLATFORM eq "amd") {
+ 
+ if (not $isWindows  and not $compileOnly) {
+   if ($linkType eq 0) {
+-$toolArgs = " -L$HIP_LIB_PATH -lamdhip64 -L$ROCM_PATH/lib 
-lhsa-runtime64 -ldl -lnuma " . ${toolArgs};
++$toolArgs = " -lamdhip64 -lhsa-runtime64 -ldl -lnuma " . ${toolArgs};
+   } else {
+-$toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags 
-Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 ";
++$toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags -lamdhip64 ";
+   }
+   # To support __fp16 and _Float16, explicitly link with compiler-rt
+   
$HIP_CLANG_BUILTIN_LIB="$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a";

diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r3.ebuild
similarity index 98%
rename from dev-util/hip/hip-5.3.3-r2.ebuild
rename to dev-util/hip/hip-5.3.3-r3.ebuild
index 072b8d319e97..c11b85e3f2ec 100644
--- a/dev-util/hip/hip-5.3.3-r2.ebuild
+++ b/dev-util/hip/hip-5.3.3-r3.ebuild
@@ -77,6 +77,7 @@ src_prepare() {
pushd ${HIP_S} || die
eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch"
+   eapply "${FILESDIR}/${PN}-5.3.3-correct-ldflag.patch"
eapply 
"${FILESDIR}/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch"
eapply 
"${FILESDIR}/0002-SWDEV-355608-Remove-clang-include-path-2996.patch"
eapply 
"${FILESDIR}/0003-SWDEV-352878-Removed-relative-path-based-CLANG-inclu.patch"



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-02-01 Thread Andreas Sturmlechner
commit: ca58d5dcf2f0fa62f9bcda56f1c13f89f557afac
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Tue Jan 24 22:21:23 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Wed Feb  1 09:52:48 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca58d5dc

dev-util/hip: drop 5.0.2-r3

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 dev-util/hip/Manifest   |   6 --
 dev-util/hip/files/hipvars-5.0.2.pm |  20 --
 dev-util/hip/hip-5.0.2-r3.ebuild| 138 
 3 files changed, 164 deletions(-)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index b1a87a900106..91fbbb7d722a 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,16 +1,10 @@
-DIST 5.0.2-update-header.patch.gz 5136 BLAKE2B 
290b9e250e3004a1147ad28606d7d205078affbd809c6a429744767ebabf35bd8df6395dc135984d345ae2f23fa457dcb2524bcbf31c5bf16903d3ee2007bf5d
 SHA512 
41b1025c403e874026a712ec6f6571c873203b08ddadf68848f6d1f63924c21b206677b330f79edad2c4b85e2ba5053b1d33f70c7c09ff9c17bc5905b849da0c
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
-DIST rocclr-5.0.2.tar.gz 853965 BLAKE2B 
a0d568eb3b230845970d8256a5a2f32018e4b9fb68e0f1aa13a1f3fc953e614025315b90cbe68c107f7150cf91b4b1ea438455429062c7dc06ef77d65dedd2ec
 SHA512 
b30a57c09973d8ef624511f422babaf9722685b9f85643783aebc000671b41fd54f44b308cece0baab187e1ee00b10335c6d22b6bad6fb3468abe6ef0da97d73
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
-DIST rocm-hip-5.0.2.tar.gz 958496 BLAKE2B 
9c8bb1eacd982203e3bd6c24560672c4a9aaf5606608635d7da5a60f613d9be50998f990c1ea3e0e6f5581e0efcba09af736a77bbc9469b2898e0974d063e8d6
 SHA512 
4a99e86a4594c15509a1bbfec0678cd05469eb14dcf35ce650e1eb7c2415f57f59071b1b8add2f8566ccf06242bead77abd275987fe79fe6031dea90d5693805
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
-DIST rocm-hipamd-5.0.2.tar.gz 319973 BLAKE2B 
ca19938eeca66f0d2614ff933e1d0e75b6b8dbc8d996fd4369e5649897b9948271ac88f2a66f0a40ef586d6185b30d01132decac95d1615c1ee419996050ed07
 SHA512 
056acab082b5073e81f9e5de00ae12c85021d1c297cdcfc45b85f191dcc68603f64fe5d0e75f9523120657947eb125beaa9c3ce26234968c43b200e638f9afa3
 DIST rocm-hipamd-5.1.3.tar.gz 331996 BLAKE2B 
176121fe199d53c02a0fc407015681c2f08c8a72104738b457581fd81b37d16efb8170a46d687fb85a45242ba8564246cdd5746e78d9b73dd0bdc9b24eb8378c
 SHA512 
daa6f4da97f71a5fd1f79d8c9e5fc43324743aec91362a05fa62e08966397a637d794abc7e14230eccf5f1271f9fac58d1336aaad1f2cded6cd10792845a494b
 DIST rocm-hipamd-5.3.3.tar.gz 383179 BLAKE2B 
45c4fbf28d639095db3cec0632e1b1d872104b3755bdca818ed37ac46caab399fcd2224330e6ac8df7ab155fb146b6272b3ed2efe00d7358b47f31ca2cb1e4f5
 SHA512 
34c62d915990b6742a2df9b37b6b2bad09f7383e561009519911095e8b65f6f1d79486f7f9b97fa76d7a9755b59fca5a5dff321d8c8b15fd83f2fd22ce08834c
-DIST rocm-opencl-runtime-5.0.2.tar.gz 1004855 BLAKE2B 
e2c2beb987053204fbe8fda562ae65d6c1a58447e9e88bf1081aabeee6c9a10738fd8562114b564b647682438fdbd2c535db1008ac6e1cc4eb9a915998eeb3c7
 SHA512 
fa01d1fafc890181b9e67070353ee7c9100619494b7509cae1a3659f24ef1d00f650024cb24bdb0e6e7eacfdec1115e4683ec6f320228a19f41ae83321780780
 DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 
64d9b42026d2be1d0e4aa666785699f6b4ec0584a927904a94bf830883050943503f8bdd7c97438a2fb11c71686a330d526f633959916c5c6c8da2e037841e79
 SHA512 
b83c3ae0bfad80f867bacce36710a8964f6dd7e64bf50da3ec6ce842217d6de63299d9ceaab9dc25a22252484520a85d02859809463dad5dda9b1f00a86863e0
 DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B 
a3f600a68183337f92b152a123241cb7025889cca2ef6814d9d5b5a2146a78703b171d20bcb432bc7a2cdd

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-01-31 Thread Benda XU
commit: 3a17f524b7dbdaa5ff7e5687dd6c18d217afce07
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Jan 23 10:06:02 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:30:17 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a17f524

dev-util/hip: disable non-FHS install

Closes: https://bugs.gentoo.org/887379
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.3.3-r2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
index bf43460c20d0..210af33a2bb1 100644
--- a/dev-util/hip/hip-5.3.3-r2.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -140,6 +140,7 @@ src_configure() {
-DHIP_COMPILER=clang
-DROCM_PATH="${EPREFIX}/usr"
-DUSE_PROF_API=$(usex profile 1 0)
+   -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF
-DROCCLR_PATH=${CLR_S}
-DHIP_COMMON_DIR=${HIP_S}
-DAMD_OPENCL_PATH=${OCL_S}



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-01-31 Thread Benda XU
commit: 0576dfb62ef51ab28f2ab3777d80902872769625
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Jan 25 03:42:11 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:31:13 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0576dfb6

dev-util/hip: remove profile USE

No use case currently. Upstream does not ship this by default, either.

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/Manifest|  2 --
 dev-util/hip/hip-5.3.3-r2.ebuild | 25 -
 2 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 2e654c032678..b1a87a900106 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,6 +1,5 @@
 DIST 5.0.2-update-header.patch.gz 5136 BLAKE2B 
290b9e250e3004a1147ad28606d7d205078affbd809c6a429744767ebabf35bd8df6395dc135984d345ae2f23fa457dcb2524bcbf31c5bf16903d3ee2007bf5d
 SHA512 
41b1025c403e874026a712ec6f6571c873203b08ddadf68848f6d1f63924c21b206677b330f79edad2c4b85e2ba5053b1d33f70c7c09ff9c17bc5905b849da0c
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
-DIST hip-5.3.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
 DIST rocclr-5.0.2.tar.gz 853965 BLAKE2B 
a0d568eb3b230845970d8256a5a2f32018e4b9fb68e0f1aa13a1f3fc953e614025315b90cbe68c107f7150cf91b4b1ea438455429062c7dc06ef77d65dedd2ec
 SHA512 
b30a57c09973d8ef624511f422babaf9722685b9f85643783aebc000671b41fd54f44b308cece0baab187e1ee00b10335c6d22b6bad6fb3468abe6ef0da97d73
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
@@ -15,4 +14,3 @@ DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 
64d9b42026d2be1d0e4aa66678
 DIST rocm-opencl-runtime-5.3.3.tar.gz 1007773 BLAKE2B 
a3f600a68183337f92b152a123241cb7025889cca2ef6814d9d5b5a2146a78703b171d20bcb432bc7a2cdd1f24ad349408c17816b25a66702e9f0f5345af9082
 SHA512 
391f0f244b7f02972df8cada821e69ee8d81d96b9cff3c14f1d0838da583d8fb136ec4bd5ee820f6dd261968e9eef5e9a5b10b7bb76b1b64625c399d79bcb03f
 DIST rocm-tracer-5.0.2.tar.gz 474669 BLAKE2B 
b350111590140e1282338e4f134caf6228677c49361ceb9bc7ba0da8709346daa4fd014644c04adff0e903dba6014a84edd2eb3a5c132a8f91b479e4d5b085e5
 SHA512 
3fc1449cc9c9bf83e5233a7a0e83c0e3fa9da225d5ee4427b7d6fa15e3580497e1b9fbcd63892e4a99df01582aecd3ccfd66d2a19af2d8c25949ee705894ea44
 DIST rocm-tracer-5.1.3.tar.gz 511617 BLAKE2B 
4142979b3b7d649798a7ac0b2a04b42aa7fbcbf82f2cf51b0e5363ec0da538046d6e59283d0ce1bfd341317bf24ac2f694d5c8a7d1f132f9b21caea5caf7eda3
 SHA512 
e73b0c921ffbdcac571d8b0825de39bd8a4fd5f2720ecdd0c189951db85efb607a0b1cd7a9bb02b3dbf329b277cb5e197525216a8e8927eea4e6ce290b7e7c7b
-DIST rocm-tracer-5.3.3.tar.gz 353041 BLAKE2B 
b7614707ae3af2f5a46d058dacadfb0ef3b980963ac49face66a80c8396e66cf13e0430ab41737ba15e163f5da03697376b13238ea1decfe7ee4a7f31c7664a5
 SHA512 
95a202f76f6b68a35942750233bd09d372a9be843150d7ec02824da13c6b9a7c8da7a752ac69f66776e7ccfb6176473745dc46a7baadfe77c99c0596fbc2ffeb

diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
index d52892ff9c6f..94f21e6e965b 100644
--- a/dev-util/hip/hip-5.3.3-r2.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -3,11 +3,10 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{9..11} )
 DOCS_BUILDER="doxygen"
 DOCS_DEPEND="media-gfx/graphviz"
 
-inherit cmake docs llvm prefix python-any-r1
+inherit cmake docs llvm prefix
 
 LLVM_MAX_SLOT=15
 
@@ -16,16 +15,13 @@ HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd";
 
SRC_URI="https://github.com/ROCm-Developer-Tools/hipamd/archive/rocm-${PV}.tar.gz
 -> rocm-hipamd-${PV}.tar.gz
https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz 
-> rocm-hip-${PV}.tar.gz

https://github.com/ROCm-Developer-Tools/ROCclr/archive/rocm-${PV}.tar.gz -> 
rocclr-${PV}.tar.gz
-   
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz
 -> rocm-opencl-runtime-${PV}.tar.gz

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-01-31 Thread Benda XU
commit: a4ca9fcf9bce9f636f1db0af1892758c61ec0285
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Jan 25 09:17:31 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:31:37 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4ca9fcf

dev-util/hip: ignore QA FLAG check for libhiprtc-builtins

Closes: https://bugs.gentoo.org/836271
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.3.3-r2.ebuild | 5 +
 1 file changed, 5 insertions(+)

diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
index 8d41b2af630f..072b8d319e97 100644
--- a/dev-util/hip/hip-5.3.3-r2.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -51,6 +51,11 @@ RTC_S="${WORKDIR}"/roctracer-rocm-${PV}
 DOCS_DIR="${HIP_S}"/docs/doxygen-input
 DOCS_CONFIG_NAME=doxy.cfg
 
+pkg_setup() {
+   # Ignore QA FLAGS check for library compiled from assembly sources
+   QA_FLAGS_IGNORED="/usr/$(get_libdir)/libhiprtc-builtins.so.$(ver_cut 
1-2)"
+}
+
 src_prepare() {
cmake_src_prepare
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-01-31 Thread Benda XU
commit: 41e9715cea2231430abecfaab92af02b59783bbe
Author: Yiyang Wu  gmail  com>
AuthorDate: Fri Jan 27 15:19:23 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:31:43 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41e9715c

dev-util/hip: add myself as maintainer

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/metadata.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/dev-util/hip/metadata.xml b/dev-util/hip/metadata.xml
index 633796671a49..21b0e03f6a41 100644
--- a/dev-util/hip/metadata.xml
+++ b/dev-util/hip/metadata.xml
@@ -9,6 +9,10 @@
 candr...@gentoo.org
 Craig Andrews
   
+  
+xgreenlandfor...@gmail.com
+Yiyang Wu
+  
   
 gen...@holzke.net
 Wilfried Holzke



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2023-01-31 Thread Benda XU
commit: 38ab28e27cd7da59f4a241b09d3ac734c4f8b575
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Jan 25 03:14:27 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:31:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38ab28e2

dev-util/hip: Backport fixes for clang directories search

Closes: https://bugs.gentoo.org/891013
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 ...0-hipcc-fails-to-parse-version-of-clang-i.patch |  70 +
 ...8-LLVM-pkg-search-directly-using-find_dep.patch | 163 +++
 ...DEV-355608-Remove-clang-include-path-2996.patch |  51 ++
 ...8-Removed-relative-path-based-CLANG-inclu.patch | 173 +
 dev-util/hip/files/hipvars-5.3.3.pm|  20 +++
 dev-util/hip/hip-5.3.3-r2.ebuild   |  17 +-
 6 files changed, 483 insertions(+), 11 deletions(-)

diff --git 
a/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch
 
b/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch
new file mode 100644
index ..b9a1329e5931
--- /dev/null
+++ 
b/dev-util/hip/files/0001-SWDEV-344620-hipcc-fails-to-parse-version-of-clang-i.patch
@@ -0,0 +1,70 @@
+From 73430b62a5437d1ba6c36a1d812a1434d1ad9df7 Mon Sep 17 00:00:00 2001
+From: ROCm CI Service Account <66695075+rocm...@users.noreply.github.com>
+Date: Tue, 20 Dec 2022 06:51:12 +0530
+Subject: [PATCH 1/3] SWDEV-344620 - hipcc fails to parse version of clang in
+ some cases (#3119)
+
+Change-Id: I46f716c82a7500b9a2bcaf5f9ff4ad8a8f982770
+Signed-off-by: Yiyang Wu 
+---
+ bin/hipcc.pl | 22 +++---
+ 1 file changed, 7 insertions(+), 15 deletions(-)
+
+diff --git a/bin/hipcc.pl b/bin/hipcc.pl
+index 645ae62d..2a01dcc3 100755
+--- a/bin/hipcc.pl
 b/bin/hipcc.pl
+@@ -144,7 +144,7 @@ if ($HIP_PLATFORM eq "amd") {
+ $execExtension = "";
+ if($isWindows) {
+ $execExtension = ".exe";
+-} 
++}
+ $HIPCC="$HIP_CLANG_PATH/clang++" . $execExtension;
+ 
+ # If $HIPCC clang++ is not compiled, use clang instead
+@@ -157,13 +157,10 @@ if ($HIP_PLATFORM eq "amd") {
+ $HIPLDFLAGS .= " -fuse-ld=lld";
+ $HIPLDFLAGS .= " --ld-path=$HIP_CLANG_PATH/lld-link.exe";
+ }
+-$HIP_CLANG_VERSION = `$HIPCC --version`;
+-$HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
+-$HIP_CLANG_VERSION=$1;
+ 
+-# Figure out the target with which llvm is configured
+-$HIP_CLANG_TARGET = `$HIPCC -print-target-triple`;
+-$HIP_CLANG_TARGET = chomp($HIP_CLANG_TARGET);
++# get Clang RT Builtin path 
++$HIP_CLANG_RT_LIB = `$HIPCC --print-runtime-dir`;
++chomp($HIP_CLANG_RT_LIB);
+ 
+ if (! defined $HIP_CLANG_INCLUDE_PATH) {
+ $HIP_CLANG_INCLUDE_PATH = 
abs_path("$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/include");
+@@ -184,7 +181,7 @@ if ($HIP_PLATFORM eq "amd") {
+ print ("HIP_INCLUDE_PATH=$HIP_INCLUDE_PATH\n");
+ print ("HIP_LIB_PATH=$HIP_LIB_PATH\n");
+ print ("DEVICE_LIB_PATH=$DEVICE_LIB_PATH\n");
+-print ("HIP_CLANG_TARGET=$HIP_CLANG_TARGET\n");
++print ("HIP_CLANG_RT_LIB=$HIP_CLANG_RT_LIB\n");
+ }
+ 
+ if ($isWindows) {
+@@ -715,13 +712,8 @@ if ($HIP_PLATFORM eq "amd") {
+   } else {
+ $toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags 
-Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 ";
+   }
+-  # To support __fp16 and _Float16, explicitly link with compiler-rt
+-  
$HIP_CLANG_BUILTIN_LIB="$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a";
+-  if (-e $HIP_CLANG_BUILTIN_LIB) {
+-$toolArgs .= " 
-L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET 
-lclang_rt.builtins "
+-  } else {
+-$toolArgs .= " 
-L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/linux 
-lclang_rt.builtins-x86_64 "
+-  }
++
++  $toolArgs .= " -L$HIP_CLANG_RT_LIB -lclang_rt.builtins-x86_64 "
+ }
+ }
+ 
+-- 
+2.38.1
+

diff --git 
a/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch
 
b/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch
new file mode 100644
index ..9dbfe8a55395
--- /dev/null
+++ 
b/dev-util/hip/files/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch
@@ -0,0 +1,163 @@
+From 6c12b045bc3c434dd13e74bf124ed54afec668c6 Mon Sep 17 00:00:00 2001
+From: AravindanC 
+Date: Fri, 26 Aug 2022 15:02:09 -0700
+Subject: [PATCH] SWDEV-352878 - LLVM pkg search directly using find_dep() for
+ CLANG Include path
+
+Change-Id: I355e39890757be07de8b9332deca159f35039dfd
+Signed-off-by: Yiyang Wu 
+---
+ hip-config.cmake.in | 108 ++--
+ 1 file changed, 64 insertions(+), 44 deletions(-)
+
+diff --git a/hip-config.cmake.in b/hip-config.cmake.in
+index 89d1224e..67d898d8 100755
+--- a/hip-config.cmake.in
 b/hip

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-01-31 Thread Benda XU
commit: 02e622b72fd4770f699859a7b6433ea8a92c648a
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Jan 25 04:12:24 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:31:33 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02e622b7

dev-util/hip: remove -Werror added by src/CMakeLists.txt

Closes: https://bugs.gentoo.org/887383
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/files/hip-5.3.3-disable-Werror.patch | 16 
 dev-util/hip/hip-5.3.3-r2.ebuild  |  1 +
 2 files changed, 17 insertions(+)

diff --git a/dev-util/hip/files/hip-5.3.3-disable-Werror.patch 
b/dev-util/hip/files/hip-5.3.3-disable-Werror.patch
new file mode 100644
index ..bed46bd144f4
--- /dev/null
+++ b/dev-util/hip/files/hip-5.3.3-disable-Werror.patch
@@ -0,0 +1,16 @@
+Index: hipamd-rocm-5.3.3/src/CMakeLists.txt
+===
+--- hipamd-rocm-5.3.3.orig/src/CMakeLists.txt
 hipamd-rocm-5.3.3/src/CMakeLists.txt
+@@ -44,11 +44,6 @@ if(ADDRESS_SANITIZER)
+   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} 
${ASAN_LINKER_FLAGS} -Wl,--build-id=sha1")
+ endif()
+ 
+-if(CMAKE_COMPILER_IS_GNUCC)
+-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+-endif()
+-
+ option(DISABLE_DIRECT_DISPATCH "Disable Direct Dispatch" OFF)
+ 
+ option(BUILD_SHARED_LIBS "Build the shared library" ON)

diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
index 94f21e6e965b..8d41b2af630f 100644
--- a/dev-util/hip/hip-5.3.3-r2.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -39,6 +39,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.0.1-hip_vector_types.patch"
"${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
"${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch"
+   "${FILESDIR}/${PN}-5.3.3-disable-Werror.patch"

"${FILESDIR}/0001-SWDEV-352878-LLVM-pkg-search-directly-using-find_dep.patch"
 )
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-01-31 Thread Benda XU
commit: ccca3c9fb3f52a7d7a4fe8a2d3fcf70118520095
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Jan 23 13:58:12 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:30:43 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccca3c9f

dev-util/hip: remove unnecessary sed commands

Note: this turns __HIP_ENABLE_PCH to ON (it's turned off originally due
to build failure back in version 4.0.0, but now the issue disappears)

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.3.3-r2.ebuild | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
index 210af33a2bb1..b842e9362711 100644
--- a/dev-util/hip/hip-5.3.3-r2.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -71,22 +71,15 @@ src_prepare() {
# Use Gentoo slot number, otherwise git hash is attempted in vain.
sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${SLOT#*/})" -i CMakeLists.txt || die
 
-   # disable PCH, because it results in a build error in ROCm 4.0.0
-   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
CMakeLists.txt || die
-
# correctly find HIP_CLANG_INCLUDE_PATH using cmake
local LLVM_PREFIX="$(get_llvm_prefix "${LLVM_MAX_SLOT}")"
local CLANG_RESOURCE_DIR=$("${LLVM_PREFIX}/bin/clang" 
-print-resource-dir)
sed -e "/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":${LLVM_PREFIX}:" 
-i hip-config.cmake.in || die
 
# correct libs and cmake install dir
-   sed -e "/LIB_INSTALL_DIR/s:PREFIX}/lib:PREFIX}/$(get_libdir):" \
-   -e "/\${HIP_COMMON_DIR}/s:cmake DESTINATION .):cmake/ 
DESTINATION share/cmake/Modules):" -i CMakeLists.txt || die
-   sed -e "/LIBRARY DESTINATION/s:lib:$(get_libdir):" -i 
src/CMakeLists.txt || die
+   sed -e "/\${HIP_COMMON_DIR}/s:cmake DESTINATION .):cmake/ DESTINATION 
share/cmake/Modules):" -i CMakeLists.txt || die
 
sed -e "/\.hip/d" \
-   -e "s,DESTINATION lib,DESTINATION $(get_libdir),g" \
-   -e "/cmake DESTINATION/d" \
-e "/CPACK_RESOURCE_FILE_LICENSE/d" -i packaging/CMakeLists.txt 
|| die
 
pushd ${HIP_S} || die



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-01-31 Thread Benda XU
commit: 7c334e7ba3bc8c4acaad5d94fe1e248eb1a9db0a
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Jan 25 03:17:30 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:31:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c334e7b

dev-util/hip: bump patch "remove-cmake-doxygen-commands"

Closes: https://bugs.gentoo.org/887375
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 .../hip-5.3.3-remove-cmake-doxygen-commands.patch   | 21 +
 dev-util/hip/hip-5.3.3-r2.ebuild|  1 +
 2 files changed, 22 insertions(+)

diff --git a/dev-util/hip/files/hip-5.3.3-remove-cmake-doxygen-commands.patch 
b/dev-util/hip/files/hip-5.3.3-remove-cmake-doxygen-commands.patch
new file mode 100644
index ..c4cd955bed90
--- /dev/null
+++ b/dev-util/hip/files/hip-5.3.3-remove-cmake-doxygen-commands.patch
@@ -0,0 +1,21 @@
+Index: hipamd-rocm-5.3.3/packaging/CMakeLists.txt
+===
+--- hipamd-rocm-5.3.3.orig/packaging/CMakeLists.txt
 hipamd-rocm-5.3.3/packaging/CMakeLists.txt
+@@ -94,16 +94,6 @@ install(FILES ${CMAKE_BINARY_DIR}/.hipVe
+ install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION 
${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
+ #End dev files install
+ 
+-#Begin doc files install
+-find_program(DOXYGEN_EXE doxygen)
+-if(DOXYGEN_EXE)
+-add_custom_target(build_doxygen ALL
+-  COMMAND HIP_PATH=${HIP_COMMON_DIR} doxygen 
${HIP_COMMON_DIR}/docs/doxygen-input/doxy.cfg)
+-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/RuntimeAPI/html
+-DESTINATION ${CMAKE_INSTALL_DOCDIR}/RuntimeAPI COMPONENT doc)
+-endif()
+-#End doc files install
+-
+ #Begin samples files install
+ install(DIRECTORY ${HIP_COMMON_DIR}/samples DESTINATION 
${CMAKE_INSTALL_DATADIR}/hip COMPONENT samples)
+ #End samples files install

diff --git a/dev-util/hip/hip-5.3.3-r2.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
index b842e9362711..23778ce69cb9 100644
--- a/dev-util/hip/hip-5.3.3-r2.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -46,6 +46,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.0.1-DisableTest.patch"
"${FILESDIR}/${PN}-5.0.1-hip_vector_types.patch"
"${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
+   "${FILESDIR}/${PN}-5.3.3-remove-cmake-doxygen-commands.patch"
 )
 
 python_check_deps() {



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2023-01-31 Thread Benda XU
commit: 6af722a55be4b47e0984d9e8b2a186eff645cb47
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Jan 23 08:16:56 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Jan 31 13:24:54 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6af722a5

dev-util/hip: Avoid double prefix problems

hprefixify on hip-config.cmake and hipcc.pl is not working well.
Disable auto hprefixify and adjust manual modification instead.

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/{hip-5.1.3-r3.ebuild => hip-5.1.3-r4.ebuild} | 10 +-
 dev-util/hip/{hip-5.3.3-r1.ebuild => hip-5.3.3-r2.ebuild} | 10 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dev-util/hip/hip-5.1.3-r3.ebuild b/dev-util/hip/hip-5.1.3-r4.ebuild
similarity index 94%
rename from dev-util/hip/hip-5.1.3-r3.ebuild
rename to dev-util/hip/hip-5.1.3-r4.ebuild
index 56090c5077df..3ea312756ff5 100644
--- a/dev-util/hip/hip-5.1.3-r3.ebuild
+++ b/dev-util/hip/hip-5.1.3-r4.ebuild
@@ -105,19 +105,19 @@ src_prepare() {
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
-e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
-   -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
-   -e "s:\$ENV{'HIP_LIB_PATH'}:'/usr/$(get_libdir)':" \
+   -e 
"s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \
+   -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \
-e "/rpath/s,--rpath=[^ ]*,," \
-e 
"s,\$HIP_CLANG_PATH/../lib/clang/\$HIP_CLANG_VERSION/,${CLANG_RESOURCE_DIR}/,g" 
\
-i bin/hipcc.pl || die
 
# change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align 
with "dev-libs/rocm-device-libs"
-   sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+   sed -e 
"s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" \
-i "${S}/hip-config.cmake.in" || die
 
einfo "prefixing hipcc and its utils..."
-   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
-   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${HIP_S}")
+   hprefixify $(grep -rl --exclude-dir=build/ 
--exclude="hip-config.cmake.in" "/usr" "${S}")
+   hprefixify $(grep -rl --exclude-dir=build/ --exclude="hipcc.pl" "/usr" 
"${HIP_S}")
 
cp "$(prefixify_ro "${FILESDIR}"/hipvars-5.1.3.pm)" bin/hipvars.pm || 
die "failed to replace hipvars.pm"
sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e 
"s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \

diff --git a/dev-util/hip/hip-5.3.3-r1.ebuild b/dev-util/hip/hip-5.3.3-r2.ebuild
similarity index 93%
rename from dev-util/hip/hip-5.3.3-r1.ebuild
rename to dev-util/hip/hip-5.3.3-r2.ebuild
index 07b7709afbc2..bf43460c20d0 100644
--- a/dev-util/hip/hip-5.3.3-r1.ebuild
+++ b/dev-util/hip/hip-5.3.3-r2.ebuild
@@ -97,19 +97,19 @@ src_prepare() {
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
-e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
-   -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
-   -e "s:\$ENV{'HIP_LIB_PATH'}:'/usr/$(get_libdir)':" \
+   -e 
"s:\$ENV{'DEVICE_LIB_PATH'}:'${EPREFIX}/usr/lib/amdgcn/bitcode':" \
+   -e "s:\$ENV{'HIP_LIB_PATH'}:'${EPREFIX}/usr/$(get_libdir)':" \
-e "/rpath/s,--rpath=[^ ]*,," \
-e 
"s,\$HIP_CLANG_PATH/../lib/clang/\$HIP_CLANG_VERSION/,${CLANG_RESOURCE_DIR}/,g" 
\
-i bin/hipcc.pl || die
 
# change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align 
with "dev-libs/rocm-device-libs"
-   sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+   sed -e 
"s:\${AMD_DEVICE_LIBS_PREFIX}/lib:${EPREFIX}/usr/lib/amdgcn/bitcode:" \
-i "${S}/hip-config.cmake.in" || die
 
einfo "prefixing hipcc and its utils..."
-   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
-   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${HIP_S}")
+   hprefixify $(grep -rl --exclude-dir=build/ 
--exclude="hip-config.cmake.in" "/usr" "${S}")
+   hprefixify $(grep -rl --exclude-dir=build/ --exclude="hipcc.pl" "/usr" 
"${HIP_S}")
 
cp "$(prefixify_ro "${FILESDIR}"/hipvars-5.1.3.pm)" bin/hipvars.pm || 
die "failed to replace hipvars.pm"
sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e 
"s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2023-01-20 Thread Sam James
commit: bb6386121107a5a6f108a429e6042a237e07e371
Author: Yiyang Wu  gmail  com>
AuthorDate: Fri Jan 20 10:12:16 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jan 21 03:32:16 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb638612

dev-util/hip: append -fno-stack-protector for hipcc

Closes: https://bugs.gentoo.org/890377
Signed-off-by: Yiyang Wu  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29188
Signed-off-by: Sam James  gentoo.org>

 dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch   | 16 
 .../hip/{hip-5.1.3-r2.ebuild => hip-5.1.3-r3.ebuild} |  1 +
 dev-util/hip/{hip-5.3.3.ebuild => hip-5.3.3-r1.ebuild}   |  1 +
 3 files changed, 18 insertions(+)

diff --git a/dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch 
b/dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch
new file mode 100644
index ..c5957edba734
--- /dev/null
+++ b/dev-util/hip/files/hip-5.1.3-fno-stack-protector.patch
@@ -0,0 +1,16 @@
+Since 1e9b3a08b9243daae1bebd6bac3da939d924df1f /etc/clang/gentoo-hardened.cfg
+has -fstack-protector-strong which may cause build issues for HIP programs (bug
+#890377) Disable this by adding -fno-stack-protector into c/cxx flags in hipcc.
+===
+--- HIP-rocm-5.3.3.orig/bin/hipcc.pl
 HIP-rocm-5.3.3/bin/hipcc.pl
+@@ -687,6 +687,9 @@ if ($rdc and !$compileOnly and $HIP_PLAT
+ # pass-through CPP mode.
+ 
+ if ($HIP_PLATFORM eq "amd") {
++# Append -fno-stack-protector due to stack protection for HIP is not 
supported
++$HIPCXXFLAGS .= " -fno-stack-protector";
++$HIPCFLAGS .= " -fno-stack-protector";
+ # Set default optimization level to -O3 for hip-clang.
+ if ($optArg eq "") {
+ $HIPCXXFLAGS .= " -O3";

diff --git a/dev-util/hip/hip-5.1.3-r2.ebuild b/dev-util/hip/hip-5.1.3-r3.ebuild
similarity index 99%
rename from dev-util/hip/hip-5.1.3-r2.ebuild
rename to dev-util/hip/hip-5.1.3-r3.ebuild
index 34d925ed2342..56090c5077df 100644
--- a/dev-util/hip/hip-5.1.3-r2.ebuild
+++ b/dev-util/hip/hip-5.1.3-r3.ebuild
@@ -100,6 +100,7 @@ src_prepare() {
eapply "${FILESDIR}/${PN}-5.1.3-clang-include-path.patch"
eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
eapply "${FILESDIR}/${PN}-5.0.2-correct-ldflag.patch"
+   eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch"
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \

diff --git a/dev-util/hip/hip-5.3.3.ebuild b/dev-util/hip/hip-5.3.3-r1.ebuild
similarity index 98%
rename from dev-util/hip/hip-5.3.3.ebuild
rename to dev-util/hip/hip-5.3.3-r1.ebuild
index 7ec79ed705eb..07b7709afbc2 100644
--- a/dev-util/hip/hip-5.3.3.ebuild
+++ b/dev-util/hip/hip-5.3.3-r1.ebuild
@@ -92,6 +92,7 @@ src_prepare() {
pushd ${HIP_S} || die
eapply "${FILESDIR}/${PN}-5.1.3-clang-include-path.patch"
eapply "${FILESDIR}/${PN}-5.1.3-rocm-path.patch"
+   eapply "${FILESDIR}/${PN}-5.1.3-fno-stack-protector.patch"
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-12-20 Thread 罗百科
commit: dfcb3624eeac6ae0c9409a3ebec01096ee85a743
Author: Patrick Lauer  gentoo  org>
AuthorDate: Tue Dec 20 09:15:15 2022 +
Commit: 罗百科  gentoo  org>
CommitDate: Tue Dec 20 09:25:48 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfcb3624

dev-util/hip: add 5.3.3

Signed-off-by: Patrick Lauer  gentoo.org>

 dev-util/hip/Manifest |   6 ++
 dev-util/hip/hip-5.3.3.ebuild | 165 ++
 2 files changed, 171 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 48b4b11a54db..2e654c032678 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,12 +1,18 @@
 DIST 5.0.2-update-header.patch.gz 5136 BLAKE2B 
290b9e250e3004a1147ad28606d7d205078affbd809c6a429744767ebabf35bd8df6395dc135984d345ae2f23fa457dcb2524bcbf31c5bf16903d3ee2007bf5d
 SHA512 
41b1025c403e874026a712ec6f6571c873203b08ddadf68848f6d1f63924c21b206677b330f79edad2c4b85e2ba5053b1d33f70c7c09ff9c17bc5905b849da0c
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
+DIST hip-5.3.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
 DIST rocclr-5.0.2.tar.gz 853965 BLAKE2B 
a0d568eb3b230845970d8256a5a2f32018e4b9fb68e0f1aa13a1f3fc953e614025315b90cbe68c107f7150cf91b4b1ea438455429062c7dc06ef77d65dedd2ec
 SHA512 
b30a57c09973d8ef624511f422babaf9722685b9f85643783aebc000671b41fd54f44b308cece0baab187e1ee00b10335c6d22b6bad6fb3468abe6ef0da97d73
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
+DIST rocclr-5.3.3.tar.gz 625944 BLAKE2B 
0cdbc1415a355e1d56628834846aaa8587c9827eeea59f4312b788e868265dcb42197181fd5ef411416da2e11662c7f665f578aa750ab88c3a5405bcc58ee449
 SHA512 
3f85532cffc09c2ca8e7cd1770263d1c1a38633ed2bc5cfe62072e12a6f8f669db400519950718be31f6b77693d372e2ef905f06c7f02e126aa9ff7d2da97924
 DIST rocm-hip-5.0.2.tar.gz 958496 BLAKE2B 
9c8bb1eacd982203e3bd6c24560672c4a9aaf5606608635d7da5a60f613d9be50998f990c1ea3e0e6f5581e0efcba09af736a77bbc9469b2898e0974d063e8d6
 SHA512 
4a99e86a4594c15509a1bbfec0678cd05469eb14dcf35ce650e1eb7c2415f57f59071b1b8add2f8566ccf06242bead77abd275987fe79fe6031dea90d5693805
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
+DIST rocm-hip-5.3.3.tar.gz 1151858 BLAKE2B 
5f460b2078c850b3eb4414fcec4a6f951a3b282aa9828f77ba5d5adfdc0ee8d2e62c856e112a154c340daaf7dad49f4871412edd7b38f7fae2e6b17840ee144b
 SHA512 
e747cc10e78cd09009cac762f0e060be13f3447af7ec2a4a2889cbdc09cd76ecb1b5b58c89f09a3b45a8296c2c71e1c55baf113e58a5a12434af3de7168b8d87
 DIST rocm-hipamd-5.0.2.tar.gz 319973 BLAKE2B 
ca19938eeca66f0d2614ff933e1d0e75b6b8dbc8d996fd4369e5649897b9948271ac88f2a66f0a40ef586d6185b30d01132decac95d1615c1ee419996050ed07
 SHA512 
056acab082b5073e81f9e5de00ae12c85021d1c297cdcfc45b85f191dcc68603f64fe5d0e75f9523120657947eb125beaa9c3ce26234968c43b200e638f9afa3
 DIST rocm-hipamd-5.1.3.tar.gz 331996 BLAKE2B 
176121fe199d53c02a0fc407015681c2f08c8a72104738b457581fd81b37d16efb8170a46d687fb85a45242ba8564246cdd5746e78d9b73dd0bdc9b24eb8378c
 SHA512 
daa6f4da97f71a5fd1f79d8c9e5fc43324743aec91362a05fa62e08966397a637d794abc7e14230eccf5f1271f9fac58d1336aaad1f2cded6cd10792845a494b
+DIST rocm-hipamd-5.3.3.tar.gz 383179 BLAKE2B 
45c4fbf28d639095db3cec0632e1b1d872104b3755bdca818ed37ac46caab399fcd2224330e6ac8df7ab155fb146b6272b3ed2efe00d7358b47f31ca2cb1e4f5
 SHA512 
34c62d915990b6742a2df9b37b6b2bad09f7383e561009519911095e8b65f6f1d79486f7f9b97fa76d7a9755b59fca5a5dff321d8c8b15fd83f2fd22ce08834c
 DIST rocm-opencl-runtime-5.0.2.tar.gz 1004855 BLAKE2B 
e2c2beb987053204fbe8fda562ae65d6c1a58447e9e88bf1081aabeee6c9a10738fd8562114b564b647682438fdbd2c535db1008ac6e1cc4eb9a915998eeb3c7
 SHA512 
fa01d1fafc890181b9e67070353ee7c9100619494b7509cae1a3659f24ef1d00f650024cb24bdb0e6e7eacfdec1115e4683ec6f320228a19f41ae83321780780
 DIST rocm-opencl-runtime-5.1.3.tar.gz 1004765 BLAKE2B 
64d9b42026d2be1d0e4aa666785699f6b4ec0584a927904a94bf830883050943503f8bdd7c97438a2fb11c71686a330d526f633959916c5c6c8da2e037841e79
 SHA512 
b83c3ae0bfad80f867bacce36710a8964f6dd7e64

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2022-12-19 Thread Andreas Sturmlechner
commit: 6a3c76e5a7d7f1519b5a943e3ae725c127f2675d
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Dec 18 12:15:19 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Mon Dec 19 14:00:01 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a3c76e5

dev-util/hip: drop versions 3* and 4*

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 dev-util/hip/Manifest  |   5 -
 dev-util/hip/files/hip-3.5.1-config-cmake-in.patch |  28 -
 ...p-3.5.1-detect_offload-arch_for_clang-roc.patch |  21 
 .../hip/files/hip-3.5.1-hip_vector_types.patch |  10 --
 dev-util/hip/files/hip-3.9.0-DisableTest.patch |  87 
 .../files/hip-3.9.0-add-include-directories.patch  |  13 ---
 .../hip/files/hip-3.9.0-lpl_ca-add-include.patch   |  10 --
 dev-util/hip/files/hip-4.1.0-DisableTest.patch |  37 ---
 .../hip/files/hip-4.3.0-hip_vector_types.patch |  11 --
 dev-util/hip/hip-4.0.0-r1.ebuild   | 116 -
 dev-util/hip/hip-4.0.0.ebuild  | 107 ---
 dev-util/hip/hip-4.1.0-r1.ebuild   | 105 ---
 dev-util/hip/hip-4.1.0.ebuild  | 109 ---
 dev-util/hip/hip-4.2.0.ebuild  | 108 ---
 dev-util/hip/hip-4.3.0-r1.ebuild   | 108 ---
 dev-util/hip/hip-4.3.0-r2.ebuild   | 112 
 dev-util/hip/hip-4.3.0.ebuild  | 107 ---
 17 files changed, 1094 deletions(-)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index de73421d0c04..48b4b11a54db 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -2,15 +2,10 @@ DIST 5.0.2-update-header.patch.gz 5136 BLAKE2B 
290b9e250e3004a1147ad28606d7d2050
 DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
 DIST rocclr-5.0.2.tar.gz 853965 BLAKE2B 
a0d568eb3b230845970d8256a5a2f32018e4b9fb68e0f1aa13a1f3fc953e614025315b90cbe68c107f7150cf91b4b1ea438455429062c7dc06ef77d65dedd2ec
 SHA512 
b30a57c09973d8ef624511f422babaf9722685b9f85643783aebc000671b41fd54f44b308cece0baab187e1ee00b10335c6d22b6bad6fb3468abe6ef0da97d73
 DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
-DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 
02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be
 SHA512 
cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6
-DIST rocm-hip-4.1.0.tar.gz 954215 BLAKE2B 
c4b75ab2158e6921be1c34820ab5d1a5e2eb36112834b0143c50023caa27de384e0497f4837947cc7fe05554c6c95201340b1979eb916b31ebb4ffec8c923735
 SHA512 
420ffd7b79e2b4506873cbfc56e96395f8ed9d9375ce28df51626601199d4d8dca6920528e255d39a48ad66ee11f4b653f3b9f659df489d32b21886fb86c64b5
-DIST rocm-hip-4.2.0.tar.gz 918281 BLAKE2B 
45c28289c8ff9e600bfd9daff8af162c897fcfdf41ce65d91d1761d58253d87a6385fd4a15e818619ca39d3413479bf043ab2758fead349a243105e979b64f7c
 SHA512 
e620507321c949ded2eab6159099eef0eab267eb686b6ee0ed86022fffaa51fb8714a7f344b79acf76c876c55919360905d1bb3a7c00a87f40174774d6682ce8
-DIST rocm-hip-4.3.0.tar.gz 967550 BLAKE2B 
263e8bbaa86198d3cb6a29f5597b56a3fe1e9338a8c485935070e6253816ccdba9671f33d8142c260aa3c36f43a71de7f2c1b7a15e1227f97aaf03ed10ce10dd
 SHA512 
bc2d9597200405397387cc8f626f0cc734ee450c462bd7c7a0c655e3dfe2d1e09780328cbfa1c0d1e0db836e561fc450c5d514a6ad1a5828cb913c4c3c535ef1
 DIST rocm-hip-5.0.2.tar.gz 958496 BLAKE2B 
9c8bb1eacd982203e3bd6c24560672c4a9aaf5606608635d7da5a60f613d9be50998f990c1ea3e0e6f5581e0efcba09af736a77bbc9469b2898e0974d063e8d6
 SHA512 
4a99e86a4594c15509a1bbfec0678cd05469eb14dcf35ce650e1eb7c2415f57f59071b1b8add2f8566ccf06242bead77abd275987fe79fe6031dea90d5693805
 DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hipamd-5.0.2.tar.gz 319973 BLAKE2B 
ca19938eeca66f0d2614ff933e1d0e75b6b8dbc8d996fd4369e5649897b9948271ac88f2a66f0a40ef586d6185b30d01132decac95d1615c1ee419996050ed07
 SHA512 
056acab082b5073e81f9e5de00ae12c85021d1c297cdcfc45b85f191dcc68603f64fe5d0e75f9523120657947eb125beaa9c3ce26234968c43b200e

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2022-11-19 Thread Benda XU
commit: c6db8c2f742c153f5c7dd7482a6b23e894cc84e9
Author: Jack de Kleuver  gmail  com>
AuthorDate: Sat Nov  5 07:09:35 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Sat Nov 19 11:50:41 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6db8c2f

dev-util/hip: Set LLVM version to 15

backport fix for `__noinline__` keyword

Bug: https://bugs.gentoo.org/857126
Signed-off-by: Jack de Kleuver  gmail.com>
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 .../files/hip-5.1.3-llvm-15-noinline-keyword.patch  | 21 +
 .../{hip-5.1.3-r1.ebuild => hip-5.1.3-r2.ebuild}|  3 ++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch 
b/dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch
new file mode 100644
index ..de61356a5cc6
--- /dev/null
+++ b/dev-util/hip/files/hip-5.1.3-llvm-15-noinline-keyword.patch
@@ -0,0 +1,21 @@
+LLVM 15 adds __noinline__ as a keyword to match behaviour of GCC 12.
+
+When this macro is left in, it can cause the expression 
__attribute__((__noinline__)) to be expanded incorrectly.
+
+When the __noinline__ keyword is available disable the macro.
+
+Ref: https://reviews.llvm.org/D124866
+ https://bugs.gentoo.org/85712
+===
+--- a/include/hip/amd_detail/host_defines.h
 b/include/hip/amd_detail/host_defines.h
+@@ -47,7 +47,9 @@ THE SOFTWARE.
+ #define __constant__ __attribute__((constant))
+ #endif // !__CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__
+ 
++#if !defined(__has_feature) || !__has_feature(cuda_noinline_keyword)
+ #define __noinline__ __attribute__((noinline))
++#endif
+ #define __forceinline__ inline __attribute__((always_inline))
+ 
+ #if __HIP_NO_IMAGE_SUPPORT

diff --git a/dev-util/hip/hip-5.1.3-r1.ebuild b/dev-util/hip/hip-5.1.3-r2.ebuild
similarity index 98%
rename from dev-util/hip/hip-5.1.3-r1.ebuild
rename to dev-util/hip/hip-5.1.3-r2.ebuild
index 27d78bc64fc7..6ed8327cb213 100644
--- a/dev-util/hip/hip-5.1.3-r1.ebuild
+++ b/dev-util/hip/hip-5.1.3-r2.ebuild
@@ -9,7 +9,7 @@ DOCS_DEPEND="media-gfx/graphviz"
 
 inherit cmake docs llvm prefix python-any-r1
 
-LLVM_MAX_SLOT=14
+LLVM_MAX_SLOT=15
 
 DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
 HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd";
@@ -52,6 +52,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.1.3-correct-sample-install-location.patch"
"${FILESDIR}/${PN}-5.1.3-remove-cmake-doxygen-commands.patch"
"${FILESDIR}/0001-SWDEV-316128-HIP-surface-API-support.patch"
+   "${FILESDIR}/${PN}-5.1.3-llvm-15-noinline-keyword.patch"
 )
 
 python_check_deps() {



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-10-08 Thread Arthur Zamarin
commit: a9beade97fe1dc1b2488d4813c5a6d880e65
Author: Arthur Zamarin  gentoo  org>
AuthorDate: Sat Oct  8 12:24:41 2022 +
Commit: Arthur Zamarin  gentoo  org>
CommitDate: Sat Oct  8 12:40:30 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9beade9

dev-util/hip: use python_has_version

Signed-off-by: Arthur Zamarin  gentoo.org>

 dev-util/hip/hip-5.0.2-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-util/hip/hip-5.0.2-r3.ebuild b/dev-util/hip/hip-5.0.2-r3.ebuild
index 15ea58b0895c..acf5fc9ef78e 100644
--- a/dev-util/hip/hip-5.0.2-r3.ebuild
+++ b/dev-util/hip/hip-5.0.2-r3.ebuild
@@ -47,7 +47,7 @@ PATCHES=(
 
 python_check_deps() {
if use profile; then
-   has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
+   python_has_version 
"dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
fi
 }
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-09-12 Thread Benda XU
commit: 0a35da712cb2262ea945f6ef66e03866579b9d14
Author: Yiyang Wu  gmail  com>
AuthorDate: Sun Aug 28 05:38:41 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Sep 12 08:40:56 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a35da71

dev-util/hip: Fix cmake module and install location

${HIP_COMMON_DIR}/cmake, containing FindHIP.cmake, should be installed
into /usr/share/cmake/Modules. ${S}/CMakeLists.txt (both 5.{0,1})and
${S}/packaging/CMakeLists.txt (only 5.1) is installing it into /usr/lib/cmake.
Cancel installation in packaging/CMakeLists.txt, correct CMakeLists.txt.

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/{hip-5.0.2-r2.ebuild => hip-5.0.2-r3.ebuild} | 2 +-
 dev-util/hip/{hip-5.1.3.ebuild => hip-5.1.3-r1.ebuild}| 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dev-util/hip/hip-5.0.2-r2.ebuild b/dev-util/hip/hip-5.0.2-r3.ebuild
similarity index 97%
rename from dev-util/hip/hip-5.0.2-r2.ebuild
rename to dev-util/hip/hip-5.0.2-r3.ebuild
index fd069acfe4b4..15ea58b0895c 100644
--- a/dev-util/hip/hip-5.0.2-r2.ebuild
+++ b/dev-util/hip/hip-5.0.2-r3.ebuild
@@ -74,7 +74,7 @@ src_prepare() {
 
# correct libs and cmake install dir
sed -e "/LIB_INSTALL_DIR/s:PREFIX}/lib:PREFIX}/$(get_libdir):" \
-   -e "/${HIP_COMMON_DIR}\/cmake DESTINATION/s: .): 
$(get_libdir)):" -i CMakeLists.txt || die
+   -e "/\${HIP_COMMON_DIR}/s:cmake DESTINATION .):cmake/ 
DESTINATION share/cmake/Modules):" -i CMakeLists.txt || die
sed -e "/LIBRARY DESTINATION/s:lib:$(get_libdir):" -i 
src/CMakeLists.txt || die
 
cd ${HIP_S} || die

diff --git a/dev-util/hip/hip-5.1.3.ebuild b/dev-util/hip/hip-5.1.3-r1.ebuild
similarity index 97%
rename from dev-util/hip/hip-5.1.3.ebuild
rename to dev-util/hip/hip-5.1.3-r1.ebuild
index a9e9844fdcc2..634351aead1f 100644
--- a/dev-util/hip/hip-5.1.3.ebuild
+++ b/dev-util/hip/hip-5.1.3-r1.ebuild
@@ -81,12 +81,12 @@ src_prepare() {
 
# correct libs and cmake install dir
sed -e "/LIB_INSTALL_DIR/s:PREFIX}/lib:PREFIX}/$(get_libdir):" \
-   -e "/${HIP_COMMON_DIR}\/cmake DESTINATION/s: .): 
$(get_libdir)):" -i CMakeLists.txt || die
+   -e "/\${HIP_COMMON_DIR}/s:cmake DESTINATION .):cmake/ 
DESTINATION share/cmake/Modules):" -i CMakeLists.txt || die
sed -e "/LIBRARY DESTINATION/s:lib:$(get_libdir):" -i 
src/CMakeLists.txt || die
 
sed -e "/\.hip/d" \
-e "s,DESTINATION lib,DESTINATION $(get_libdir),g" \
-   -e "/\(cmake\|samples\)/s,DESTINATION \.,DESTINATION share,g" \
+   -e "/cmake DESTINATION/d" \
-e "/CPACK_RESOURCE_FILE_LICENSE/d" -i packaging/CMakeLists.txt 
|| die
 
pushd ${HIP_S} || die



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-09-12 Thread Benda XU
commit: 430977b9924951dd5a00a647037a264b50640825
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Sep  5 09:26:16 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Sep 12 08:41:05 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=430977b9

dev-util/hip: Use python_has_version recommended by QA

Closes: https://github.com/gentoo/gentoo/pull/27066
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.1.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-util/hip/hip-5.1.3-r1.ebuild b/dev-util/hip/hip-5.1.3-r1.ebuild
index 9a485e3edfdc..27d78bc64fc7 100644
--- a/dev-util/hip/hip-5.1.3-r1.ebuild
+++ b/dev-util/hip/hip-5.1.3-r1.ebuild
@@ -56,7 +56,7 @@ PATCHES=(
 
 python_check_deps() {
if use profile; then
-   has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
+   python_has_version 
"dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
fi
 }
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2022-09-12 Thread Benda XU
commit: 617aabf1f78804a35d1cdf614e40d5873c813207
Author: Yiyang Wu  gmail  com>
AuthorDate: Fri Sep  2 08:25:49 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Sep 12 08:41:01 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=617aabf1

dev-util/hip: Use docs.eclass to control doc install

By default, hip build documentation using doxygen in
packaging/CMakeLists. Patch it out and use docs.eclass instead.

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 .../hip-5.1.3-remove-cmake-doxygen-commands.patch   | 21 +
 dev-util/hip/hip-5.1.3-r1.ebuild| 12 +++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/dev-util/hip/files/hip-5.1.3-remove-cmake-doxygen-commands.patch 
b/dev-util/hip/files/hip-5.1.3-remove-cmake-doxygen-commands.patch
new file mode 100644
index ..921452b2ba92
--- /dev/null
+++ b/dev-util/hip/files/hip-5.1.3-remove-cmake-doxygen-commands.patch
@@ -0,0 +1,21 @@
+Index: hipamd-rocm-5.1.3/packaging/CMakeLists.txt
+===
+--- hipamd-rocm-5.1.3.orig/packaging/CMakeLists.txt
 hipamd-rocm-5.1.3/packaging/CMakeLists.txt
+@@ -88,16 +88,6 @@ install(FILES ${CMAKE_BINARY_DIR}/includ
+ DESTINATION include/hip COMPONENT dev)
+ #End dev files install
+ 
+-#Begin doc files install
+-find_program(DOXYGEN_EXE doxygen)
+-if(DOXYGEN_EXE)
+-add_custom_target(build_doxygen ALL
+-  COMMAND HIP_PATH=${HIP_COMMON_DIR} doxygen 
${HIP_COMMON_DIR}/docs/doxygen-input/doxy.cfg)
+-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/RuntimeAPI/html
+-DESTINATION docs/RuntimeAPI COMPONENT doc)
+-endif()
+-#End doc files install
+-
+ #Begin samples files install
+ install(DIRECTORY ${HIP_COMMON_DIR}/samples DESTINATION 
${CMAKE_INSTALL_DOCDIR}/ COMPONENT samples)
+ #End samples files install

diff --git a/dev-util/hip/hip-5.1.3-r1.ebuild b/dev-util/hip/hip-5.1.3-r1.ebuild
index f9f620fe8170..9a485e3edfdc 100644
--- a/dev-util/hip/hip-5.1.3-r1.ebuild
+++ b/dev-util/hip/hip-5.1.3-r1.ebuild
@@ -4,8 +4,10 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{8..11} )
+DOCS_BUILDER="doxygen"
+DOCS_DEPEND="media-gfx/graphviz"
 
-inherit cmake llvm prefix python-any-r1
+inherit cmake docs llvm prefix python-any-r1
 
 LLVM_MAX_SLOT=14
 
@@ -48,6 +50,7 @@ PATCHES=(
"${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
"${FILESDIR}/${PN}-5.1.3-fix-hip_prof_gen.patch"
"${FILESDIR}/${PN}-5.1.3-correct-sample-install-location.patch"
+   "${FILESDIR}/${PN}-5.1.3-remove-cmake-doxygen-commands.patch"
"${FILESDIR}/0001-SWDEV-316128-HIP-surface-API-support.patch"
 )
 
@@ -62,6 +65,8 @@ HIP_S="${WORKDIR}"/HIP-rocm-${PV}
 OCL_S="${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV}
 CLR_S="${WORKDIR}"/ROCclr-rocm-${PV}
 RTC_S="${WORKDIR}"/roctracer-rocm-${PV}
+DOCS_DIR="${HIP_S}"/docs/doxygen-input
+DOCS_CONFIG_NAME=doxy.cfg
 
 src_prepare() {
cmake_src_prepare
@@ -151,6 +156,11 @@ src_configure() {
cmake_src_configure
 }
 
+src_compile() {
+   HIP_PATH=${HIP_S} docs_compile
+   cmake_src_compile
+}
+
 src_install() {
 
cmake_src_install



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2022-09-12 Thread Benda XU
commit: 3431032de4948980d3720393331d1a978461911a
Author: Yiyang Wu  gmail  com>
AuthorDate: Fri Sep  2 08:24:49 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Sep 12 08:40:58 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3431032d

dev-util/hip: Fix sample install dir

Using patch instead of sed command. In hip develop branch, the syntax
has changed, so use patch can avoid silent failures in the future.

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 .../files/hip-5.1.3-correct-sample-install-location.patch   | 13 +
 dev-util/hip/hip-5.1.3-r1.ebuild|  1 +
 2 files changed, 14 insertions(+)

diff --git a/dev-util/hip/files/hip-5.1.3-correct-sample-install-location.patch 
b/dev-util/hip/files/hip-5.1.3-correct-sample-install-location.patch
new file mode 100644
index ..57ac5cc3e992
--- /dev/null
+++ b/dev-util/hip/files/hip-5.1.3-correct-sample-install-location.patch
@@ -0,0 +1,13 @@
+Index: hipamd-rocm-5.1.3/packaging/CMakeLists.txt
+===
+--- hipamd-rocm-5.1.3.orig/packaging/CMakeLists.txt
 hipamd-rocm-5.1.3/packaging/CMakeLists.txt
+@@ -106,7 +106,7 @@ endif()
+ #End doc files install
+ 
+ #Begin samples files install
+-install(DIRECTORY ${HIP_COMMON_DIR}/samples DESTINATION . COMPONENT samples)
++install(DIRECTORY ${HIP_COMMON_DIR}/samples DESTINATION 
${CMAKE_INSTALL_DOCDIR}/ COMPONENT samples)
+ #End samples files install
+ 
+ #Begin test files install

diff --git a/dev-util/hip/hip-5.1.3-r1.ebuild b/dev-util/hip/hip-5.1.3-r1.ebuild
index 634351aead1f..f9f620fe8170 100644
--- a/dev-util/hip/hip-5.1.3-r1.ebuild
+++ b/dev-util/hip/hip-5.1.3-r1.ebuild
@@ -47,6 +47,7 @@ PATCHES=(
"${FILESDIR}/${PN}-4.2.0-cancel-hcc-header-removal.patch"
"${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
"${FILESDIR}/${PN}-5.1.3-fix-hip_prof_gen.patch"
+   "${FILESDIR}/${PN}-5.1.3-correct-sample-install-location.patch"
"${FILESDIR}/0001-SWDEV-316128-HIP-surface-API-support.patch"
 )
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2022-08-06 Thread Benda XU
commit: 82a6c2ca05ccf2dad8cbd75a813d6deafe4f105f
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Jun 15 12:42:07 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Sat Aug  6 14:22:03 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82a6c2ca

dev-util/hip: add 5.1.3

Switch from llvm-roc to vanilla clang --
New variables about clang path in hipvars.pm
hip-5.1.3-clang-include-path.patch to fix hipcc finding clang
hip-5.1.3-rocm-path.patch: add compile flag to support unpatched clang
Using sed cmd to fix clang header location in cmake

Closes: https://bugs.gentoo.org/851702
Reference: https://github.com/ROCm-Developer-Tools/hipamd/issues/18
Reference: https://github.com/ROCm-Developer-Tools/hipamd/issues/27
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/Manifest  |   6 +
 ...0001-SWDEV-316128-HIP-surface-API-support.patch |  35 +
 .../hip/files/hip-5.1.3-clang-include-path.patch   |  12 ++
 .../hip/files/hip-5.1.3-fix-hip_prof_gen.patch |  38 +
 dev-util/hip/files/hip-5.1.3-rocm-path.patch   |  13 ++
 dev-util/hip/files/hipvars-5.1.3.pm|  21 +++
 dev-util/hip/hip-5.1.3.ebuild  | 161 +
 7 files changed, 286 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index a5655c73e1a8..de73421d0c04 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,11 +1,17 @@
 DIST 5.0.2-update-header.patch.gz 5136 BLAKE2B 
290b9e250e3004a1147ad28606d7d205078affbd809c6a429744767ebabf35bd8df6395dc135984d345ae2f23fa457dcb2524bcbf31c5bf16903d3ee2007bf5d
 SHA512 
41b1025c403e874026a712ec6f6571c873203b08ddadf68848f6d1f63924c21b206677b330f79edad2c4b85e2ba5053b1d33f70c7c09ff9c17bc5905b849da0c
+DIST hip-5.1.3-update-header.patch.gz 3406 BLAKE2B 
805539c3396a9cdcc4b807afd96eacd2de0e494a9ec927a1526cb8ce26b1c6e0a4d06415cd0210cba1398b5ff70f995fa67ad22b659578c075eb24c2a2cc9228
 SHA512 
eef4d70f9470a61d1d8cb140728cc4f2e792a4e64e0900a7410a74f3a6421410e7546e4e62bbbf35ae231b566bf162fb85de1f1ad1d8cfb2f282d2ed9a34b53a
 DIST rocclr-5.0.2.tar.gz 853965 BLAKE2B 
a0d568eb3b230845970d8256a5a2f32018e4b9fb68e0f1aa13a1f3fc953e614025315b90cbe68c107f7150cf91b4b1ea438455429062c7dc06ef77d65dedd2ec
 SHA512 
b30a57c09973d8ef624511f422babaf9722685b9f85643783aebc000671b41fd54f44b308cece0baab187e1ee00b10335c6d22b6bad6fb3468abe6ef0da97d73
+DIST rocclr-5.1.3.tar.gz 618606 BLAKE2B 
02b7732ddd03c0883bee49c56466cd21c649159f801bfb2537eea6e640c65613eb57b37d942f465a9deb83d65735f51212dde5e4f77ba8239d1a6b7037e1800c
 SHA512 
89fd2eca39ed84a1cf525b2c606089ef39f64c1f997c4880e10722da6de4864110752640e1508db1aeb9d15c48ba4e6fe5dbe7a9e56718853ece42548028b2ca
 DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 
02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be
 SHA512 
cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6
 DIST rocm-hip-4.1.0.tar.gz 954215 BLAKE2B 
c4b75ab2158e6921be1c34820ab5d1a5e2eb36112834b0143c50023caa27de384e0497f4837947cc7fe05554c6c95201340b1979eb916b31ebb4ffec8c923735
 SHA512 
420ffd7b79e2b4506873cbfc56e96395f8ed9d9375ce28df51626601199d4d8dca6920528e255d39a48ad66ee11f4b653f3b9f659df489d32b21886fb86c64b5
 DIST rocm-hip-4.2.0.tar.gz 918281 BLAKE2B 
45c28289c8ff9e600bfd9daff8af162c897fcfdf41ce65d91d1761d58253d87a6385fd4a15e818619ca39d3413479bf043ab2758fead349a243105e979b64f7c
 SHA512 
e620507321c949ded2eab6159099eef0eab267eb686b6ee0ed86022fffaa51fb8714a7f344b79acf76c876c55919360905d1bb3a7c00a87f40174774d6682ce8
 DIST rocm-hip-4.3.0.tar.gz 967550 BLAKE2B 
263e8bbaa86198d3cb6a29f5597b56a3fe1e9338a8c485935070e6253816ccdba9671f33d8142c260aa3c36f43a71de7f2c1b7a15e1227f97aaf03ed10ce10dd
 SHA512 
bc2d9597200405397387cc8f626f0cc734ee450c462bd7c7a0c655e3dfe2d1e09780328cbfa1c0d1e0db836e561fc450c5d514a6ad1a5828cb913c4c3c535ef1
 DIST rocm-hip-5.0.2.tar.gz 958496 BLAKE2B 
9c8bb1eacd982203e3bd6c24560672c4a9aaf5606608635d7da5a60f613d9be50998f990c1ea3e0e6f5581e0efcba09af736a77bbc9469b2898e0974d063e8d6
 SHA512 
4a99e86a4594c15509a1bbfec0678cd05469eb14dcf35ce650e1eb7c2415f57f59071b1b8add2f8566ccf06242bead77abd275987fe79fe6031dea90d5693805
+DIST rocm-hip-5.1.3.tar.gz 967696 BLAKE2B 
15cb52b5934b84acf515fe9c83b7c8982e00a23e20af933bdd2c4bc5b56fd42b08c8a08e840c85d2e0a8386d5a0e9c110504f68499989de1aaad00e9a5efcf43
 SHA512 
6b6fd6c12d73788df1711b12326b97fc7a184f319e0db114947b7967b75f2ee131f81e42e43a4981456b507221a6013133731120409f90214e13304299ccbc24
 DIST rocm-hipamd-5.0.2.tar.gz 319973 BLAKE2B 
ca19938eeca66f0d2614ff933e1d0e75b6b8dbc8d996fd4369e5649897b9948271ac88f2a66f0a40ef586d6185b30d01132decac95d1615c1ee419996050ed07
 SHA512 
056acab082b5073e81f9e5de00ae12c85021d1c297cdcfc45b85f191dcc68603f64fe5d0e75f9523120657947eb125beaa9c3ce26234968c43b200e638f9afa3
+DIST rocm-hipamd-5.1.3.tar.gz 331996 BLAKE2B 
176121fe199d53c02a0fc407

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2022-07-08 Thread Benda XU
commit: 7dac65ea4155fa1f5a21bdd46dd9793d21911e0e
Author: Yiyang Wu  gmail  com>
AuthorDate: Mon Jun 27 13:12:30 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Fri Jul  8 17:40:06 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dac65ea

dev-util/hip: add missing BDEPEND for USE=profile

Also fix ld warnings by patch out unecessary ldflag added by hipcc.pl

Closes: https://github.com/gentoo/gentoo/pull/26090
Closes: https://bugs.gentoo.org/843263
Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1166193820
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/files/hip-5.0.2-correct-ldflag.patch | 18 ++
 dev-util/hip/hip-5.0.2-r2.ebuild  | 17 -
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/dev-util/hip/files/hip-5.0.2-correct-ldflag.patch 
b/dev-util/hip/files/hip-5.0.2-correct-ldflag.patch
new file mode 100644
index ..81d1bc3b8552
--- /dev/null
+++ b/dev-util/hip/files/hip-5.0.2-correct-ldflag.patch
@@ -0,0 +1,18 @@
+This removes ldflag -L"/usr/lib" and -Wl,-rpath=/usr/lib:/usr/lib which
+causes `ld: skipping incompatible /usr/lib/libm.so when searching for -lm`
+Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1166193820
+===
+--- HIP-rocm-5.1.3.orig/bin/hipcc.pl
 HIP-rocm-5.1.3/bin/hipcc.pl
+@@ -703,9 +703,9 @@ if ($HIP_PLATFORM eq "amd") {
+ 
+ if (not $isWindows  and not $compileOnly) {
+   if ($linkType eq 0) {
+-$toolArgs = " -L$HIP_LIB_PATH -lamdhip64 -L$ROCM_PATH/lib 
-lhsa-runtime64 -ldl -lnuma " . ${toolArgs};
++$toolArgs = " -lamdhip64 -lhsa-runtime64 -ldl -lnuma " . ${toolArgs};
+   } else {
+-$toolArgs = " -Wl,--enable-new-dtags 
-Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 " . ${toolArgs};
++$toolArgs = " -Wl,--enable-new-dtags -lamdhip64 " . ${toolArgs};
+   }
+   # To support __fp16 and _Float16, explicitly link with compiler-rt
+   
$HIP_CLANG_BUILTIN_LIB="/opt/gentoo/opt/gentoo/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.6/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a";

diff --git a/dev-util/hip/hip-5.0.2-r2.ebuild b/dev-util/hip/hip-5.0.2-r2.ebuild
index 223386227084..fd069acfe4b4 100644
--- a/dev-util/hip/hip-5.0.2-r2.ebuild
+++ b/dev-util/hip/hip-5.0.2-r2.ebuild
@@ -2,7 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
-inherit cmake prefix
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit cmake prefix python-any-r1
 
 DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
 HOMEPAGE="https://github.com/ROCm-Developer-Tools/hipamd";
@@ -29,6 +32,10 @@ DEPEND="
 RDEPEND="${DEPEND}
dev-perl/URI-Encode
dev-libs/roct-thunk-interface:${SLOT}"
+BDEPEND="profile? ( $(python_gen_any_dep '
+   dev-python/CppHeaderParser[${PYTHON_USEDEP}]
+   ') )
+"
 
 PATCHES=(
"${FILESDIR}/${PN}-5.0.1-DisableTest.patch"
@@ -38,6 +45,12 @@ PATCHES=(
"${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
 )
 
+python_check_deps() {
+   if use profile; then
+   has_version "dev-python/CppHeaderParser[${PYTHON_USEDEP}]"
+   fi
+}
+
 S="${WORKDIR}/hipamd-rocm-${PV}"
 HIP_S="${WORKDIR}"/HIP-rocm-${PV}
 OCL_S="${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV}
@@ -65,11 +78,13 @@ src_prepare() {
sed -e "/LIBRARY DESTINATION/s:lib:$(get_libdir):" -i 
src/CMakeLists.txt || die
 
cd ${HIP_S} || die
+   eapply "${FILESDIR}/${PN}-5.0.2-correct-ldflag.patch"
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
-e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
-e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
+   -e "s:\$ENV{'HIP_LIB_PATH'}:'/usr/$(get_libdir)':" \
-e "/rpath/s,--rpath=[^ ]*,," \
-i bin/hipcc.pl || die
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-06-22 Thread Benda XU
commit: 12344ff2860eca5dffa212e1b95aac414f1992dc
Author: Yiyang Wu  gmail  com>
AuthorDate: Tue Jun 21 10:51:05 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Jun 22 12:59:29 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12344ff2

dev-util/hip: Fix -isystem pollution after d5835abb

After d5835abbe66be09b9851fcc79a158d1a083ad8fc which corrects the
HIP_PATH, HIP_INCLUDE_PATH now points to /usr/include and hipcc.pl added
-isystem $HIP_INCLUDE_PATH which caused complilation failure. Fix it by
removing lines in hipcc.pl

Bug: https://bugs.gentoo.org/853184
Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1159800433
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/{hip-5.0.2-r1.ebuild => hip-5.0.2-r2.ebuild} | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-util/hip/hip-5.0.2-r1.ebuild b/dev-util/hip/hip-5.0.2-r2.ebuild
similarity index 98%
rename from dev-util/hip/hip-5.0.2-r1.ebuild
rename to dev-util/hip/hip-5.0.2-r2.ebuild
index 771cda985e88..037c442ec73b 100644
--- a/dev-util/hip/hip-5.0.2-r1.ebuild
+++ b/dev-util/hip/hip-5.0.2-r2.ebuild
@@ -67,6 +67,7 @@ src_prepare() {
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+   -e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
-e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
-e "/rpath/s,--rpath=[^ ]*,," \
-i bin/hipcc.pl || die



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2022-06-22 Thread Benda XU
commit: 93ff73188c29fe12088f6166df669847cde9b2b4
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Jun 22 11:39:27 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Jun 22 13:00:00 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93ff7318

dev-util/hip: fix build failure when git not installed

Closes: https://bugs.gentoo.org/853718
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/files/hip-5.0.2-set-build-id.patch | 20 
 dev-util/hip/hip-5.0.2-r2.ebuild|  1 +
 2 files changed, 21 insertions(+)

diff --git a/dev-util/hip/files/hip-5.0.2-set-build-id.patch 
b/dev-util/hip/files/hip-5.0.2-set-build-id.patch
new file mode 100644
index ..21dfadf18b61
--- /dev/null
+++ b/dev-util/hip/files/hip-5.0.2-set-build-id.patch
@@ -0,0 +1,20 @@
+If git is not found, HIP_VERSION_BUILD_ID will not be set, causing bug 853718
+===
+--- hipamd-rocm-5.0.2.orig/CMakeLists.txt
 hipamd-rocm-5.0.2/CMakeLists.txt
+@@ -89,6 +89,7 @@ list(GET VERSION_LIST 2 HIP_VERSION_PATC
+ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
+ list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
+ set(HIP_VERSION_GITDATE 0)
++set(HIP_VERSION_BUILD_ID 0)
+ 
+ find_package(Git)
+ 
+@@ -126,7 +127,6 @@ if(GIT_FOUND)
+ set(HIP_VERSION_GITHASH ${git_output})
+   endif()
+ 
+-  set(HIP_VERSION_BUILD_ID 0)
+   set(HIP_VERSION_BUILD_NAME "")
+   if(NOT DEFINED ENV{HIP_OFFICIAL_BUILD} AND NOT HIP_OFFICIAL_BUILD)
+ # FIXME: Disabling it for ROCm 5.0

diff --git a/dev-util/hip/hip-5.0.2-r2.ebuild b/dev-util/hip/hip-5.0.2-r2.ebuild
index 037c442ec73b..223386227084 100644
--- a/dev-util/hip/hip-5.0.2-r2.ebuild
+++ b/dev-util/hip/hip-5.0.2-r2.ebuild
@@ -35,6 +35,7 @@ PATCHES=(
"${FILESDIR}/${PN}-4.2.0-config-cmake-in.patch"
"${FILESDIR}/${PN}-5.0.1-hip_vector_types.patch"
"${FILESDIR}/${PN}-4.2.0-cancel-hcc-header-removal.patch"
+   "${FILESDIR}/${PN}-5.0.2-set-build-id.patch"
 )
 
 S="${WORKDIR}/hipamd-rocm-${PV}"



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2022-06-13 Thread Benda XU
commit: d5835abbe66be09b9851fcc79a158d1a083ad8fc
Author: Yiyang Wu  gmail  com>
AuthorDate: Sun Jun 12 11:55:29 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Jun 13 12:00:43 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5835abb

dev-util/hip-5.0.2: fix HIP_PATH in hipvars.pm

Reference: https://github.com/gentoo/gentoo/pull/25536#issuecomment-1153136503
Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1152988796
Closes: https://github.com/gentoo/gentoo/pull/25861
Suggested-by: Paul Preney  preney.ca>
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/files/hipvars-5.0.2.pm  | 20 
 .../hip/{hip-5.0.2.ebuild => hip-5.0.2-r1.ebuild}|  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/dev-util/hip/files/hipvars-5.0.2.pm 
b/dev-util/hip/files/hipvars-5.0.2.pm
new file mode 100644
index ..88d3c27bab99
--- /dev/null
+++ b/dev-util/hip/files/hipvars-5.0.2.pm
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -w
+package hipvars;
+
+$HIP_BASE_VERSION_MAJOR = "@HIP_BASE_VERSION_MAJOR@";
+$HIP_BASE_VERSION_MINOR = "@HIP_BASE_VERSION_MINOR@";
+
+$isWindows = 0;
+$HIP_PATH='/usr';
+$ROCM_PATH='/usr';
+$CUDA_PATH='/opt/cuda';
+$HSA_PATH='/usr';
+$HIP_CLANG_PATH='/usr/lib/llvm/roc/bin';
+$HIP_ROCCLR_HOME=$HIP_PATH;
+$HIP_PLATFORM='amd';
+$HIP_COMPILER = "clang";
+$HIP_RUNTIME = "rocclr";
+$HIP_VERSION_MAJOR = $HIP_BASE_VERSION_MAJOR;
+$HIP_VERSION_MINOR = $HIP_BASE_VERSION_MINOR;
+$HIP_VERSION_PATCH = "@HIP_VERSION_PATCH@";
+$HIP_VERSION="$HIP_VERSION_MAJOR.$HIP_VERSION_MINOR.$HIP_VERSION_PATCH";

diff --git a/dev-util/hip/hip-5.0.2.ebuild b/dev-util/hip/hip-5.0.2-r1.ebuild
similarity index 97%
rename from dev-util/hip/hip-5.0.2.ebuild
rename to dev-util/hip/hip-5.0.2-r1.ebuild
index e3438bc87ea4..771cda985e88 100644
--- a/dev-util/hip/hip-5.0.2.ebuild
+++ b/dev-util/hip/hip-5.0.2-r1.ebuild
@@ -79,7 +79,7 @@ src_prepare() {
hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${HIP_S}")
 
-   cp "$(prefixify_ro "${FILESDIR}"/hipvars.pm)" bin/ || die "failed to 
replace hipvars.pm"
+   cp "$(prefixify_ro "${FILESDIR}"/hipvars-5.0.2.pm)" bin/hipvars.pm || 
die "failed to replace hipvars.pm"
sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e 
"s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \
-e "s,@HIP_VERSION_PATCH@,$(ver_cut 3)," -i bin/hipvars.pm || 
die
 }



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-03-26 Thread Benda XU
commit: 758f82215688e61b35041752a95f9d234fdd3478
Author: Benda Xu  gentoo  org>
AuthorDate: Sun Mar 27 03:26:18 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Sun Mar 27 03:26:53 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=758f8221

dev-util/hip: move opengl header dependence to DEPEND.

Bug: https://github.com/gentoo/gentoo/pull/24755
Credit: Sam James
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.0.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-util/hip/hip-5.0.2.ebuild b/dev-util/hip/hip-5.0.2.ebuild
index b83416aa68d3..e3438bc87ea4 100644
--- a/dev-util/hip/hip-5.0.2.ebuild
+++ b/dev-util/hip/hip-5.0.2.ebuild
@@ -24,11 +24,11 @@ DEPEND="
dev-util/rocminfo:${SLOT}
=sys-devel/llvm-roc-${PV}*[runtime]
dev-libs/rocm-comgr:${SLOT}
+   virtual/opengl
 "
 RDEPEND="${DEPEND}
dev-perl/URI-Encode
dev-libs/roct-thunk-interface:${SLOT}"
-BDEPEND="virtual/opengl"
 
 PATCHES=(
"${FILESDIR}/${PN}-5.0.1-DisableTest.patch"



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-03-26 Thread Benda XU
commit: 2a154b03bb0af6f83df39f3d4fe5724a7ebcf59b
Author: YiyangWu  gmail  com>
AuthorDate: Sat Mar 26 08:11:34 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Sun Mar 27 03:16:41 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a154b03

dev-util/hip: add missing BDEPEND providing GL/glx.h

Previously this is the (build-time) dependency of rocclr, which has
DEPEND="virtual/opengl" to make sure GL/glx.h is present. Now hip-5
bundles rocclr and this BDEPEND shuold be added.

Closes: https://github.com/gentoo/gentoo/pull/24755
Closes: https://bugs.gentoo.org/836136
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.0.2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-util/hip/hip-5.0.2.ebuild b/dev-util/hip/hip-5.0.2.ebuild
index 7cfcb53eb029..b83416aa68d3 100644
--- a/dev-util/hip/hip-5.0.2.ebuild
+++ b/dev-util/hip/hip-5.0.2.ebuild
@@ -28,6 +28,7 @@ DEPEND="
 RDEPEND="${DEPEND}
dev-perl/URI-Encode
dev-libs/roct-thunk-interface:${SLOT}"
+BDEPEND="virtual/opengl"
 
 PATCHES=(
"${FILESDIR}/${PN}-5.0.1-DisableTest.patch"



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-03-25 Thread Benda XU
commit: 478d29974b0b6af3fea603ea2eccc6c44401c237
Author: YiyangWu  gmail  com>
AuthorDate: Fri Mar 25 14:42:35 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Fri Mar 25 15:51:43 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=478d2997

dev-util/hip: fix missing rocm-comgr dependency

Closes: https://github.com/gentoo/gentoo/pull/24746
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-5.0.2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-util/hip/hip-5.0.2.ebuild b/dev-util/hip/hip-5.0.2.ebuild
index a545153b1f54..7cfcb53eb029 100644
--- a/dev-util/hip/hip-5.0.2.ebuild
+++ b/dev-util/hip/hip-5.0.2.ebuild
@@ -23,6 +23,7 @@ IUSE="debug profile"
 DEPEND="
dev-util/rocminfo:${SLOT}
=sys-devel/llvm-roc-${PV}*[runtime]
+   dev-libs/rocm-comgr:${SLOT}
 "
 RDEPEND="${DEPEND}
dev-perl/URI-Encode



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/, dev-util/hip/files/

2022-03-21 Thread Benda XU
commit: 60a357de6bf51b8445d9ef3ea60ba62498fc9054
Author: YiyangWu  gmail  com>
AuthorDate: Mon Feb 21 12:30:44 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Mar 22 04:09:45 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60a357de

dev-util/hip: bump version to 5.0.2

1. According to INSTALL.md, bundle rocclr at build time (like
   rocm-opencl-runtime which drop rocclr dependency).
2. Bundle roctracer headers which resolve circular dep with roctracer
3. Upstream moves to hipamd.git, while the perl scripts is in original
   HIP.git, with .pl suffix. Future hipcc will be a binary.
4. Move prefix from /usr/lib/hip to /usr
5. Avoid build error when USE=profile (Not sure if it's the right way)
6. Delete unused /usr/lib/.hipInfo and /usr/bin/.hipVersion

Closes: https://github.com/gentoo/gentoo/pull/24681
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/Manifest  |   6 ++
 dev-util/hip/files/hip-5.0.1-DisableTest.patch |  32 ++
 .../hip/files/hip-5.0.1-hip_vector_types.patch |  11 ++
 dev-util/hip/hip-5.0.2.ebuild  | 119 +
 4 files changed, 168 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index a8db3b5914b4..a5655c73e1a8 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,5 +1,11 @@
+DIST 5.0.2-update-header.patch.gz 5136 BLAKE2B 
290b9e250e3004a1147ad28606d7d205078affbd809c6a429744767ebabf35bd8df6395dc135984d345ae2f23fa457dcb2524bcbf31c5bf16903d3ee2007bf5d
 SHA512 
41b1025c403e874026a712ec6f6571c873203b08ddadf68848f6d1f63924c21b206677b330f79edad2c4b85e2ba5053b1d33f70c7c09ff9c17bc5905b849da0c
+DIST rocclr-5.0.2.tar.gz 853965 BLAKE2B 
a0d568eb3b230845970d8256a5a2f32018e4b9fb68e0f1aa13a1f3fc953e614025315b90cbe68c107f7150cf91b4b1ea438455429062c7dc06ef77d65dedd2ec
 SHA512 
b30a57c09973d8ef624511f422babaf9722685b9f85643783aebc000671b41fd54f44b308cece0baab187e1ee00b10335c6d22b6bad6fb3468abe6ef0da97d73
 DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 
02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be
 SHA512 
cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6
 DIST rocm-hip-4.1.0.tar.gz 954215 BLAKE2B 
c4b75ab2158e6921be1c34820ab5d1a5e2eb36112834b0143c50023caa27de384e0497f4837947cc7fe05554c6c95201340b1979eb916b31ebb4ffec8c923735
 SHA512 
420ffd7b79e2b4506873cbfc56e96395f8ed9d9375ce28df51626601199d4d8dca6920528e255d39a48ad66ee11f4b653f3b9f659df489d32b21886fb86c64b5
 DIST rocm-hip-4.2.0.tar.gz 918281 BLAKE2B 
45c28289c8ff9e600bfd9daff8af162c897fcfdf41ce65d91d1761d58253d87a6385fd4a15e818619ca39d3413479bf043ab2758fead349a243105e979b64f7c
 SHA512 
e620507321c949ded2eab6159099eef0eab267eb686b6ee0ed86022fffaa51fb8714a7f344b79acf76c876c55919360905d1bb3a7c00a87f40174774d6682ce8
 DIST rocm-hip-4.3.0.tar.gz 967550 BLAKE2B 
263e8bbaa86198d3cb6a29f5597b56a3fe1e9338a8c485935070e6253816ccdba9671f33d8142c260aa3c36f43a71de7f2c1b7a15e1227f97aaf03ed10ce10dd
 SHA512 
bc2d9597200405397387cc8f626f0cc734ee450c462bd7c7a0c655e3dfe2d1e09780328cbfa1c0d1e0db836e561fc450c5d514a6ad1a5828cb913c4c3c535ef1
+DIST rocm-hip-5.0.2.tar.gz 958496 BLAKE2B 
9c8bb1eacd982203e3bd6c24560672c4a9aaf5606608635d7da5a60f613d9be50998f990c1ea3e0e6f5581e0efcba09af736a77bbc9469b2898e0974d063e8d6
 SHA512 
4a99e86a4594c15509a1bbfec0678cd05469eb14dcf35ce650e1eb7c2415f57f59071b1b8add2f8566ccf06242bead77abd275987fe79fe6031dea90d5693805
+DIST rocm-hipamd-5.0.2.tar.gz 319973 BLAKE2B 
ca19938eeca66f0d2614ff933e1d0e75b6b8dbc8d996fd4369e5649897b9948271ac88f2a66f0a40ef586d6185b30d01132decac95d1615c1ee419996050ed07
 SHA512 
056acab082b5073e81f9e5de00ae12c85021d1c297cdcfc45b85f191dcc68603f64fe5d0e75f9523120657947eb125beaa9c3ce26234968c43b200e638f9afa3
 DIST rocm-opencl-runtime-4.3.0.tar.gz 1006792 BLAKE2B 
29fd5843bb0153c7d3fe5250898f0fbdd089db6304122698c9ec9a5436e3a6845916f241f1a1e79a614e369f000297ac12413620edec0660d859ccddaa978d07
 SHA512 
a514d626700350f2c663db468427479eaa9e39dd912266ac2db6830d712351ffbc18737b208fd37f7ab5afdc2c9f6412d8d765973d6c72759bf51f864fc6bf1d
+DIST rocm-opencl-runtime-5.0.2.tar.gz 1004855 BLAKE2B 
e2c2beb987053204fbe8fda562ae65d6c1a58447e9e88bf1081aabeee6c9a10738fd8562114b564b647682438fdbd2c535db1008ac6e1cc4eb9a915998eeb3c7
 SHA512 
fa01d1fafc890181b9e67070353ee7c9100619494b7509cae1a3659f24ef1d00f650024cb24bdb0e6e7eacfdec1115e4683ec6f320228a19f41ae83321780780
+DIST rocm-tracer-5.0.2.tar.gz 474669 BLAKE2B 
b350111590140e1282338e4f134caf6228677c49361ceb9bc7ba0da8709346daa4fd014644c04adff0e903dba6014a84edd2eb3a5c132a8f91b479e4d5b085e5
 SHA512 
3fc1449cc9c9bf83e5233a7a0e83c0e3fa9da225d5ee4427b7d6fa15e3580497e1b9fbcd63892e4a99df01582aecd3ccfd66d2a19af2d8c25949ee705894ea44

diff --git a/dev-util/hip/files/hip-5.0.1-DisableTest.patch 
b/dev-util/hip/files/hip-5.0.1-DisableTest.patch
new file mode 100644

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-03-05 Thread Andrew Ammerlaan
commit: cadd3e208390316e2bfb03345cfb922eb67555a1
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Sat Mar  5 14:03:17 2022 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sat Mar  5 20:51:51 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cadd3e20

dev-util/hip: fix compile, add missing dep

Co-authored-by: Dennis Schridde  gmx.net>
Co-authored-by: Paul Preney  preney.ca>
Closes: https://bugs.gentoo.org/790164
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 dev-util/hip/hip-4.3.0-r2.ebuild | 112 +++
 1 file changed, 112 insertions(+)

diff --git a/dev-util/hip/hip-4.3.0-r2.ebuild b/dev-util/hip/hip-4.3.0-r2.ebuild
new file mode 100644
index ..9547abd69ae1
--- /dev/null
+++ b/dev-util/hip/hip-4.3.0-r2.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit cmake prefix
+
+DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP";
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz 
-> rocm-hip-${PV}.tar.gz
+   
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz
 -> rocm-opencl-runtime-${PV}.tar.gz"
+S="${WORKDIR}/HIP-rocm-${PV}"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="debug profile"
+
+DEPEND="
+   dev-libs/rocclr:${SLOT}
+   dev-util/rocminfo:${SLOT}
+   dev-libs/roct-thunk-interface:${SLOT}
+   =sys-devel/llvm-roc-${PV}*[runtime]
+   profile? ( dev-util/roctracer:${SLOT} )"
+RDEPEND="${DEPEND}
+   dev-perl/URI-Encode"
+
+PATCHES=(
+   "${FILESDIR}/${PN}-4.1.0-DisableTest.patch"
+   "${FILESDIR}/${PN}-3.9.0-add-include-directories.patch"
+   "${FILESDIR}/${PN}-4.2.0-config-cmake-in.patch"
+   "${FILESDIR}/${PN}-4.3.0-hip_vector_types.patch"
+   "${FILESDIR}/${PN}-4.2.0-cancel-hcc-header-removal.patch"
+)
+
+src_prepare() {
+   cmake_src_prepare
+
+   # Use Gentoo slot number, otherwise git hash is attempted in vain.
+   sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${SLOT#*/})" -i CMakeLists.txt || die
+
+   # disable PCH, because it results in a build error in ROCm 4.0.0
+   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
CMakeLists.txt || die
+
+   # remove forcing set USE_PROF_API to 1
+   sed -e '/set(USE_PROF_API "1")/d' -i rocclr/CMakeLists.txt || die
+
+   # "hcc" is deprecated and not installed, new platform is "rocclr";
+   # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
+   # which makes "stdlib.h" not found when using "#include_next" in header 
files;
+   sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+   -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
+   -e "/rpath/s,--rpath=[^ ]*,," \
+   -i bin/hipcc || die
+
+   # correctly find HIP_CLANG_INCLUDE_PATH using cmake
+   sed -e 
"/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":/usr/lib/llvm/roc:" -i 
hip-config.cmake.in || die
+
+   # change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align 
with "dev-libs/rocm-device-libs"
+   sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+   -i "${S}/hip-config.cmake.in" || die
+
+   einfo "prefixing hipcc and its utils..."
+   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
+
+   cp "$(prefixify_ro "${FILESDIR}"/hipvars.pm)" bin/ || die "failed to 
replace hipvars.pm"
+   sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e 
"s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \
+   -e "s,@HIP_VERSION_PATCH@,$(ver_cut 3)," -i bin/hipvars.pm || 
die
+
+   cp -a "${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV}/amdocl/cl_vk_amd.hpp 
amdocl/ || die
+
+   # Bug 790164
+   rm amdocl/CL/cl{,_icd,_gl,_gl_ext,_platform}.h || die
+   sed -i 's/CL_EXT_SUFFIX/CL_API_SUFFIX/' amdocl/cl_icd_amd.h 
amdocl/CL/cl_ext.h rocclr/cl_lqdflash_amd.h || die
+}
+
+src_configure() {
+   use debug && CMAKE_BUILD_TYPE="Debug"
+
+   # TODO: Currently a GENTOO configuration is build,
+   # this is also used in the cmake configuration files
+   # which will be installed to find HIP;
+   # Other ROCm packages expect a "RELEASE" configuration,
+   # see "hipBLAS"
+   local mycmakeargs=(
+   -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/lib/llvm/roc"
+   -DCMAKE_BUILD_TYPE=${buildtype}
+   -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/hip"
+   -DBUILD_HIPIFY_CLANG=OFF
+   -DHIP_PLATFORM=rocclr
+   -DHIP_COMPILER=clang
+   -DROCM_PATH="${EPREFIX}/usr"
+   -DHSA_PATH="${EPREFIX}/usr"
+   -DUSE_PROF_API=$(usex profile 1 0)
+   -DP

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2022-01-24 Thread Benda XU
commit: 786665123263b4d3c05f4e002330842bfab872f4
Author: Benda Xu  gentoo  org>
AuthorDate: Mon Jan 24 14:45:57 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon Jan 24 14:46:08 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78666512

dev-util/hip: depend on dev-perl/URI-Encode.

It is used by hip utils such as roc-obj-ls.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-4.3.0-r1.ebuild | 108 +++
 1 file changed, 108 insertions(+)

diff --git a/dev-util/hip/hip-4.3.0-r1.ebuild b/dev-util/hip/hip-4.3.0-r1.ebuild
new file mode 100644
index ..59e92546583b
--- /dev/null
+++ b/dev-util/hip/hip-4.3.0-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake flag-o-matic prefix
+
+DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP";
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz 
-> rocm-hip-${PV}.tar.gz
+   
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz
 -> rocm-opencl-runtime-${PV}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="debug profile"
+
+DEPEND="dev-libs/rocclr:${SLOT}
+   dev-util/rocminfo:${SLOT}
+   =sys-devel/llvm-roc-${PV}*[runtime]
+   profile? ( dev-util/roctracer:${SLOT} )"
+RDEPEND="${DEPEND}
+   dev-perl/URI-Encode"
+
+PATCHES=(
+   "${FILESDIR}/${PN}-4.1.0-DisableTest.patch"
+   "${FILESDIR}/${PN}-3.9.0-add-include-directories.patch"
+   "${FILESDIR}/${PN}-4.2.0-config-cmake-in.patch"
+   "${FILESDIR}/${PN}-4.3.0-hip_vector_types.patch"
+   "${FILESDIR}/${PN}-4.2.0-cancel-hcc-header-removal.patch"
+)
+
+S="${WORKDIR}/HIP-rocm-${PV}"
+
+src_prepare() {
+   cmake_src_prepare
+   eapply_user
+
+   # Use Gentoo slot number, otherwise git hash is attempted in vain.
+   sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${SLOT#*/})" -i CMakeLists.txt || die
+
+   # disable PCH, because it results in a build error in ROCm 4.0.0
+   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
CMakeLists.txt || die
+
+   # remove forcing set USE_PROF_API to 1
+   sed -e '/set(USE_PROF_API "1")/d' -i rocclr/CMakeLists.txt || die
+
+   # "hcc" is deprecated and not installed, new platform is "rocclr";
+   # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
+   # which makes "stdlib.h" not found when using "#include_next" in header 
files;
+   sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+   -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
+   -e "/rpath/s,--rpath=[^ ]*,," \
+   -i bin/hipcc || die
+
+   # correctly find HIP_CLANG_INCLUDE_PATH using cmake
+   sed -e 
"/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":/usr/lib/llvm/roc:" -i 
hip-config.cmake.in || die
+
+   # change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align 
with "dev-libs/rocm-device-libs"
+   sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+   -i "${S}/hip-config.cmake.in" || die
+
+   einfo "prefixing hipcc and its utils..."
+   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
+
+   cp "$(prefixify_ro "${FILESDIR}"/hipvars.pm)" bin/ || die "failed to 
replace hipvars.pm"
+   sed -e "s,@HIP_BASE_VERSION_MAJOR@,$(ver_cut 1)," -e 
"s,@HIP_BASE_VERSION_MINOR@,$(ver_cut 2)," \
+   -e "s,@HIP_VERSION_PATCH@,$(ver_cut 3)," -i bin/hipvars.pm || 
die
+
+   cp -a "${WORKDIR}"/ROCm-OpenCL-Runtime-rocm-${PV}/amdocl/cl_vk_amd.hpp 
amdocl/ || die
+}
+
+src_configure() {
+   use debug && CMAKE_BUILD_TYPE="Debug"
+
+   # TODO: Currently a GENTOO configuration is build,
+   # this is also used in the cmake configuration files
+   # which will be installed to find HIP;
+   # Other ROCm packages expect a "RELEASE" configuration,
+   # see "hipBLAS"
+   local mycmakeargs=(
+   -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/lib/llvm/roc"
+   -DCMAKE_BUILD_TYPE=${buildtype}
+   -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/hip"
+   -DBUILD_HIPIFY_CLANG=OFF
+   -DHIP_PLATFORM=rocclr
+   -DHIP_COMPILER=clang
+   -DROCM_PATH="${EPREFIX}/usr"
+   -DHSA_PATH="${EPREFIX}/usr"
+   -DUSE_PROF_API=$(usex profile 1 0)
+   -DPROF_API_HEADER_PATH="${EPREFIX}"/usr/include/roctracer/ext
+   -DROCclr_DIR="${EPREFIX}"/usr/include/rocclr
+   )
+
+   cmake_src_configure
+}
+
+src_install() {
+   echo "PATH=${EPREFIX}/usr/lib/hip/bin" >> 99hip || die
+   echo "LDPATH=${EPREFIX}/usr/lib/hip/lib" >> 99hip || die
+   echo 

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2021-08-26 Thread Benda XU
commit: e482882d725cf6203e097f79388e6e76dd15b65b
Author: YiyangWu  gmail  com>
AuthorDate: Thu Aug 19 14:33:19 2021 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Aug 26 12:38:59 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e482882d

dev-util/hip: bump to version 4.3.0

Add a missing header file amdocl/cl_vk_amd.hpp from
rocm-opencl-runtime, to resolve compilation error.

Reference: https://github.com/ROCm-Developer-Tools/HIP/issues/2317
Bug: https://github.com/gentoo/gentoo/pull/22035
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/Manifest  |   2 +
 .../hip/files/hip-4.3.0-hip_vector_types.patch |  11 +++
 dev-util/hip/hip-4.3.0.ebuild  | 107 +
 3 files changed, 120 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 272ac83deb9..a8db3b5914b 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,3 +1,5 @@
 DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 
02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be
 SHA512 
cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6
 DIST rocm-hip-4.1.0.tar.gz 954215 BLAKE2B 
c4b75ab2158e6921be1c34820ab5d1a5e2eb36112834b0143c50023caa27de384e0497f4837947cc7fe05554c6c95201340b1979eb916b31ebb4ffec8c923735
 SHA512 
420ffd7b79e2b4506873cbfc56e96395f8ed9d9375ce28df51626601199d4d8dca6920528e255d39a48ad66ee11f4b653f3b9f659df489d32b21886fb86c64b5
 DIST rocm-hip-4.2.0.tar.gz 918281 BLAKE2B 
45c28289c8ff9e600bfd9daff8af162c897fcfdf41ce65d91d1761d58253d87a6385fd4a15e818619ca39d3413479bf043ab2758fead349a243105e979b64f7c
 SHA512 
e620507321c949ded2eab6159099eef0eab267eb686b6ee0ed86022fffaa51fb8714a7f344b79acf76c876c55919360905d1bb3a7c00a87f40174774d6682ce8
+DIST rocm-hip-4.3.0.tar.gz 967550 BLAKE2B 
263e8bbaa86198d3cb6a29f5597b56a3fe1e9338a8c485935070e6253816ccdba9671f33d8142c260aa3c36f43a71de7f2c1b7a15e1227f97aaf03ed10ce10dd
 SHA512 
bc2d9597200405397387cc8f626f0cc734ee450c462bd7c7a0c655e3dfe2d1e09780328cbfa1c0d1e0db836e561fc450c5d514a6ad1a5828cb913c4c3c535ef1
+DIST rocm-opencl-runtime-4.3.0.tar.gz 1006792 BLAKE2B 
29fd5843bb0153c7d3fe5250898f0fbdd089db6304122698c9ec9a5436e3a6845916f241f1a1e79a614e369f000297ac12413620edec0660d859ccddaa978d07
 SHA512 
a514d626700350f2c663db468427479eaa9e39dd912266ac2db6830d712351ffbc18737b208fd37f7ab5afdc2c9f6412d8d765973d6c72759bf51f864fc6bf1d

diff --git a/dev-util/hip/files/hip-4.3.0-hip_vector_types.patch 
b/dev-util/hip/files/hip-4.3.0-hip_vector_types.patch
new file mode 100644
index 000..faad9629740
--- /dev/null
+++ b/dev-util/hip/files/hip-4.3.0-hip_vector_types.patch
@@ -0,0 +1,11 @@
+mitigate compilation error
+--- a/include/hip/amd_detail/hip_vector_types.h
 b/include/hip/amd_detail/hip_vector_types.h
+@@ -45,6 +45,7 @@ THE SOFTWARE.
+
+ #if defined(__cplusplus)
+ #if !defined(__HIPCC_RTC__)
++#include 
+ #include 
+ #include 
+ #include 

diff --git a/dev-util/hip/hip-4.3.0.ebuild b/dev-util/hip/hip-4.3.0.ebuild
new file mode 100644
index 000..7e522e9fb0e
--- /dev/null
+++ b/dev-util/hip/hip-4.3.0.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake flag-o-matic prefix
+
+DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP";
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz 
-> rocm-hip-${PV}.tar.gz
+   
https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-${PV}.tar.gz
 -> rocm-opencl-runtime-${PV}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="debug profile"
+
+DEPEND="dev-libs/rocclr:${SLOT}
+   dev-util/rocminfo:${SLOT}
+   =sys-devel/llvm-roc-${PV}*[runtime]
+   profile? ( dev-util/roctracer:${SLOT} )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+   "${FILESDIR}/${PN}-4.1.0-DisableTest.patch"
+   "${FILESDIR}/${PN}-3.9.0-add-include-directories.patch"
+   "${FILESDIR}/${PN}-4.2.0-config-cmake-in.patch"
+   "${FILESDIR}/${PN}-4.3.0-hip_vector_types.patch"
+   "${FILESDIR}/${PN}-4.2.0-cancel-hcc-header-removal.patch"
+)
+
+S="${WORKDIR}/HIP-rocm-${PV}"
+
+src_prepare() {
+   cmake_src_prepare
+   eapply_user
+
+   # Use Gentoo slot number, otherwise git hash is attempted in vain.
+   sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${SLOT#*/})" -i CMakeLists.txt || die
+
+   # disable PCH, because it results in a build error in ROCm 4.0.0
+   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
CMakeLists.txt || die
+
+   # remove forcing set USE_PROF_API to 1
+   sed -e '/set(U

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2021-08-12 Thread Benda XU
commit: 7f9224da75c864396af5693c2e5b3dbbd0f529c1
Author: YiyangWu  gmail  com>
AuthorDate: Thu Jul 15 15:19:15 2021 +
Commit: Benda XU  gentoo  org>
CommitDate: Fri Aug 13 05:08:09 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9224da

dev-util/hip: bump version to 4.2.0

Update hip-3.5.1-config-cmake-in.patch to 4.2.0
lpl_ca removed, so hip-3.9.0-lpl_ca-add-include.patch not used
fill version into hipvars.pm at src_prepare
fix sandbox violation issue
remove linker flag -rpath in hipcc
correct profiling api header location and profile use flag settings

Closes: https://bugs.gentoo.org/799257
Closes: https://github.com/gentoo/gentoo/pull/21655

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/Manifest  |  1 +
 .../hip-4.2.0-cancel-hcc-header-removal.patch  | 18 
 dev-util/hip/files/hip-4.2.0-config-cmake-in.patch | 15 +
 dev-util/hip/files/hipvars.pm  |  7 +++---
 dev-util/hip/hip-4.1.0-r1.ebuild   |  2 ++
 .../hip/{hip-4.1.0-r1.ebuild => hip-4.2.0.ebuild}  | 25 +-
 6 files changed, 55 insertions(+), 13 deletions(-)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index fb6e7126f26..272ac83deb9 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1,2 +1,3 @@
 DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 
02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be
 SHA512 
cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6
 DIST rocm-hip-4.1.0.tar.gz 954215 BLAKE2B 
c4b75ab2158e6921be1c34820ab5d1a5e2eb36112834b0143c50023caa27de384e0497f4837947cc7fe05554c6c95201340b1979eb916b31ebb4ffec8c923735
 SHA512 
420ffd7b79e2b4506873cbfc56e96395f8ed9d9375ce28df51626601199d4d8dca6920528e255d39a48ad66ee11f4b653f3b9f659df489d32b21886fb86c64b5
+DIST rocm-hip-4.2.0.tar.gz 918281 BLAKE2B 
45c28289c8ff9e600bfd9daff8af162c897fcfdf41ce65d91d1761d58253d87a6385fd4a15e818619ca39d3413479bf043ab2758fead349a243105e979b64f7c
 SHA512 
e620507321c949ded2eab6159099eef0eab267eb686b6ee0ed86022fffaa51fb8714a7f344b79acf76c876c55919360905d1bb3a7c00a87f40174774d6682ce8

diff --git a/dev-util/hip/files/hip-4.2.0-cancel-hcc-header-removal.patch 
b/dev-util/hip/files/hip-4.2.0-cancel-hcc-header-removal.patch
new file mode 100644
index 000..08e0f3a3d4e
--- /dev/null
+++ b/dev-util/hip/files/hip-4.2.0-cancel-hcc-header-removal.patch
@@ -0,0 +1,18 @@
+hcc now deprecated by ROCm upstream. They use cmake to delete hcc headers for 
upgrating hip on other distros, 
+but Gentoo don't need this and the following code causes sandbox violation 
(#799257).
+
+github.com/ROCm-Developer-Tools/HIP/commit/c2adc70d4df3d30ef0db84d47be14b99b01aa340
 introduce these lines.
+
+--- orig/CMakeLists.txt
 HIP-rocm-4.2.0/CMakeLists.txt
+@@ -333,10 +333,6 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
+ endif()
+ install(DIRECTORY bin DESTINATION . USE_SOURCE_PERMISSIONS)
+ 
+-# The following two lines will be removed after upstream updation
+-install(CODE "MESSAGE(\"Removing ${CMAKE_INSTALL_PREFIX}/include\")")
+-install(CODE "file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/include)")
+-
+ install(DIRECTORY include DESTINATION .)
+ install(DIRECTORY cmake DESTINATION .)
+ endif()

diff --git a/dev-util/hip/files/hip-4.2.0-config-cmake-in.patch 
b/dev-util/hip/files/hip-4.2.0-config-cmake-in.patch
new file mode 100644
index 000..12644828af7
--- /dev/null
+++ b/dev-util/hip/files/hip-4.2.0-config-cmake-in.patch
@@ -0,0 +1,15 @@
+since _IMPORT_PREFIX=/opt/gentoo/usr/lib/hip, INTERFACE_INCLUDE_DIRECTORIES 
should change
+
+--- orig/hip-config.cmake.in
 HIP-rocm-4.2.0/hip-config.cmake.in
+@@ -185,8 +185,8 @@ if(HIP_RUNTIME MATCHES "rocclr")
+ 
+   if(NOT WIN32)
+ set_target_properties(hip::device PROPERTIES
+-  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
+-  INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
++  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
++  INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
+ )
+   endif()
+ endif()

diff --git a/dev-util/hip/files/hipvars.pm b/dev-util/hip/files/hipvars.pm
index 3f5c88409e0..4c614080a11 100644
--- a/dev-util/hip/files/hipvars.pm
+++ b/dev-util/hip/files/hipvars.pm
@@ -1,9 +1,10 @@
 #!/usr/bin/perl -w
 package hipvars;
 
-$HIP_BASE_VERSION_MAJOR = "4";
-$HIP_BASE_VERSION_MINOR = "1";
+$HIP_BASE_VERSION_MAJOR = "@HIP_BASE_VERSION_MAJOR@";
+$HIP_BASE_VERSION_MINOR = "@HIP_BASE_VERSION_MINOR@";
 
+$isWindows = 0;
 $HIP_PATH='/usr/lib/hip';
 $ROCM_PATH='/usr';
 $CUDA_PATH='/opt/cuda';
@@ -15,5 +16,5 @@ $HIP_COMPILER = "clang";
 $HIP_RUNTIME = "rocclr";
 $HIP_VERSION_MAJOR = $HIP_BASE_VERSION_MAJO

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2021-08-03 Thread Benda XU
commit: 5a4c851cefaf1190ce9e0ac2d40866a74e06d070
Author: Benda Xu  gentoo  org>
AuthorDate: Tue Aug  3 07:03:52 2021 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Aug  3 07:04:04 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a4c851c

dev-util/hip: use SLOT in DEPEND and soname.

The ROCm ecosystem is made of tightly bundled packages with the same
versions.  Use sub-SLOT to express this requirement for better
handling of rebuilds.

Prefixify hipvars.pm.

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-4.1.0-r1.ebuild | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev-util/hip/hip-4.1.0-r1.ebuild b/dev-util/hip/hip-4.1.0-r1.ebuild
index ff12517ad83..827305877f9 100644
--- a/dev-util/hip/hip-4.1.0-r1.ebuild
+++ b/dev-util/hip/hip-4.1.0-r1.ebuild
@@ -17,8 +17,8 @@ IUSE="debug profile"
 # Don't strip to prevent some tests from failing.
 RESTRICT="strip"
 
-DEPEND=">=dev-libs/rocclr-$(ver_cut 1-2)
-   >=dev-util/rocminfo-$(ver_cut 1-2)
+DEPEND="dev-libs/rocclr:${SLOT}
+   dev-util/rocminfo:${SLOT}
=sys-devel/llvm-roc-${PV}*[runtime]"
 RDEPEND="${DEPEND}"
 
@@ -35,8 +35,8 @@ src_prepare() {
cmake_src_prepare
eapply_user
 
-   # Use Gentoo version number, otherwise git hash is attempted in vain.
-   sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${PVR})" -i CMakeLists.txt || die
+   # Use Gentoo slot number, otherwise git hash is attempted in vain.
+   sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${SLOT#*/})" -i CMakeLists.txt || die
 
# disable PCH, because it results in a build error in ROCm 4.0.0
sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
CMakeLists.txt || die
@@ -58,7 +58,7 @@ src_prepare() {
einfo "prefixing hipcc and its utils..."
hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
 
-   cp "${FILESDIR}"/hipvars.pm bin/ || die "failed to replace hipvars.pm"
+   cp "$(prefixify_ro "${FILESDIR}"/hipvars.pm)" bin/ || die "failed to 
replace hipvars.pm"
 }
 
 src_configure() {



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2021-08-02 Thread Benda XU
commit: 2ed748a3b6412f99bc249e089e9221e38417a8f8
Author: Benda Xu  gentoo  org>
AuthorDate: Tue Aug  3 06:32:04 2021 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Aug  3 06:32:23 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ed748a3

dev-util/hip: remove environment variable dependencies.

ROCm upstream allows for overriding HIP_PATH, ROCM_PATH, CUDA_PATH,
HSA_PATH, HIP_CLANG_PATH, HIP_ROCCLR_HOME, HIP_PLATFORM, HIP_COMPILER,
HIP_RUNTIME for flexibility, at the cost of having to set a handful
environmental variables each time before invoking hipcc.

If any of the environmental variables is not set correctly, hipvars.pm
or hipcc may take wrong guesses and refuses to work.

For Gentoo, all the of variables are predictable and determined at
build time.  It is more straightforward and transparent to hardcode
them in the perl script.

Bug: https://github.com/ROCm-Developer-Tools/HIP/issues/2224
Bug: https://github.com/ROCm-Developer-Tools/HIP/issues/2256
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/files/hipvars.pm|  19 
 dev-util/hip/hip-4.1.0-r1.ebuild | 103 +++
 2 files changed, 122 insertions(+)

diff --git a/dev-util/hip/files/hipvars.pm b/dev-util/hip/files/hipvars.pm
new file mode 100644
index 000..3f5c88409e0
--- /dev/null
+++ b/dev-util/hip/files/hipvars.pm
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+package hipvars;
+
+$HIP_BASE_VERSION_MAJOR = "4";
+$HIP_BASE_VERSION_MINOR = "1";
+
+$HIP_PATH='/usr/lib/hip';
+$ROCM_PATH='/usr';
+$CUDA_PATH='/opt/cuda';
+$HSA_PATH='/usr';
+$HIP_CLANG_PATH='/usr/lib/llvm/roc/bin';
+$HIP_ROCCLR_HOME=$HIP_PATH;
+$HIP_PLATFORM='amd';
+$HIP_COMPILER = "clang";
+$HIP_RUNTIME = "rocclr";
+$HIP_VERSION_MAJOR = $HIP_BASE_VERSION_MAJOR;
+$HIP_VERSION_MINOR = $HIP_BASE_VERSION_MINOR;
+$HIP_VERSION_PATCH = "0";
+$HIP_VERSION="$HIP_VERSION_MAJOR.$HIP_VERSION_MINOR.$HIP_VERSION_PATCH";

diff --git a/dev-util/hip/hip-4.1.0-r1.ebuild b/dev-util/hip/hip-4.1.0-r1.ebuild
new file mode 100644
index 000..ff12517ad83
--- /dev/null
+++ b/dev-util/hip/hip-4.1.0-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake flag-o-matic prefix
+
+DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP";
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz 
-> rocm-hip-${PV}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="debug profile"
+
+# Don't strip to prevent some tests from failing.
+RESTRICT="strip"
+
+DEPEND=">=dev-libs/rocclr-$(ver_cut 1-2)
+   >=dev-util/rocminfo-$(ver_cut 1-2)
+   =sys-devel/llvm-roc-${PV}*[runtime]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+   "${FILESDIR}/${PN}-4.1.0-DisableTest.patch"
+   "${FILESDIR}/${PN}-3.9.0-add-include-directories.patch"
+   "${FILESDIR}/${PN}-3.5.1-config-cmake-in.patch"
+   "${FILESDIR}/${PN}-3.9.0-lpl_ca-add-include.patch"
+)
+
+S="${WORKDIR}/HIP-rocm-${PV}"
+
+src_prepare() {
+   cmake_src_prepare
+   eapply_user
+
+   # Use Gentoo version number, otherwise git hash is attempted in vain.
+   sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${PVR})" -i CMakeLists.txt || die
+
+   # disable PCH, because it results in a build error in ROCm 4.0.0
+   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
CMakeLists.txt || die
+
+   # "hcc" is deprecated and not installed, new platform is "rocclr";
+   # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
+   # which makes "stdlib.h" not found when using "#include_next" in header 
files;
+   sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+   -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
+   -i bin/hipcc || die
+
+   # correctly find HIP_CLANG_INCLUDE_PATH using cmake
+   sed -e 
"/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":/usr/lib/llvm/roc:" -i 
hip-config.cmake.in || die
+
+   # change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align 
with "dev-libs/rocm-device-libs"
+   sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+   -i "${S}/hip-config.cmake.in" || die
+
+   einfo "prefixing hipcc and its utils..."
+   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
+
+   cp "${FILESDIR}"/hipvars.pm bin/ || die "failed to replace hipvars.pm"
+}
+
+src_configure() {
+   strip-flags
+   if ! use debug; then
+   append-cflags "-DNDEBUG"
+   append-cxxflags "-DNDEBUG"
+   buildtype="Release"
+   else
+   buildtype="Debug"
+   fi
+
+   # TODO: Currently a GENTOO configuration is build,
+   # this is also used in the cmake configuration fil

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2021-08-02 Thread Benda XU
commit: 2777139222b8f33993bcdb2947f3de5e9cc13901
Author: YiyangWu  gmail  com>
AuthorDate: Sun Jul 25 06:01:49 2021 +
Commit: Benda XU  gentoo  org>
CommitDate: Tue Aug  3 01:35:00 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27771392

dev-util/hip: cleanup unnecessary patches and sed commands.

hip uses HIP_PLATFORM=amd and HIP_RUNTIME=amd, therefore some sed
commands are not necessary anymore.

Every patch is checked. Removing hip-3.5.1-hip_vector_types.patch
seems to have no impact on compile and running hipcc.

Closes: https://github.com/gentoo/gentoo/pull/21863
Bug: https://github.com/justxi/rocm/issues/192
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-4.1.0.ebuild | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/dev-util/hip/hip-4.1.0.ebuild b/dev-util/hip/hip-4.1.0.ebuild
index e6e6a374a78..c5b5027b241 100644
--- a/dev-util/hip/hip-4.1.0.ebuild
+++ b/dev-util/hip/hip-4.1.0.ebuild
@@ -26,7 +26,6 @@ PATCHES=(
"${FILESDIR}/${PN}-4.1.0-DisableTest.patch"
"${FILESDIR}/${PN}-3.9.0-add-include-directories.patch"
"${FILESDIR}/${PN}-3.5.1-config-cmake-in.patch"
-   "${FILESDIR}/${PN}-3.5.1-hip_vector_types.patch"
"${FILESDIR}/${PN}-3.9.0-lpl_ca-add-include.patch"
 )
 
@@ -40,19 +39,15 @@ src_prepare() {
sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${PVR})" -i CMakeLists.txt || die
 
# disable PCH, because it results in a build error in ROCm 4.0.0
-   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
"${S}/CMakeLists.txt" || die
+   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
CMakeLists.txt || die
 
# "hcc" is deprecated and not installed, new platform is "rocclr";
# Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
# which makes "stdlib.h" not found when using "#include_next" in header 
files;
-   sed -e "/HIP_PLATFORM.*HIP_COMPILER.*clang/s:hcc:rocclr:" \
-   -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+   sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
-e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
-i bin/hipcc || die
 
-   # replace hcc remnants with modern rocclr.
-   sed -e "/HIP_PLATFORM.*STREQUAL/s:hcc:rocclr:" -i 
cmake/FindHIP/run_hipcc.cmake || die
-
# correctly find HIP_CLANG_INCLUDE_PATH using cmake
sed -e 
"/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":/usr/lib/llvm/roc:" -i 
hip-config.cmake.in || die
 



[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2021-04-11 Thread Craig Andrews
commit: ccb5830fe290c0fd8ae43546d188068cf4f60e91
Author: Wilfried Holzke  holzke  net>
AuthorDate: Fri Apr  2 09:47:49 2021 +
Commit: Craig Andrews  gentoo  org>
CommitDate: Sun Apr 11 15:17:09 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccb5830f

dev-util/hip: Version bump to 4.1.0

Signed-off-by: Wilfried Holzke  holzke.net>
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Closes: https://github.com/gentoo/gentoo/pull/20228
Signed-off-by: Craig Andrews  gentoo.org>

 dev-util/hip/Manifest  |   1 +
 dev-util/hip/files/hip-4.1.0-DisableTest.patch |  37 
 dev-util/hip/hip-4.1.0.ebuild  | 114 +
 3 files changed, 152 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
index 5081a96f35a..fb6e7126f26 100644
--- a/dev-util/hip/Manifest
+++ b/dev-util/hip/Manifest
@@ -1 +1,2 @@
 DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 
02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be
 SHA512 
cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6
+DIST rocm-hip-4.1.0.tar.gz 954215 BLAKE2B 
c4b75ab2158e6921be1c34820ab5d1a5e2eb36112834b0143c50023caa27de384e0497f4837947cc7fe05554c6c95201340b1979eb916b31ebb4ffec8c923735
 SHA512 
420ffd7b79e2b4506873cbfc56e96395f8ed9d9375ce28df51626601199d4d8dca6920528e255d39a48ad66ee11f4b653f3b9f659df489d32b21886fb86c64b5

diff --git a/dev-util/hip/files/hip-4.1.0-DisableTest.patch 
b/dev-util/hip/files/hip-4.1.0-DisableTest.patch
new file mode 100644
index 000..49e7171b2f0
--- /dev/null
+++ b/dev-util/hip/files/hip-4.1.0-DisableTest.patch
@@ -0,0 +1,37 @@
+--- a/CMakeLists.txt   2021-03-28 18:02:34.755857717 +0200
 b/CMakeLists.txt   2021-03-28 18:04:54.217854203 +0200
+@@ -474,20 +474,20 @@
+ #
+ set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
+ set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+-if(HIP_PLATFORM STREQUAL "nvidia")
+-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory 
"${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT 
ERROR_QUIET)
+-endif()
+-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory 
"${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT 
ERROR_QUIET)
+-if(${RUN_HIT} EQUAL 0)
+-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory 
"${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
+-endif()
+-if(${RUN_HIT} EQUAL 0)
+-set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
+-include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
+-include(${HIP_SRC_PATH}/tests/Tests.cmake)
+-else()
+-message(STATUS "Testing targets will not be available. To enable them 
please ensure that the HIP installation directory is writeable. Use 
-DCMAKE_INSTALL_PREFIX to specify a suitable location")
+-endif()
++#if(HIP_PLATFORM STREQUAL "nvidia")
++#execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory 
"${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT 
ERROR_QUIET)
++#endif()
++#execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory 
"${HIP_SRC_PATH}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT 
ERROR_QUIET)
++#if(${RUN_HIT} EQUAL 0)
++#execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory 
"${HIP_SRC_PATH}/bin" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
++#endif()
++#if(${RUN_HIT} EQUAL 0)
++#set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
++#include(${HIP_SRC_PATH}/tests/hit/HIT.cmake)
++#include(${HIP_SRC_PATH}/tests/Tests.cmake)
++#else()
++#message(STATUS "Testing targets will not be available. To enable them 
please ensure that the HIP installation directory is writeable. Use 
-DCMAKE_INSTALL_PREFIX to specify a suitable location")
++#endif()
+ 
+ #
+ # Code analysis

diff --git a/dev-util/hip/hip-4.1.0.ebuild b/dev-util/hip/hip-4.1.0.ebuild
new file mode 100644
index 000..e6e6a374a78
--- /dev/null
+++ b/dev-util/hip/hip-4.1.0.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake flag-o-matic prefix
+
+DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP";
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz 
-> rocm-hip-${PV}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="debug profile"
+
+# Don't strip to prevent some tests from failing.
+RESTRICT="strip"
+
+DEPEND=">=dev-libs/rocclr-$(ver_cut 1-2)
+   >=dev-util/rocminfo-$(ver_cut 1-2)
+   =sys-devel/llvm-roc-${PV}*[runtime]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+   "${FILESDIR}/${PN}-4.1.0-DisableTest.patc

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/

2021-01-19 Thread Benda XU
commit: 8837056f58be66a4bc0cad115f66264fb8e066d7
Author: Benda Xu  gentoo  org>
AuthorDate: Tue Jan 19 12:53:28 2021 +
Commit: Benda XU  gentoo  org>
CommitDate: Wed Jan 20 04:51:52 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8837056f

dev-util/hip: replace hcc with rocclr.

hcc is deprecated and rocclr is the mainstream.  Replace remaining hcc
in run_hipcc.cmake and hipcc.  This also enables --genco support, which
will be essential in building e.g. Tensile.

Fix trailing - in HIP_LIB_VERSION_STRING by imposing Gentoo version.

Let cmake use the correct HIP_CLANG_INCLUDE_PATH for llvm-roc.

Suggested-by: Yiyang Wu  gmail.com>
Closes: https://bugs.gentoo.org/733794
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/hip-4.0.0-r1.ebuild | 116 +++
 1 file changed, 116 insertions(+)

diff --git a/dev-util/hip/hip-4.0.0-r1.ebuild b/dev-util/hip/hip-4.0.0-r1.ebuild
new file mode 100644
index 000..9252cfffc77
--- /dev/null
+++ b/dev-util/hip/hip-4.0.0-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake flag-o-matic prefix
+
+DESCRIPTION="C++ Heterogeneous-Compute Interface for Portability"
+HOMEPAGE="https://github.com/ROCm-Developer-Tools/HIP";
+SRC_URI="https://github.com/ROCm-Developer-Tools/HIP/archive/rocm-${PV}.tar.gz 
-> rocm-hip-${PV}.tar.gz"
+
+KEYWORDS="~amd64"
+LICENSE="MIT"
+SLOT="0/$(ver_cut 1-2)"
+
+IUSE="debug profile"
+
+# Don't strip to prevent some tests from failing.
+RESTRICT="strip"
+
+DEPEND=">=dev-libs/rocclr-$(ver_cut 1-2)
+   >=dev-util/rocminfo-$(ver_cut 1-2)
+   =sys-devel/llvm-roc-${PV}*[runtime]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+   "${FILESDIR}/${PN}-3.9.0-DisableTest.patch"
+   "${FILESDIR}/${PN}-3.9.0-add-include-directories.patch"
+   "${FILESDIR}/${PN}-3.5.1-config-cmake-in.patch"
+   "${FILESDIR}/${PN}-3.5.1-hip_vector_types.patch"
+   "${FILESDIR}/${PN}-3.5.1-detect_offload-arch_for_clang-roc.patch"
+   "${FILESDIR}/${PN}-3.9.0-lpl_ca-add-include.patch"
+)
+
+S="${WORKDIR}/HIP-rocm-${PV}"
+
+src_prepare() {
+   cmake_src_prepare
+   eapply_user
+
+   # Use Gentoo version number, otherwise git hash is attempted in vain.
+   sed -e "/set (HIP_LIB_VERSION_STRING/cset (HIP_LIB_VERSION_STRING 
${PVR})" -i CMakeLists.txt || die
+
+   # disable PCH, because it results in a build error in ROCm 4.0.0
+   sed -e "s:option(__HIP_ENABLE_PCH:#option(__HIP_ENABLE_PCH:" -i 
"${S}/CMakeLists.txt" || die
+
+   # "hcc" is deprecated and not installed, new platform is "rocclr";
+   # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
+   # which makes "stdlib.h" not found when using "#include_next" in header 
files;
+   sed -e "/HIP_PLATFORM.*HIP_COMPILER.*clang/s:hcc:rocclr:" \
+   -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+   -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
+   -i bin/hipcc || die
+
+   # replace hcc remnants with modern rocclr.
+   sed -e "/HIP_PLATFORM.*STREQUAL/s:hcc:rocclr:" -i 
cmake/FindHIP/run_hipcc.cmake || die
+
+   # correctly find HIP_CLANG_INCLUDE_PATH using cmake
+   sed -e 
"/set(HIP_CLANG_ROOT/s:\"\${ROCM_PATH}/llvm\":/usr/lib/llvm/roc:" -i 
hip-config.cmake.in || die
+
+   # change --hip-device-lib-path to "/usr/lib/amdgcn/bitcode", must align 
with "dev-libs/rocm-device-libs"
+   sed -e "s:\${AMD_DEVICE_LIBS_PREFIX}/lib:/usr/lib/amdgcn/bitcode:" \
+   -i "${S}/hip-config.cmake.in" || die
+
+   einfo "prefixing hipcc and its utils..."
+   hprefixify $(grep -rl --exclude-dir=build/ "/usr" "${S}")
+}
+
+src_configure() {
+   strip-flags
+   if ! use debug; then
+   append-cflags "-DNDEBUG"
+   append-cxxflags "-DNDEBUG"
+   buildtype="Release"
+   else
+   buildtype="Debug"
+   fi
+
+   # TODO: Currently a GENTOO configuration is build,
+   # this is also used in the cmake configuration files
+   # which will be installed to find HIP;
+   # Other ROCm packages expect a "RELEASE" configuration,
+   # see "hipBLAS"
+   local mycmakeargs=(
+   -DCMAKE_PREFIX_PATH="${EPREFIX}/usr/lib/llvm/roc"
+   -DCMAKE_BUILD_TYPE=${buildtype}
+   -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/hip"
+   -DBUILD_HIPIFY_CLANG=OFF
+   -DHIP_PLATFORM=rocclr
+   -DHIP_RUNTIME=ROCclr
+   -DHIP_COMPILER=clang
+   -DROCM_PATH="${EPREFIX}/usr"
+   -DHSA_PATH="${EPREFIX}/usr"
+   -DUSE_PROF_API=$(usex profile 1 0)
+   -DROCclr_DIR="${EPREFIX}"/usr/include/rocclr
+   )
+
+   cmake_src_configure
+}
+
+src_install() {
+   echo "HSA_PATH=${EPREFIX}/usr

[gentoo-commits] repo/gentoo:master commit in: dev-util/hip/files/, dev-util/hip/

2020-12-26 Thread Benda XU
commit: 36781efd38eb25f8e0d4643af2c44029f61f702c
Author: Benda Xu  gentoo  org>
AuthorDate: Wed Dec 23 17:06:47 2020 +
Commit: Benda XU  gentoo  org>
CommitDate: Sun Dec 27 01:55:26 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36781efd

dev-util/hip: C++ Heterogeneous-Compute Interface for Portability.

This ebuild is adopted from that of https://github.com/justxi/rocm.

1. change hip location from /usr/lib/hip/ to /usr/lib/hip. We do
   not have plans to support multiple hip versions at once.

2. turn the hipify function off as it does not work.  We will
   re-enable it as a USE flag when possible.

3. properly prefixify the source code making use of hprefixify().

4. migrate from cmake-utils to cmake eclass.

Closes: https://github.com/gentoo/gentoo/pull/18787
Suggested-by: Wilfried Holzke  holzke.net>
Suggested-by: Yiyang Wu  gmail.com>
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu  gentoo.org>

 dev-util/hip/Manifest  |   1 +
 dev-util/hip/files/hip-3.5.1-config-cmake-in.patch |  28 ++
 ...p-3.5.1-detect_offload-arch_for_clang-roc.patch |  21 
 .../hip/files/hip-3.5.1-hip_vector_types.patch |  10 ++
 dev-util/hip/files/hip-3.9.0-DisableTest.patch |  87 +
 .../files/hip-3.9.0-add-include-directories.patch  |  13 +++
 .../hip/files/hip-3.9.0-lpl_ca-add-include.patch   |  10 ++
 dev-util/hip/hip-4.0.0.ebuild  | 107 +
 dev-util/hip/metadata.xml  |  19 
 9 files changed, 296 insertions(+)

diff --git a/dev-util/hip/Manifest b/dev-util/hip/Manifest
new file mode 100644
index 000..5081a96f35a
--- /dev/null
+++ b/dev-util/hip/Manifest
@@ -0,0 +1 @@
+DIST rocm-hip-4.0.0.tar.gz 1012154 BLAKE2B 
02343239a5b27c42dafd241f2c9b6f5195c50f78bfd717ae72bcb16d384bd6cf97ff6f2b86bfcf323aaaf022d6897f46d0987826c80d6f6279be4cb4792e15be
 SHA512 
cf840dbe28a9a15e3be14351bfa22d3c81e1654813a7aee55f53e71b2ee183f8dd0de14a79791617fabb5b357cadbf2ce2f476f78884b2843d30f206d65088f6

diff --git a/dev-util/hip/files/hip-3.5.1-config-cmake-in.patch 
b/dev-util/hip/files/hip-3.5.1-config-cmake-in.patch
new file mode 100644
index 000..f3b5ac9c19e
--- /dev/null
+++ b/dev-util/hip/files/hip-3.5.1-config-cmake-in.patch
@@ -0,0 +1,28 @@
+--- a/hip-config.cmake.in  2020-06-21 21:17:35.576297760 +0200
 b/hip-config.cmake.in  2020-06-21 21:17:59.861296628 +0200
+@@ -123,8 +123,10 @@
+   )
+   set_target_properties(hip::device PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "__HIP_ROCclr__=1"
+-INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
+-INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
++INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
++INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
++#INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
++#INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
+   )
+ else()
+   set_target_properties(hip::hip_hcc_static PROPERTIES
+@@ -156,9 +158,9 @@
+ INTERFACE_LINK_LIBRARIES 
--hip-device-lib-path=${AMD_DEVICE_LIBS_PREFIX}/lib --hip-link
+   )
+ 
+-  set_property(TARGET hip::device APPEND PROPERTY
+-INTERFACE_INCLUDE_DIRECTORIES "${HIP_CLANG_INCLUDE_PATH}/.."
+-  )
++#  set_property(TARGET hip::device APPEND PROPERTY
++#INTERFACE_INCLUDE_DIRECTORIES "${HIP_CLANG_INCLUDE_PATH}/.."
++#  )
+ 
+   set_property(TARGET hip::device APPEND PROPERTY
+ INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${HIP_CLANG_INCLUDE_PATH}/.."

diff --git 
a/dev-util/hip/files/hip-3.5.1-detect_offload-arch_for_clang-roc.patch 
b/dev-util/hip/files/hip-3.5.1-detect_offload-arch_for_clang-roc.patch
new file mode 100644
index 000..7997e292966
--- /dev/null
+++ b/dev-util/hip/files/hip-3.5.1-detect_offload-arch_for_clang-roc.patch
@@ -0,0 +1,21 @@
+diff -uprN HIP-rocm-3.5.1/bin/hipcc patched/bin/hipcc
+--- HIP-rocm-3.5.1/bin/hipcc   2020-07-21 14:29:11.625878447 +0800
 patched/bin/hipcc  2020-07-21 14:34:11.454395203 +0800
+@@ -675,7 +675,7 @@ foreach $arg (@ARGV)
+ $prevArg = $arg;
+ }
+ 
+-if($HIP_PLATFORM eq "hcc"){
++if($HIP_PLATFORM eq "hcc" || $HIP_PLATFORM eq "rocclr"){
+ # No AMDGPU target specified at commandline. So look for HCC_AMDGPU_TARGET
+ if($default_amdgpu_target eq 1) {
+ if (defined $ENV{HCC_AMDGPU_TARGET}) {
+@@ -694,6 +694,8 @@ if($HIP_PLATFORM eq "hcc"){
+ 
+ if($HIP_COMPILER eq "hcc") {
+ $GPU_ARCH_OPT = " --amdgpu-target=";
++} elsif($HIP_COMPILER eq "clang") {
++$GPU_ARCH_OPT = " --offload-arch=";
+ } else {
+ $GPU_ARCH_OPT = " --cuda-gpu-arch=";
+ }

diff --git a/dev-util/hip/files/hip-3.5.1-hip_vector_types.patch 
b/dev-util/hip/files/hip-3.5.1-hip_vector_types.patch
new file mode 100644
index 000..382ed52f692
--- /dev/null
+++ b/dev-util/hip/files/hip-3.5.1-hip_vector_types.patch
@@ -0,0 +1,10 @@
+