amd-device-libs: Respect ROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW in AMDDeviceLibsConfig.cmake #303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theAMDDeviceLibsConfig.cmake
file, that still points to the default install location. This PR fixes this by respecting theROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW
when generating theAMDDeviceLibsConfig.cmake
file.Technical Details
The
Packages.cmake
was redefining ainstall_path_suffix
variable with the hardcoded install value, but a similar variableINSTALL_ROOT_SUFFIX
(that respectsROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW
was already defined inOCL.cmake
, so asOCL
is included beforePackages
, we can just get rid ofinstall_path_suffix
and useINSTALL_ROOT_SUFFIX
.This removes the need for patches or workarounds used in downstream packaging, see:
Test Plan
I configured the
amd/device-libs
folder in standalone mode, and specified a custom install location withROCM_DEVICE_LIBS_BITCODE_INSTALL_LOC_NEW
, and I verified manually thatAMDDeviceLibsConfig.cmake
was correctly updated.Test Result
See Test Plan.
Submission Checklist