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
39 lines
1.3 KiB
CMake
39 lines
1.3 KiB
CMake
if (DEFINED ROCM_PATH)
|
|
set(compiler_bin "${ROCM_PATH}/llvm/bin")
|
|
elseif (DEFINED ENV{ROCM_PATH})
|
|
set(ROCM_PATH "$ENV{ROCM_PATH}" CACHE PATH "ROCm installation path")
|
|
set(compiler_bin "$ENV{ROCM_PATH}/llvm/bin")
|
|
else()
|
|
set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCm installation path")
|
|
set(compiler_bin "/opt/rocm/llvm/bin")
|
|
endif()
|
|
|
|
if (NOT DEFINED ENV{CXX})
|
|
set(CMAKE_CXX_COMPILER "${compiler_bin}/amdclang++" CACHE PATH "Path to the C++ compiler")
|
|
else()
|
|
set(CMAKE_CXX_COMPILER "$ENV{CXX}" CACHE PATH "Path to the C++ compiler")
|
|
endif()
|
|
|
|
# Clang++ compiler fails to auto detect device lib path in some ROCK builds
|
|
if (NOT EXISTS "${ROCM_PATH}/amdgcn/bitcode" AND EXISTS "${ROCM_PATH}/llvm/amdgcn/bitcode")
|
|
set(DEVICE_LIB_PATH "--rocm-device-lib-path=${ROCM_PATH}/llvm/amdgcn/bitcode")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DEVICE_LIB_PATH}")
|
|
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${DEVICE_LIB_PATH}")
|
|
endif()
|
|
|
|
if (NOT DEFINED ENV{CXXFLAGS})
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
|
endif()
|
|
|
|
if (NOT DEFINED ENV{CC})
|
|
set(CMAKE_C_COMPILER "${compiler_bin}/amdclang" CACHE PATH "Path to the C compiler")
|
|
else()
|
|
set(CMAKE_C_COMPILER "$ENV{CC}" CACHE PATH "Path to the C compiler")
|
|
endif()
|
|
|
|
if (NOT DEFINED ENV{CFLAGS})
|
|
set(CMAKE_C_FLAGS_DEBUG "-g -O1")
|
|
set(CMAKE_C_FLAGS_RELEASE "-O3")
|
|
endif()
|