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