diff --git a/.gitlab/includes/common_pipeline.yml b/.gitlab/includes/common_pipeline.yml index 4366dada1f..0d4bf17340 100644 --- a/.gitlab/includes/common_pipeline.yml +++ b/.gitlab/includes/common_pipeline.yml @@ -26,7 +26,6 @@ variables: .test_common: variables: - SLURM_PARTITION: normal SLURM_JOB_NUM_NODES: 1 SLURM_NTASKS: 1 @@ -35,8 +34,19 @@ variables: extends: - .test_common - .container-runner-daint-mc + variables: + SLURM_PARTITION: normal -.test_common_gpu: +.test_common_gpu_cuda: extends: - .test_common - .container-runner-daint-gpu + variables: + SLURM_PARTITION: normal + +.test_common_gpu_hip: + extends: + - .test_common + - .container-runner-hohgant-mi200 + variables: + SLURM_PARTITION: amdgpu diff --git a/.gitlab/includes/hip_pipeline.yml b/.gitlab/includes/hip_pipeline.yml new file mode 100644 index 0000000000..d60bec5e0e --- /dev/null +++ b/.gitlab/includes/hip_pipeline.yml @@ -0,0 +1,76 @@ +# Copyright (c) 2023 ETH Zurich +# +# SPDX-License-Identifier: BSL-1.0 +# Distributed under the Boost Software License, Version 1.0. (See accompanying +# file BOOST_LICENSE_1_0.rst or copy at http://www.boost.org/LICENSE_1_0.txt) + +include: + - local: '.gitlab/includes/common_pipeline.yml' + - local: '.gitlab/includes/common_spack_pipeline.yml' + +.variables_gcc12_hip5_config: + variables: + ARCH: linux-ubuntu22.04-broadwell + BUILD_TYPE: Debug + COMPILER: gcc@12.2.0 + CXXSTD: 20 + GPU_TARGET: 'gfx90a:xnack-' + SPACK_SPEC: "pika@main arch=$ARCH %${COMPILER} +rocm +stdexec amdgpu_target=${GPU_TARGET} \ + malloc=system cxxstd=$CXXSTD ^boost@1.79.0 ^hwloc@2.6.0 ^hip@5.3.3 ^fmt@10.0.0 \ + ^whip amdgpu_target=${GPU_TARGET} \ + ^stdexec@git.5e378418d9360a1a53392baae8502c4961f5f4c8=main" + +gcc12_hip5_spack_image: + stage: spack_configs + needs: [base_spack_image] + extends: + - .container-builder + - .variables_gcc12_hip5_config + before_script: + - CONFIG_TAG=`echo $SPACK_SPEC | sha256sum - | head -c 16` + - compiler=${COMPILER/@/-} + - export PERSIST_IMAGE_NAME=$CSCS_REGISTRY_PATH/pika-$compiler:$CONFIG_TAG + - echo -e "compiler=$compiler\nBASE_IMAGE=$PERSIST_IMAGE_NAME" >> compiler.env + variables: + BASE_IMAGE: $CSCS_REGISTRY_PATH/pika-spack-base:$SPACK_VERSION + DOCKERFILE: .gitlab/docker/Dockerfile.spack_compiler + DOCKER_BUILD_ARGS: '["BASE_IMAGE","ARCH","COMPILER","SPACK_SPEC"]' + artifacts: + reports: + dotenv: compiler.env + +gcc12_hip5_debug_build: + stage: build + extends: + - .container-builder + - .variables_gcc12_hip5_config + - .cmake_variables_common + needs: + - gcc12_hip5_spack_image + before_script: + - build_type=`echo $BUILD_TYPE | tr '[:upper:]' '[:lower:]'` + - configuration=$CMAKE_COMMON_FLAGS-$CMAKE_FLAGS-$CI_COMMIT_SHORT_SHA + - 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 + CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPIKA_WITH_CXX_STANDARD=$CXXSTD \ + -DPIKA_WITH_HIP=ON -DPIKA_WITH_MALLOC=system \ + -DCMAKE_HIP_ARCHITECTURE=$GPU_TARGET -DPIKA_WITH_STDEXEC=ON" + DOCKER_BUILD_ARGS: '["BASE_IMAGE","SOURCE_DIR","BUILD_DIR","CMAKE_COMMON_FLAGS","CMAKE_FLAGS"]' + artifacts: + reports: + dotenv: build.env + +gcc12_hip5_debug_test: + extends: + - .variables_gcc12_hip5_config + - .test_common_gpu_hip + needs: + - gcc12_hip5_debug_build + script: + - spack arch + - spack build-env $spack_spec -- bash -c "ctest --label-exclude COMPILE_ONLY --test-dir ${BUILD_DIR} -j$(nproc) --timeout 120 --output-on-failure --no-compress-output --no-tests=error" + image: $PERSIST_IMAGE_NAME diff --git a/.gitlab/pipeline.yml b/.gitlab/pipeline.yml index 5b22ff272b..c2bc6420b1 100644 --- a/.gitlab/pipeline.yml +++ b/.gitlab/pipeline.yml @@ -7,3 +7,4 @@ include: - local: '.gitlab/includes/dockerhub_pipeline.yml' - local: '.gitlab/includes/gcc11_pipeline.yml' + - local: '.gitlab/includes/hip_pipeline.yml'