Re: ci.rocm: invalid device function
On 2025-07-24 09:29, Samuel Thibault wrote:
>> The HIPCCFLAGS approach you suggest could work, but I don't know if
>> setting that would clash with some other potential use, and maintainers
>> still have to add 1 LOC.
>
> This was the same with dpkg-buildtools.mk, and yet they defined it.
buildtools.mk is easily justified as it add substantially more than just
one var, though.
I'm not saying that HIPCXX won't happen, I'm saying we don't have enough
data yet to confidently support how it would eventually look like.
I mean, look at rocm-target-arch: its design fit the ROCm packages well,
but one new external data point and now it's evident that its interface
needs to be adopted.
> At some points, there could also be some more options than just
> offload-arch that we'd want to pass to hipcc, that e.g. disables some
> GPU features that we know we don't want in Debian, or that we want in
> Debian (e.g. hardening).
I agree, but again would wait for data points.
>> PS: If you are using rocm-target-arch in a package build, please also
>> use the --for-build option, which will pick the arch list for the
>> distribution in d/changelog. experimental currently has more arches
>> then unstable.
>
> I was surprised by the option name. It resonates with build/host/target
> triples, but apparently it has nothing to do with that? I'd advise
> renaming it to avoid confusion.
"build" unfortunately resonates with a lot of things. In this context,
it refers to a package build, like dpkg-buildpackage would do.
The idea here was:
# Output list for current distribution; can be called from anywhere
$ rocm-target-arch
# Or pick another distribution
$ rocm-target-arch --dist experimental
# Pick dist from d/changelog; can only be called in an unpacked src
# (actually does more clever stuff)
$ rocm-target-arch --for-build
I wonder though whether --for-build should be dropped entirely, and its
functionality made the default:
# In an unpacked src
$ rocm-target-arch
# Somewhere else
$ rocm-target-arch
ERROR
# Somewhere else, with --dist -> "query database"
$ rocm-target-arch --dist <dist>
[list]
Thoughts, all?
Best,
Christian
Reply to: