Skip to content

Commit

Permalink
Refactor hip and performance CSCS CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
aurianer committed Jan 22, 2024
1 parent ca3a650 commit ba7282b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 107 deletions.
63 changes: 7 additions & 56 deletions .gitlab/includes/hip_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,76 +23,27 @@ include:
-DCMAKE_HIP_ARCHITECTURES=$GPU_TARGET -DPIKA_WITH_STDEXEC=ON"

gcc12_hip5_spack_compiler_image:
stage: spack_compiler
needs: [base_spack_image]
extends:
- .container-builder
- .compiler_image_template
- .variables_gcc12_hip5_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16`
- compiler=${COMPILER/@/-}
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG
- echo -e "compiler=$compiler" >> compiler.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler
DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]'
artifacts:
reports:
dotenv: compiler.env

gcc12_hip5_spack_image:
stage: spack_dependencies
timeout: 4 hours
needs: [gcc12_hip5_spack_compiler_image]
extends:
- .container-builder
- .dependencies_image_template
- .variables_gcc12_hip5_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG
- echo -e "compiler=$compiler" >> dependencies.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies
DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]'
artifacts:
reports:
dotenv: dependencies.env

gcc12_hip5_debug_build:
stage: build
needs: [gcc12_hip5_spack_image]
extends:
- .container-builder
- .build_template
- .variables_gcc12_hip5_config
- .build_variables_common
- .cmake_variables_common
needs:
- gcc12_hip5_spack_image
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'`
- configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR
- configuration=${configuration//-D/}
- CONFIG_TAG=`echo $configuration | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler-$build_type-build:$CONFIG_TAG
- echo -e "PERSIST_IMAGE_NAME=$PERSIST_IMAGE_NAME" >> build.env
artifacts:
reports:
dotenv: build.env

gcc12_hip5_debug_test:
needs: [gcc12_hip5_debug_build]
extends:
- .variables_gcc12_hip5_config
- .test_template
- .test_common_gpu_clariden_hip
- .variables_gcc12_hip5_config
- .cmake_variables_common
needs:
- gcc12_hip5_debug_build
script:
- spack arch
- export CTEST_XML=$PWD/ctest.xml
- trap "${SOURCE_DIR}/.gitlab/scripts/collect_ctest_metrics.sh ${CTEST_XML}" EXIT
- spack -e pika_ci build-env $spack_spec -- bash -c "ctest --output-junit ${CTEST_XML} --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(($(nproc)/2)) --timeout 120 --output-on-failure --no-compress-output --no-tests=error"
image: $PERSIST_IMAGE_NAME
56 changes: 5 additions & 51 deletions .gitlab/includes/performance_gcc13_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,74 +19,28 @@ include:
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPIKA_WITH_CXX_STANDARD=$CXXSTD"

performance_gcc13_spack_compiler_image:
stage: spack_compiler
needs: [base_spack_image]
extends:
- .container-builder
- .compiler_image_template
- .variables_performance_gcc13_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$ARCH-$BASE_IMAGE-$COMPILER | sha256sum - | head -c 16`
- compiler=${COMPILER/@/-}
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler:$CONFIG_TAG
- echo -e "compiler=$compiler" >> compiler.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler
DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER"]'
artifacts:
reports:
dotenv: compiler.env

performance_gcc13_spack_image:
stage: spack_dependencies
needs: [performance_gcc13_spack_compiler_image]
extends:
- .container-builder
- .dependencies_image_template
- .variables_performance_gcc13_config
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- CONFIG_TAG=`echo $DOCKERFILE_SHA-$BASE_IMAGE-$SPACK_SPEC | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/base/pika-$compiler-dependencies:$CONFIG_TAG
- echo -e "compiler=$compiler" >> dependencies.env
- echo -e "BASE_IMAGE=$PERSIST_IMAGE_NAME" >> dependencies.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_dependencies
DOCKER_BUILD_ARGS: '["BASE_IMAGE","SPACK_SPEC"]'
artifacts:
reports:
dotenv: dependencies.env

performance_gcc13_release_build:
stage: build
needs: [performance_gcc13_spack_image]
extends:
- .container-builder
- .build_template
- .variables_performance_gcc13_config
- .cmake_variables_common
needs:
- performance_gcc13_spack_image
before_script:
- export DOCKERFILE_SHA=`sha256sum $DOCKERFILE | head -c 16`
- build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'`
- configuration=$DOCKERFILE_SHA-$BASE_IMAGE-$BUILD_DIR-$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA-$SOURCE_DIR
- configuration=${configuration//-D/}
- CONFIG_TAG=`echo $configuration | sha256sum - | head -c 16`
- export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler-$build_type-build:$CONFIG_TAG
- echo -e "PERSIST_IMAGE_NAME=$PERSIST_IMAGE_NAME" >> build.env
variables:
DOCKERFILE: .gitlab/docker/Dockerfile.spack_build_performance
DOCKER_BUILD_ARGS: '["BASE_IMAGE","SOURCE_DIR","BUILD_DIR","CMAKE_COMMON_FLAGS","CMAKE_FLAGS"]'
artifacts:
reports:
dotenv: build.env

performance_gcc13_release_test:
extends:
- .variables_performance_gcc13_config
- .test_common_mc
- .cmake_variables_common
needs:
- performance_gcc13_release_build
needs: [performance_gcc13_release_build]
image: $PERSIST_IMAGE_NAME
script:
- export MIMALLOC_EAGER_COMMIT_DELAY=0
Expand Down

0 comments on commit ba7282b

Please sign in to comment.