[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about how to handle HIP vs hipamd



Hi Jeremy,

Jeremy Newton, on 2022-05-12:
> I was speaking to some of the HIP developers to help understand why HIP and hipamd are split into two source trees.
> It seems like HIP is just the common headers and scripts, while hipamd is the vendor implementation.
> 
> While HIP is not technically implemented on other vendors, I believe the design is to provide vendor agnostic headers and scripts in the HIP source tree.

Maxime could accommodate by setting up multi-upstream tarballs
in the source package under preparation on Salsa[3].  It is an
uncommon layout, and I'm not too sure it doesn't get in the way
of most packager's workflows, but I could adjust the package a
bit so it fits mine.

Interestingly, the package I have on Salsa is actually four
source code repositories glued together: hipamd and hip, but
also rocclr and rocm-opencl-runtime.  I assume it made sense to
include them in the initial packaging steps; I caught the train
in flight.

> So, I'm thinking about the best way to package HIP on Fedora, and in turn help Debian packaging. My thought is to make a hip package based on the HIP source tree with two sub-packages: the "hip-utils" package with the scripts (bin directory [1]) and a "hip-headers" package with the headers (include/hip directory [2]). This was inspired by how openCL works with the opencl-headers package.
> 
> If this makes sense, then I'm going to draft up some patches to allow hipamd to build off packaged headers instead of requiring the full HIP source tree. Please let me know if you have any thoughts on this.

I had a quick lookup of the d/control file of hipamd, and at the
time of writing this, the slicing in binary packages is as
follows:

  * hipcc: contains hip utility scripts;
  * libamdhip64-5: contains libamdhip64.so.5;
  * libamdhip64-dev: contains headers;
  * libhiprtc-builtins5: contains libhiprtc-builtins.so.5.

There are also provisional definitions for libopencl (probably
too generic, the name will change), libamdocl64 and librocclr.
This is all work in progress at the moment, it's still time to
change names if need be (naming things is hard).


I am currently trying to finish the packaging of rocm-hipamd so
it could be ready for upload to New queue soon hopefully.  The
software currently builds, but the test suite has to remain
disabled for the moment: I reached a point where I hit the
symptoms described by Cory in #1010467[4] while running the test
suite.  The necessary patch[5] looks in good shape to make it to
the upcoming clang 14 thankfully; thanks Cory!

> [1] hip bin directory: https://github.com/ROCm-Developer-Tools/HIP/tree/develop/bin
> [2] hip include directory: https://github.com/ROCm-Developer-Tools/HIP/tree/develop/include/hip
[3]: https://salsa.debian.org/rocm-team/rocm-hipamd/
[4]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010467
[5]: https://github.com/llvm/llvm-project/issues/55341

Have a nice day,  :)
-- 
Étienne Mollier <emollier@emlwks999.eu>
Fingerprint:  8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/pts/2, please excuse my verbosity.
On air: Kaprekar's Constant - A Silent Drum

Attachment: signature.asc
Description: PGP signature


Reply to: