Gentoo Archives: gentoo-dev

From: Yiyang Wu <xgreenlandforwyy@×××××.com>
To: gentoo-dev@l.g.o
Cc: Igor Ulyanov <disinbox@×××××.com>
Subject: [gentoo-dev] [PATCH] rocm.eclass: support RDNA3 GPU for >=5.4, remove <5
Date: Sat, 28 Jan 2023 15:20:33
Message-Id: e1e4c53479833d78a8f7a79940a2d3de4949e991.1674919006.git.xgreenlandforwyy@gmail.com
1 ROCm libraries with version <5 are cleaned up, remove version 4 support
2 for rocm.eclass.
3
4 RDNA3 has initial support in ROCm libraries starting from 5.4 releases.
5 Enable gfx110* amdgpu_targets in rocm.eclass and add corresponding
6 description.
7
8 Tried =sci-libs/rocBLAS-5.4.2, can compile successfully with
9 amdgpu_targets_gfx1100 (but not tested on real GPU).
10 rocBLAS-5.4.2.ebuild is in https://github.com/gentoo/gentoo/pull/29319
11
12 The github PR for this patch is at
13 https://github.com/gentoo/gentoo/pull/29320
14
15 Closes: https://bugs.gentoo.org/891499
16 Signed-off-by: Yiyang Wu <xgreenlandforwyy@×××××.com>
17 ---
18 eclass/rocm.eclass | 13 +++++++------
19 profiles/desc/amdgpu_targets.desc | 5 ++++-
20 2 files changed, 11 insertions(+), 7 deletions(-)
21
22 diff --git a/eclass/rocm.eclass b/eclass/rocm.eclass
23 index cf7a18b70ad2..b78dfea1cc31 100644
24 --- a/eclass/rocm.eclass
25 +++ b/eclass/rocm.eclass
26 @@ -1,4 +1,4 @@
27 -# Copyright 2022 Gentoo Authors
28 +# Copyright 2022-2023 Gentoo Authors
29 # Distributed under the terms of the GNU General Public License v2
30
31 # @ECLASS: rocm.eclass
32 @@ -138,17 +138,18 @@ _rocm_set_globals() {
33 # may help. Gentoo have patches to enable gfx1031 as well.
34 local unofficial_amdgpu_targets official_amdgpu_targets
35 case ${ROCM_VERSION} in
36 - 4.*)
37 + 5.[0-3].*)
38 unofficial_amdgpu_targets=(
39 - gfx803 gfx900 gfx1010 gfx1011 gfx1012 gfx1030
40 + gfx803 gfx900 gfx1010 gfx1011 gfx1012 gfx1031
41 )
42 official_amdgpu_targets=(
43 - gfx906 gfx908
44 + gfx906 gfx908 gfx90a gfx1030
45 )
46 ;;
47 - 5.*)
48 + 5.*|9999)
49 unofficial_amdgpu_targets=(
50 - gfx803 gfx900 gfx1010 gfx1011 gfx1012 gfx1031
51 + gfx803 gfx900 gfx1010 gfx1011 gfx1012
52 + gfx1031 gfx1100 gfx1101 gfx1102
53 )
54 official_amdgpu_targets=(
55 gfx906 gfx908 gfx90a gfx1030
56 diff --git a/profiles/desc/amdgpu_targets.desc b/profiles/desc/amdgpu_targets.desc
57 index 66a9a7a85935..9c5739e9d9a4 100644
58 --- a/profiles/desc/amdgpu_targets.desc
59 +++ b/profiles/desc/amdgpu_targets.desc
60 @@ -1,4 +1,4 @@
61 -# Copyright 1999-2022 Gentoo Authors.
62 +# Copyright 1999-2023 Gentoo Authors.
63 # Distributed under the terms of the GNU General Public License v2
64
65 # Reference:
66 @@ -15,3 +15,6 @@ gfx1011 - RDNA GPU, codename navi12, including Radeon Pro 5600M/V520
67 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
68 gfx1030 - RDNA2 GPU, codename navi21/sienna cichlid, including Radeon RX 6950XT/6900XT/6800XT/6800, Radeon Pro W6800
69 gfx1031 - RDNA2 GPU, codename navi22/navy flounder, including Radeon RX 6750XT/6700XT/6800M/6700M
70 +gfx1100 - RDNA3 GPU, codename navi31/plum bonito, including Radeon RX 7900XTX/7900XT
71 +gfx1101 - RDNA3 GPU, codename navi32
72 +gfx1102 - RDNA3 GPU, codename navi33
73 --
74 2.39.0