From: YiyangWu <
xgreenlandforwyy@gmail.com>
This v3 fixes various problems pointed out by Ulrich. The most important change, is that check_rw_permission cannot accept wildcards (it is
previously designed to enable wildcard, but I implemented it with bugs,
so I turned to disabling wildcard and loop around devices).
Updated patch is also accessible in
https://github.com/gentoo/gentoo/pull/26784, with QA check by qa-bot.
Changelog compare to v2:
1. Re-wrap description, <80 characters;
2. correct version detection;
3. decorate code block using @CODE;
4. standardize EAPI check copied from multilib-minimal.eclass;
5. correct quotation mark usage (which fixes ROCM_TESTS iteration);
6. use has function to test variable inside array;
7. fix typo;
8. avoid using internal portage variables;
9. disable wildcard in check_rw_permission; iterate devices to check;
10. referece bug #817440 in commit message.
Yiyang Wu (2):
rocm.eclass: new eclass
profiles/desc: add amdgpu_targets.desc for USE_EXPAND
eclass/rocm.eclass | 278 ++++++++++++++++++++++++++++++
profiles/base/make.defaults | 2 +-
profiles/desc/amdgpu_targets.desc | 15 ++
3 files changed, 294 insertions(+), 1 deletion(-)
create mode 100644 eclass/rocm.eclass
create mode 100644 profiles/desc/amdgpu_targets.desc
Interdiff against v2:
diff --git a/eclass/rocm.eclass b/eclass/rocm.eclass
index 8ca2c051ddce..4b220db0aa81 100644
--- a/eclass/rocm.eclass
+++ b/eclass/rocm.eclass
@@ -9,12 +9,12 @@
# @SUPPORTED_EAPIS: 7 8
# @BLURB: Common functions and variables for ROCm packages written in HIP
# @DESCRIPTION:
-# ROCm packages such as sci-libs/<roc|hip>* can utilize functions in this eclass.
-# Currently, it handles the AMDGPU_TARGETS variable via USE_EXPAND, so user can
-# use USE flag to control which GPU architecture to compile, and ensure coherence
-# among dependencies. It also specify CXX=hipcc, to let hipcc compile. Another -# important function is src_test, which checks whether a valid KFD device exists
-# for testing, and then execute the test program.
+# ROCm packages such as sci-libs/<roc|hip>* can utilize functions in this
+# eclass. Currently, it handles the AMDGPU_TARGETS variable via USE_EXPAND, so
+# user can use USE flag to control which GPU architecture to compile, and
+# ensure coherence among dependencies. It also specify CXX=hipcc, to let hipcc +# compile. Another important function is src_test,