Merge ~tchavadar/ubuntu/+source/pkg-rocm-tools:ubuntu/devel into ubuntu/+source/pkg-rocm-tools:ubuntu/devel

Proposed by Talha Can Havadar
Status: Merged
Merge reported by: Talha Can Havadar
Merged at revision: 42fb03b58d21cf6eddb863e79a524b4a25eed271
Proposed branch: ~tchavadar/ubuntu/+source/pkg-rocm-tools:ubuntu/devel
Merge into: ubuntu/+source/pkg-rocm-tools:ubuntu/devel
Diff against target: 104 lines (+40/-14)
3 files modified
bin/rocm-target-arch (+24/-14)
data/build-targets/resolute (+1/-0)
debian/changelog (+15/-0)
Reviewer Review Type Date Requested Status
Frank Heimes (community) Approve
git-ubuntu import Pending
Review via email: mp+497981@code.launchpad.net

Description of the change

Adding gfx11-generic to build targets enables ROCm stack to build for other platforms.

I have AMD Ryzen AI 7 350 cpu which has gfx1152 together with it. This would allow those PCs to utilize ROCm as well.

That said, option introduced to llvm with this commit: https://github.com/llvm/llvm-project/commit/f93aa5157a3317b24cff660ac972814ee9ed4dbc

I am still thinking if we should use gfx1152 and gfx1153 directly instead of gfx11-generic but not exactly sure about the performance benefits of optimized builds but the generic would at least enable the platform so thats why I created this merge proposal.

To post a comment you must log in.
Revision history for this message
Frank Heimes (fheimes) wrote :

So this is supposed to be a new version that should bump the existing version in resolute,
means replacing the currently existing 0.9.4ubuntu1. With that the new version (0.9.5ubuntu1) is fine.

I think that the modifications are reasonable and pretty straight forward - nevertheless I always recommend to do a test build in PPA (not sure if ouy've done that, if so just reference it here and/or in the associated LP bug, since it always increases confidence).
However, I cannot elaborate on your thought "if we should use gfx1152 and gfx1153 directly instead of gfx11-generic", but using gfx11-generic does not seem to be a bad thing.

Only issue I see is the changelog, that requires a reference to the LP bug number.
And if there is no LP bug yet, once is needed just for this (but since it's an update in Ubuntu devel, the entire SRU template is not needed.)

So needs minor fixing ...

review: Needs Fixing
Revision history for this message
Talha Can Havadar (tchavadar) wrote :

Thank you very much for the review Frank I will address the issue you mentioned gonna create a bug and update the changelog accordingly

Revision history for this message
Talha Can Havadar (tchavadar) wrote :

Just created the bug, updated the changelog and upload the package to my proposed enabled ppa (https://launchpad.net/~tchavadar/+archive/ubuntu/lp2138457)

Can you please have another look?

Revision history for this message
Frank Heimes (fheimes) wrote :

Okay, that's great Talha.
And you also linked the LP bug here to the MR at 'Link a bug report', so that the MR shows up in the bug.
So LGTM, approve!

review: Approve
Revision history for this message
Talha Can Havadar (tchavadar) wrote :

Thanks again Frank!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/rocm-target-arch b/bin/rocm-target-arch
2index d0bc28e..fca3914 100755
3--- a/bin/rocm-target-arch
4+++ b/bin/rocm-target-arch
5@@ -7,16 +7,6 @@
6 # License: MIT
7 set -eu
8
9-if ! [ -f "debian/changelog" ]; then
10- echo "debian/changelog not found." >&2
11- exit 1
12-fi
13-
14-DATADIR=/usr/share/pkg-rocm-tools/data/build-targets
15-DIST="$(dpkg-parsechangelog -Sdistribution)"
16-SEP=" "
17-REDUCE=0
18-
19 usage() {
20 cat >&2 <<-EOF | fmt -w "${COLUMNS:-80}"
21
22@@ -56,6 +46,28 @@ EOF
23 }
24
25 #
26+# check to see if usage should be shown early since the main arg parsing loop
27+# requires d/changelog and there are valid cases where one would run --help
28+# when that file doesn't exist
29+#
30+if [ $# -gt 0 ]; then
31+ if [ $1 = '-h' ] || [ $1 = '--help' ]; then
32+ usage
33+ exit 0
34+ fi
35+fi
36+
37+if ! [ -f "debian/changelog" ]; then
38+ echo "debian/changelog not found." >&2
39+ exit 1
40+fi
41+
42+DATADIR=/usr/share/pkg-rocm-tools/data/build-targets
43+DIST="$(dpkg-parsechangelog -Sdistribution)"
44+SEP=" "
45+REDUCE=0
46+
47+#
48 # Get package names from a list of relationships
49 #
50 # Given the value of a Depends or Build-Depends field, return a list of all
51@@ -213,6 +225,8 @@ intersect_gfxarches() {
52
53 #
54 # Parse options
55+# -h/--help is parsed elsewhere due to this block requiring d/changelog to
56+# exist and usage is helpful to run even if d/changelog doesn't exist
57 #
58 while [ $# -gt 0 ]; do
59 case "$1" in
60@@ -246,10 +260,6 @@ case "$1" in
61 REDUCE=1
62 shift 1
63 ;;
64- -h|--help)
65- usage
66- exit 0
67- ;;
68 *)
69 echo "Error: unknown option $1" >&2
70 usage
71diff --git a/data/build-targets/resolute b/data/build-targets/resolute
72index 59dff30..f436f3b 100644
73--- a/data/build-targets/resolute
74+++ b/data/build-targets/resolute
75@@ -3,5 +3,6 @@ gfx942
76 gfx1030
77 gfx1100
78 gfx1151
79+gfx11-generic
80 gfx1200
81 gfx1201
82diff --git a/debian/changelog b/debian/changelog
83index ab4d60e..a9de760 100644
84--- a/debian/changelog
85+++ b/debian/changelog
86@@ -1,3 +1,18 @@
87+pkg-rocm-tools (0.9.5ubuntu1) resolute; urgency=medium
88+
89+ * add gfx11-generic for build targets. (LP: #2138457)
90+ - Compile generic code for GFX11 devices, executable on gfx1100, gfx1101,
91+ gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, and gfx1153.
92+
93+ -- Talha Can Havadar <talha.can.havadar@canonical.com> Fri, 02 Jan 2026 00:47:54 +0100
94+
95+pkg-rocm-tools (0.9.5) unstable; urgency=medium
96+
97+ [ Tim Flink ]
98+ * allow -h/--help to work without d/changelog
99+
100+ -- Christian Kastner <ckk@debian.org> Wed, 10 Dec 2025 23:17:28 +0100
101+
102 pkg-rocm-tools (0.9.4ubuntu1) resolute; urgency=medium
103
104 * created targets file for Ubuntu resolute

Subscribers

People subscribed via source and target branches