Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ROCM_PATH env var to resolve cmake issue in finding HIP package
This is necessitated because we updated the LoadHip.cmake file in release branches of PyTorch for ROCm6.0 changes, which involved using the HIP cmake file from ${ROCM_PATH}/lib/cmake/hip, instead of ${HIP_PATH}/cmake The FindHIP.cmake file at that location has the following code: get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../" REALPATH) find_path( HIP_ROOT_DIR NAMES bin/hipconfig PATHS "$ENV{ROCM_PATH}" "$ENV{ROCM_PATH}/hip" ENV HIP_PATH ${_IMPORT_PREFIX} DOC "HIP installed location" NO_DEFAULT_PATH ) If ROCM_PATH env var is not defined, it will look for bin/hipconfig in in /opt/rocm/lib/cmake instead of /opt/rocm/hip, where it'd have found it before we made the change in LoadHIP.cmake. To keep the ROCm6.0-compatible changes as-is, we define the ROCM_PATH env var to fix ROCm5.7 builds.
- Loading branch information