You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
amd-device-libs: Respect ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW in AMDDeviceLibsConfig.cmake (#303)
## Motivation
When the `ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW` variable is
specified, the install location of bytecode changes, but this change is
not reflected in the `AMDDeviceLibsConfig.cmake` file, that still points
to the default install location. This PR fixes this by respecting the
`ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW` when generating the
`AMDDeviceLibsConfig.cmake` file.
## Technical Details
The `Packages.cmake` was redefining a `install_path_suffix` variable
with the hardcoded install value, but a similar variable
`INSTALL_ROOT_SUFFIX` (that respects
`ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW` was already defined in
`OCL.cmake`, so as `OCL` is included before `Packages`, we can just get
rid of `install_path_suffix` and use `INSTALL_ROOT_SUFFIX` .
This removes the need for patches or workarounds used in downstream
packaging, see:
*
https://github.com/gentoo/gentoo/blob/86548b8f3404ab51d5dfc1e3e84b266d77dd77f5/dev-libs/rocm-device-libs/rocm-device-libs-6.4.3.ebuild#L61-L63
*
https://github.com/conda-forge/rocm-device-libs-feedstock/blob/main/recipe/patches/0001-Use-a-folder-inside-lib-for-bitcode-instead-of-top-l.patch
## Test Plan
I configured the `amd/device-libs` folder in standalone mode, and
specified a custom install location with
`ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW`, and I verified manually that
`AMDDeviceLibsConfig.cmake` was correctly updated.
## Test Result
See Test Plan.
## Submission Checklist
- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
0 commit comments