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

Re: CMake musings for ROCm 4.5.2 (Was Re: ROCm packaging session memo)



On 1/29/22 18:32, Jeremy Newton wrote:
I'm currently in a minor role in committee to help determine and fix general install
related issues with ROCm. Some things I have strongly expressed so far:

- we should use gnuinstalldirs whenever possible
- we should respect the FHS for all components
- we should not make distro packaging harder

I agree with all your points.

For reference, right now my involvement in ROCm is very high level, focused mostly on licensing, installation, and packaging related to runtime (rocr/compiler/rocclr/ocl/hip/hipamd). I'm really not well informed with the topics related to math libs and the misc roc* libs (like rocBLAS, rocSOLVER, etc) that Cory is more involved in.

This is very nice to be able to talk to both you and Cory (and Matthew),
since your combined coverage of the stack is quite complete!

I think itemized lists help a lot, because I can share them as-is.

You are right, I indulged into a wall-of-text once again, my bad.

Excerpt / TL;DR:

# Cmake install layout - quite all the ROCm libraries, mostly the math ones
  - Do not only declare GNUInstallDirs, but use them, with the minimalism that they intend to provide.     i.e. do not "install(TARGETS ... ${CMAKE_SOURCE_DIR}/library/include...PREFIX package_name" => do simply "install(TARGETS)"
  - Do challenge the existence of rocm-cmake install functions?
    What is the purpose of rocm_install_symlink_subdir()?

# Finding the device libs
On top of the cmake export obviously, a lot of parties are interested in locating the device libs.   - Do reduce the number of said parties, and hard-coded assumptions, in favor of a unique flag?   - Overhaul device lib cmake variables (can be treated as a general topic aswell)?

I uploaded again the image [1] which hopefully speaks a thousand words,
the left arrows and code [2] had errors, but you got the idea.

Best regards, Maxime

[1] https://salsa.debian.org/rocm-team/community/team-project/-/blob/master/resources/cmake_musings_20220128_final.png [2] https://salsa.debian.org/rocm-team/rocclr/-/blob/8f8f816a98893bb281e732a16ba6b2b6ba493634/debian/patches/0001-Lean-GNUInstallDirs.patch


Reply to: