Skip to content

Commit d934cc7

Browse files
atulkulksystems-assistant[bot]
authored andcommitted
[RCCL] Detect ROCm version via core symlink for multi-arch
installs (#7011) ## Motivation Allow RCCL to configure against ROCm installs that use the new multi-arch packaging layout where .info/version is not at the top level of ROCM_PATH. ## Technical Details In projects/rccl/CMakeLists.txt, the ROCm version detection now reads ${ROCMCORE_PATH}/.info/version and falls back to ${ROCMCORE_PATH}/core/.info/version (the core alternatives symlink) when the former is absent. ## JIRA ID AICOMRCCL-1247 ## Test Plan Configured RCCL with CMake against a multi-arch /opt/rocm (7.13.0) install that lacks a top-level .info/version. ## Test Result CMake now reads the version from /opt/rocm/core/.info/version and reports ROCm version: 7.13.0 instead of failing at the file(READ ...) step. ## Submission Checklist - [ ] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. [rocm-systems] ROCm/rocm-systems#7011 (commit c79a53e)
1 parent a70e4c3 commit d934cc7

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,16 @@ endif()
222222
if(EXPLICIT_ROCM_VERSION)
223223
set(rocm_version_string "${EXPLICIT_ROCM_VERSION}")
224224
elseif(ROCMCORE_PATH)
225-
message(STATUS "Reading ROCM version from ${ROCMCORE_PATH}/.info/version")
226-
file(READ "${ROCMCORE_PATH}/.info/version" rocm_version_string)
225+
# Use .info/version directly, or under the 'core' symlink for multi-arch installs.
226+
set(rocm_info_version_file "${ROCMCORE_PATH}/.info/version")
227+
if(NOT EXISTS "${rocm_info_version_file}")
228+
set(rocm_info_version_file "${ROCMCORE_PATH}/core/.info/version")
229+
endif()
230+
if(NOT EXISTS "${rocm_info_version_file}")
231+
message(FATAL_ERROR "Could not determine ROCm version: expected '${ROCMCORE_PATH}/.info/version' or '${ROCMCORE_PATH}/core/.info/version' (set EXPLICIT_ROCM_VERSION or set ROCMCORE_PATH to a valid installation)")
232+
endif()
233+
message(STATUS "Reading ROCM version from ${rocm_info_version_file}")
234+
file(READ "${rocm_info_version_file}" rocm_version_string)
227235
else()
228236
message(FATAL_ERROR "Could not determine ROCM version (set EXPLICIT_ROCM_VERSION or set ROCM_PATH to a valid installation)")
229237
endif()

0 commit comments

Comments
 (0)