CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
79 lines
2.7 KiB
CMake
79 lines
2.7 KiB
CMake
# Copyright Advanced Micro Devices, Inc., or its affiliates.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
# ROCmClientPackages.cmake Provides functions for setting up client package dependencies based on OS
|
|
|
|
include_guard(GLOBAL)
|
|
|
|
#[=======================================================================[.rst:
|
|
ROCmClientPackages
|
|
------------------
|
|
|
|
Provides functions for setting up ROCm client package dependencies
|
|
based on the detected operating system.
|
|
|
|
Functions:
|
|
rocm_setup_openmp_packages() - Sets OPENMP_RPM and OPENMP_DEB variables
|
|
rocm_setup_gfortran_packages() - Sets GFORTRAN_RPM and GFORTRAN_DEB variables
|
|
rocm_setup_client_packages() - Sets up all client package variables
|
|
rocm_setup_client_components() - Sets up packages and ROCm components
|
|
|
|
Variables set:
|
|
OPENMP_RPM - OpenMP package name for RPM-based systems
|
|
OPENMP_DEB - OpenMP package name for DEB-based systems
|
|
GFORTRAN_RPM - GFortran package name for RPM-based systems
|
|
GFORTRAN_DEB - GFortran package name for DEB-based systems
|
|
#]=======================================================================]
|
|
|
|
# Internal macro to detect the OS of the build host, if not already done
|
|
macro(_rocm_detect_os)
|
|
if(NOT HOST_OS)
|
|
rocm_set_os_id(HOST_OS)
|
|
string(TOLOWER "${HOST_OS}" HOST_OS)
|
|
rocm_read_os_release(HOST_OS_VERSION VERSION_ID)
|
|
endif()
|
|
endmacro()
|
|
|
|
# Set up OpenMP package variables for current OS
|
|
macro(rocm_setup_posix_openmp_packages)
|
|
_rocm_detect_os()
|
|
|
|
set(OPENMP_RPM "libgomp")
|
|
set(OPENMP_DEB "libomp-dev")
|
|
|
|
# OS-specific overrides
|
|
if(HOST_OS STREQUAL "sles")
|
|
set(OPENMP_RPM "libgomp1")
|
|
endif()
|
|
endmacro()
|
|
|
|
# Set up GFortran package variables for current OS
|
|
macro(rocm_setup_posix_gfortran_packages)
|
|
_rocm_detect_os()
|
|
|
|
set(GFORTRAN_RPM "libgfortran4")
|
|
set(GFORTRAN_DEB "libgfortran4")
|
|
|
|
if(HOST_OS STREQUAL "centos" OR HOST_OS STREQUAL "rhel" OR HOST_OS STREQUAL "almalinux")
|
|
if(HOST_OS_VERSION VERSION_GREATER_EQUAL "8")
|
|
set(GFORTRAN_RPM "libgfortran")
|
|
endif()
|
|
elseif(HOST_OS STREQUAL "ubuntu" AND HOST_OS_VERSION VERSION_GREATER_EQUAL "20.04")
|
|
set(GFORTRAN_DEB "libgfortran5")
|
|
elseif(HOST_OS STREQUAL "mariner" OR HOST_OS STREQUAL "azurelinux")
|
|
set(GFORTRAN_RPM "gfortran")
|
|
endif()
|
|
endmacro()
|
|
|
|
# Macro to set up all client package variables
|
|
macro(rocm_set_client_package_prerequisites)
|
|
_rocm_detect_os()
|
|
message(STATUS "Detected OS: ${HOST_OS} ${HOST_OS_VERSION}")
|
|
|
|
rocm_setup_posix_openmp_packages()
|
|
rocm_setup_posix_gfortran_packages()
|
|
|
|
message(STATUS "OpenMP packages: RPM=${OPENMP_RPM}, DEB=${OPENMP_DEB}")
|
|
message(STATUS "GFortran packages: RPM=${GFORTRAN_RPM}, DEB=${GFORTRAN_DEB}")
|
|
endmacro()
|