ROCm / ROCm/AMDMIGraphX

Rocm-cmake: move unstable libraries to $ROCM_PATH/lib/migraphx

Open
#3,029 3 comments 0 reactions 1 assignee View on GitHub

@ahsan-ca is already working on this.

Since May 1, 2024.

enhancement
Dominant language
C++
Stars
333
Forks
150
Avg merge
4d 19h
Merged PRs (30d)
54

Description

Changes need to be made in rocm-cmake to support installation of libraries at $ROCM_PATH/lib/migraphx.

First, a PRIVATE flag should be added to the rocm_install_targets that will install the binaries and headers under lib/${PROJECT_NAME}. So instead of installing in $<INSTALL_PREFIX>/lib or $<INSTALL_PREFIX>/include it will install into $<INSTALL_PREFIX>/lib/${PROJECT_NAME}/lib and $<INSTALL_PREFIX>/lib/${PROJECT_NAME}/include respectively. For ASAN build we will need to install into lib/asan/${PROJECT_NAME} instead.

Secondly, we will need to update the RPATH of every library to have this private path. This can be done by updating the RPATH property on non-private targets, something like this:

if(POLICY CMP0095)
    set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "\${ORIGIN}/${PROJECT_NAME}/lib")
else()
    set_property(TARGET ${TARGET} APPEND PROPERTY INSTALL_RPATH "\\\${ORIGIN}/${PROJECT_NAME}/lib")
endif()
This RPATH should work for asan and non-asan builds.

Finally, we will need to update migraphx to use the PRIVATE flag to install the libraries and headers.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.