Re: RFC: Centralized ROCm target list + utility
Hi all,
this was included in pkg-rocm-tools_0.9.0~exp1.
On 2025-06-23 21:55, Christian Kastner wrote:
> 2. Utility
> ==========
>
> We ship a utility to easily parse/transform the data of the master
> lists. Here is the proposed interface:
>
> $ rocm-arch-support
This was renamed rocm-target-isa.
> $ rocm-arch-support --for-build
> -> Prints semicolon-separated list of targets for the current source
> package: "gfx803;gfx900;gfx906;gfx908;..."
> -> use as eg: AMDGPU_TARGETS="$(rocm-arch-support --for-build)"
The --for-build option gained a potentially useful feature: it also
checks all build dependencies for a X-ROCm-Built-For field. If they have
such field, then the target ISA list will be reduced to the intersection
of the central list and the dependency's list.
So if a package supports fewer targets, then this propagates to all of
its reverse dependencies.
This is still open to discussion/improvement, of course. Yesterday on
the call, it was pointed out that in some cases, such a propagation
would not be wanted.
The utility also gained the feature to locally override the central list
by setting ROCM_TARGET_ISA_FIXED to a space-separated list of target ISAS.
So during package development, one could set
export ROCM_TARGET_ISA_FIXED="gfx1030 gfx1100"
and get local builds which only target gfx1030 and gfx1100, which allows
for faster iteration, without have to modify d/rules.
This should only be done for source-only uploads, of course. Though we
rarely do binary-included builds.
Best,
Christian
Reply to: