Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ahsan-ca opened this issue May 1, 2024 · 1 comment
Open

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

ahsan-ca opened this issue May 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ahsan-ca
Copy link
Contributor

ahsan-ca commented May 1, 2024

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.

@ahsan-ca ahsan-ca self-assigned this May 1, 2024
@ahsan-ca ahsan-ca added the enhancement New feature or request label May 1, 2024
@ahsan-ca ahsan-ca changed the title Rocm-cmake: move unstable libraries $ROCM_PATH/lib/migraphx Rocm-cmake: move unstable libraries to $ROCM_PATH/lib/migraphx May 6, 2024
@ahsan-ca
Copy link
Contributor Author

Draft PR: ROCm/rocm-cmake#188
Testing changes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant