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

Use of rocm-cmake in llama.cpp



Hi Christian,

I noticed that the llama.cpp package has a Build-Depends on rocm-cmake [1]. This is a common mistake, so I wanted to mention it on the list so that everyone is aware. The rocm-cmake package is just a collection of helper functions for various things that AMD does with CMake. It defines things like a `rocm_install` function that wraps the normal `install` function. Those rocm-cmake functions are mostly used for defining the CPack variables for AMD's own RPM and DEB packages. If you see a third-party library or application that depends on rocm-cmake, it's usually a mistake.

From the rocm-cmake README.md [2]:

> rocm-cmake is a collection of CMake modules for common build and development tasks within the ROCm project. It is therefore a build dependency for many of the libraries that comprise the ROCm platform.

> rocm-cmake is not required for building libraries or programs that use ROCm; it is required for building some of the libraries that are a part of ROCm.

The problem is that rocm-cmake looks so important. Developers see the name `rocm-cmake` or see `find_package(ROCM)` when looking through AMD's libraries and they assume that it's something that they need to use in their own codebase if they use ROCm and CMake. It's not. That's why recent versions of rocm-cmake have deprecated `find_package(ROCM)` and instead direct users to use `find_package(ROCmCMakeBuildTools)`. The hope is that people will be less likely to needlessly copy the latter into their code. The repository will be renamed to reflect this in ROCm 7.0.

Sincerely,
Cory Bloor

[1]: https://salsa.debian.org/deeplearning-team/llama.cpp/-/blob/debian/4616+dfsg-1_exp1/debian/control?ref_type=tags#L21
[2]: https://github.com/ROCm/rocm-cmake/blob/rocm-6.3.3/README.md


Reply to: