Add missing cmake dependencies to library -devel packages#6787
Add missing cmake dependencies to library -devel packages#6787lucbruni-amd wants to merge 1 commit into
Conversation
The *-config.cmake files shipped in the math-library -devel packages call find_dependency(hip), find_dependency(hipblas-common) and find_dependency(rocblas), but the -devel packages did not depend on the packages that provide those cmake configs. A dev-only install produced a broken cmake config where find_package() failed at configure time (ROCm/ROCm#6447). Add the missing dependencies: - blas: amdrocm-runtime-devel, amdrocm-hipblas-common-devel - solver: amdrocm-runtime-devel, amdrocm-blas-devel - fft, rand, sparse, ccl, rccl, dnn, rocalution, hiptensor: amdrocm-runtime-devel amdrocm-runtime-devel is non-gfxarch and the -devel providers are classified non-gfxarch, so these deps survive the host-variant dependency filtering and appear in the published no-suffix -dev packages.
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
There was a problem hiding this comment.
Pull request overview
This PR fixes broken downstream CMake consumption for ROCm math-library development packages by ensuring that *-config.cmake files’ find_dependency(...) calls are backed by declared package dependencies. It updates the Linux packaging manifest so -devel packages depend on the packages that actually ship the required CMake package configs (notably HIP and certain common math components).
Changes:
- Add
amdrocm-runtime-develas a dependency to multiple math-library-develpackages sofind_dependency(hip)can succeed. - Add
amdrocm-hipblas-common-develtoamdrocm-blas-develto satisfyfind_dependency(hipblas-common). - Add
amdrocm-blas-develtoamdrocm-solver-develto satisfyfind_dependency(rocblas).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "libc6", | ||
| "amdrocm-fft" | ||
| "amdrocm-fft", | ||
| "amdrocm-runtime-devel" |
There was a problem hiding this comment.
The changes looks fine. But thie runtime-devel will install llvm-devel package which usually is huge.
cc: @raramakr
Summary
The
*-config.cmakefiles shipped in the math-library-develpackages callfind_dependency(hip),find_dependency(hipblas-common)andfind_dependency(rocblas), but the-develpackages did not declare dependencies on the packages that provide those cmake configs. Installing a-devpackage therefore produced a broken cmake config, and downstreamfind_package()failed at configure time.This addresses ROCm/ROCm#6447, where
find_package(hipblas)fails with:Changes
build_tools/packaging/linux/package.json, adding toDEBDependsandRPMRequires:-develpackageamdrocm-runtime-devel,amdrocm-hipblas-common-develhip,hipblas-commonamdrocm-runtime-devel,amdrocm-blas-develhip,rocblasamdrocm-runtime-develhip(dnn alsoamd_comgr, via runtime-devel)Why these dependencies survive packaging
The published no-suffix
-devpackages are theGFX_HOSTvariant, whose dependency branch strips gfxarch dependencies.amdrocm-runtime-develis non-gfxarch, and-develdependencies are classified non-gfxarch, so all of the added dependencies persist into the shipped packages.Known limitation (tracked separately)
A
-dev-only install still cannot completefind_package(hipblas)because the runtime library (libhipblas.so, shipped byamdrocm-blas-host) is not pulled in by the-devpackage. That is a separate design question about the dev/runtime split and is tracked in #6786. This PR resolves thefind_dependency(cmake config) failures reported in #6447.Testing
GFX_HOSTcontrol file for each affected-develpackage via the packaging harness; every one now lists the expected dependencies (previouslyDepends: libc6only).build_package_test.py, 21/21).