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
56 lines
1.9 KiB
CMake
56 lines
1.9 KiB
CMake
# TXZ package building for NCCL
|
|
|
|
find_program(SED_EXECUTABLE sed)
|
|
|
|
# Set package directories
|
|
set(TXZPREPDIR "${CMAKE_BINARY_DIR}/txz")
|
|
set(PKGDIR "${CMAKE_BINARY_DIR}/pkg/txz")
|
|
set(TXZGEN_IN create_txz.sh.in)
|
|
set(TXZGEN create_txz.sh)
|
|
set(TXZTARGETS ${TXZPREPDIR}/${TXZGEN})
|
|
|
|
# Get package architecture
|
|
set(PKG_ARCH ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
|
|
|
# Custom target for txz package preparation
|
|
add_custom_target(txz_prep ALL
|
|
# Create txz prep directory
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${TXZPREPDIR}
|
|
COMMENT "Preparing TXZ package files"
|
|
)
|
|
|
|
# Generate create_txz.sh from template
|
|
add_custom_command(
|
|
TARGET txz_prep
|
|
COMMAND ${SED_EXECUTABLE} -e 's/\\$$\{nccl:Major\}/${NCCL_MAJOR}/g'
|
|
-e 's/\\$$\{nccl:Minor\}/${NCCL_MINOR}/g'
|
|
-e 's/\\$$\{nccl:Patch\}/${NCCL_PATCH}/g'
|
|
-e 's/\\$$\{nccl:Suffix\}/${NCCL_SUFFIX}/g'
|
|
-e 's/\\$$\{cuda:Major\}/${CUDA_MAJOR}/g'
|
|
-e 's/\\$$\{cuda:Minor\}/${CUDA_MINOR}/g'
|
|
-e 's/\\$$\{pkg:Revision\}/${PKG_REVISION}/g'
|
|
-e 's/\\$$\{pkg:Arch\}/${PKG_ARCH}/g'
|
|
${CMAKE_CURRENT_SOURCE_DIR}/${TXZGEN_IN} > ${TXZPREPDIR}/${TXZGEN}
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${TXZGEN_IN}
|
|
)
|
|
|
|
# Build the package
|
|
add_custom_target(txz_build
|
|
COMMAND cd ${CMAKE_BINARY_DIR} && bash txz/create_txz.sh
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${PKGDIR}
|
|
COMMAND mv ${CMAKE_SOURCE_DIR}/nccl*.txz ${PKGDIR}
|
|
WORKING_DIRECTORY ${TXZPREPDIR}
|
|
DEPENDS txz_prep nccl_static
|
|
COMMENT "Building TXZ package with create_txz.sh"
|
|
)
|
|
|
|
# Custom target for cleaning txz package
|
|
add_custom_target(txz_clean
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory ${TXZPREPDIR}
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory ${PKGDIR}
|
|
COMMENT "Cleaning TXZ package build files"
|
|
)
|
|
|
|
# Add txz targets to the main project
|
|
add_dependencies(txz_build nccl_static)
|