1 |
From: YiyangWu <xgreenlandforwyy@×××××.com> |
2 |
|
3 |
This update fixes problems pointed out last week on rocm.eclass. |
4 |
|
5 |
Changelog from v1: |
6 |
1. Change to the mordern EAPI check style; |
7 |
2. fix typo in amdgpu_targets.desc; |
8 |
3. remove trailing space in comments |
9 |
|
10 |
Yiyang Wu (2): |
11 |
rocm.eclass: new eclass |
12 |
profiles/desc: add amdgpu_targets.desc for USE_EXPAND |
13 |
|
14 |
eclass/rocm.eclass | 275 ++++++++++++++++++++++++++++++ |
15 |
profiles/base/make.defaults | 2 +- |
16 |
profiles/desc/amdgpu_targets.desc | 15 ++ |
17 |
3 files changed, 291 insertions(+), 1 deletion(-) |
18 |
create mode 100644 eclass/rocm.eclass |
19 |
create mode 100644 profiles/desc/amdgpu_targets.desc |
20 |
|
21 |
Interdiff against v1: |
22 |
diff --git a/eclass/rocm.eclass b/eclass/rocm.eclass |
23 |
index e4b448f7b894..8ca2c051ddce 100644 |
24 |
--- a/eclass/rocm.eclass |
25 |
+++ b/eclass/rocm.eclass |
26 |
@@ -19,7 +19,7 @@ |
27 |
# Most ROCm packages use cmake as build system, so this eclass does not export |
28 |
# phase functions which overwrites the phase functions in cmake.eclass. Ebuild |
29 |
# should explicitly call rocm_src_* in src_configure and src_test. |
30 |
-# |
31 |
+# |
32 |
# @EXAMPLE: |
33 |
# # Example for ROCm packages in https://github.com/ROCmSoftwarePlatform |
34 |
# inherit cmake rocm |
35 |
@@ -28,25 +28,25 @@ |
36 |
# IUSE="test" |
37 |
# REQUIRED_USE="${ROCM_REQUIRED_USE}" |
38 |
# RESTRICT="!test? ( test )" |
39 |
-# |
40 |
+# |
41 |
# RDEPEND=" |
42 |
# dev-util/hip |
43 |
# sci-libs/rocBLAS:${SLOT}[${ROCM_USEDEP}] |
44 |
# " |
45 |
-# |
46 |
+# |
47 |
# S=${WORKDIR}/${PN}-rocm-${PV} |
48 |
-# |
49 |
+# |
50 |
# src_configure() { |
51 |
# local mycmakeargs=( |
52 |
# -DBUILD_CLIENTS_TESTS=$(usex test ON OFF) |
53 |
# ) |
54 |
# rocm_src_configure |
55 |
# } |
56 |
-# |
57 |
+# |
58 |
# src_test() { |
59 |
# rocm_src_test |
60 |
# } |
61 |
-# |
62 |
+# |
63 |
# # Example for packages depend on ROCm libraries -- a package depend on |
64 |
# # rocBLAS, and use comma seperated ${HCC_AMDGPU_TARGET} to determine GPU |
65 |
# # architecture to compile. Requires ROCm version >5. |
66 |
@@ -67,14 +67,11 @@ |
67 |
|
68 |
if [[ ! ${_ROCM_ECLASS} ]]; then |
69 |
|
70 |
-case ${EAPI} in |
71 |
- 0|1|2|3|4|5|6) |
72 |
- die "${ECLASS}: unsupported EAPI=${EAPI:-0} (too old)" |
73 |
- ;; |
74 |
+case "${EAPI:-0}" in |
75 |
7|8) |
76 |
;; |
77 |
*) |
78 |
- die "${ECLASS}: unsupported EAPI=${EAPI} (unknown)" |
79 |
+ die "Unsupported EAPI=${EAPI} for ${ECLASS}" |
80 |
;; |
81 |
esac |
82 |
|
83 |
diff --git a/profiles/desc/amdgpu_targets.desc b/profiles/desc/amdgpu_targets.desc |
84 |
index 942ab51356fb..8a3db2b56dab 100644 |
85 |
--- a/profiles/desc/amdgpu_targets.desc |
86 |
+++ b/profiles/desc/amdgpu_targets.desc |
87 |
@@ -8,7 +8,7 @@ gfx900 - Vega GPU, codename vega10, including Radeon Vega Frontier Edition, Rade |
88 |
gfx906 - Vega GPU, codename vega20, including Radeon (Pro) VII, Radeon Instinct MI50/MI60 |
89 |
gfx908 - CDNA Accelerator, codename arcturus, including AMD Instinct MI100 Accelerator |
90 |
gfx90a - CDNA2 Accelerator, codename aldebaran, including AMD Instinct MI200 series Accelerators |
91 |
-gfx1010 - RDNA GPU, codename navi10, including Radeon RX 5700XT/5700/5700M/5700B/5700XTB/5600XT/5600/5600M, Radeon Pro 5700Xt/5700, Radeon Pro W5700X/W5700 |
92 |
+gfx1010 - RDNA GPU, codename navi10, including Radeon RX 5700XT/5700/5700M/5700B/5700XTB/5600XT/5600/5600M, Radeon Pro 5700XT/5700, Radeon Pro W5700X/W5700 |
93 |
gfx1011 - RDNA GPU, codename navi12, including Radeon Pro 5600M/V520 |
94 |
gfx1012 - RDNA GPU, codename navi14, including Radeon RX 5500XT/5500/5500M/5500XTB/5300/5300M, Radeon Pro 5500XT/5500M/5300/5300M, Radeon Pro W5500X/W5500/W5500M/W5300M |
95 |
gfx1030 - RDNA2 GPU, codename navi21/sienna cichlid, including Radeon RX 6950XT/6900XT/6800XT/6800, Radeon Pro W6800 |
96 |
-- |
97 |
2.34.1 |