Re: RFC: /usr/bin/hipcxx for system default HIP compiler
Hi folks,
I discussed the /usr/bin/hipcxx idea with a number of other
stakeholders, including Kitware [1] and the AMD LLVM developers. It
would be straightforward enough to merge support into CMake, but the
LLVM developers expressed concern over having yet another name for the
clang compiler. One remarked that they didn't want to create the
amdclang++ name, and only did so because it was necessary to distinguish
it from clang++. I do not wish to move forward on this RFC without the
support of the upstream LLVM developers, so I am abandoning this proposal.
I would suggest instead that we should strive to support
/usr/bin/clang++ as the default system HIP compiler on Debian. We will
have to do some testing to see if this will work, but I plan to
investigate if we can move the rocm-device-libs out of rocm-llvm and
build it for every version of clang available on Debian. It's my (yet to
be tested) belief that while comgr is tightly tied to a specific LLVM
version, the rocm-device-libs are merely bounded by a minimum version
requirement.
In this scenario the default system HIP compiler on Sid would be
clang-19. However, the language runtime components (or maybe all the
ROCm libraries) would be explicitly based on clang-21. This should work,
as the runtime must be able to properly load and execute code that was
compiled by an older version of the compiler.
This would mean that the default HIP compiler on Debian would sometimes
be a bit towards the older side, but I think this would be a significant
step forward in making HIP more 'normal'. Users and packages that need
newer features can always install clang-21 and explicitly set it as
their HIPCXX compiler. We could also package the amdclang++ fork. If
CMake preferred amdclang++ to clang++ when searching for the HIP
compiler, then the act of installing the AMD fork would change the
default HIP compiler to the bleeding edge. I think it would be easy to
adapt my CMake MR to do that [1].
tl;dr: I'm abandoning this RFC and instead trying to make
/usr/bin/clang++ the system default HIP compiler.
Sincerely,
Cory Bloor
[1]: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10984
Reply to: