Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab CI testing expansion #1644

Merged
merged 44 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7a3d6b0
Fix syntax error in gitlab-ci.yml which prevented rajaperf from being…
long58 Mar 19, 2024
8d5c5ac
Adds CI job for corona_sycl with new intel clang sycl compiler.
long58 Apr 1, 2024
7cf8969
Fix new CI job spec
long58 Apr 2, 2024
019ad22
Merge branch 'develop' of https://github.com/LLNL/RAJA into long58/ci…
long58 Apr 3, 2024
65a769e
Updates for testing sycl backend on corona.
long58 Apr 5, 2024
cfc8030
Add sycl to compiler name
long58 Apr 5, 2024
4d0e501
Merge branch 'develop' of https://github.com/LLNL/RAJA into long58/ci…
long58 Apr 9, 2024
ab3b264
Adds instructions on how to build the intel compiler for the CI tasks
long58 Apr 29, 2024
0e93fa9
update radiuss spack configs
long58 May 10, 2024
06c4708
Added openMPTarget CI Tests for lassen
long58 May 10, 2024
600c5d2
update radiuss spack configs
long58 May 10, 2024
59a8ccd
temporarily allow omptarget job to fail in ci
long58 May 10, 2024
751fc03
Merge branch 'develop' of https://github.com/LLNL/RAJA into long58/ci…
long58 May 10, 2024
2658554
update radiuss spack configs
long58 May 13, 2024
8b31fd5
Merge branch 'develop' of https://github.com/LLNL/RAJA into long58/in…
long58 May 13, 2024
c474d3a
Merge branch 'long58/intel_compiler_build_instructions' into long58/c…
long58 May 13, 2024
d61419f
Merge branch 'develop' into long58/ci_expansion
rhornung67 May 15, 2024
3d2fbf6
Formatting fixes based on PR comments
long58 May 16, 2024
0bada79
Fixed number formatting
long58 May 16, 2024
5778d3b
Docs fixes based on GitHub discussion.
long58 May 16, 2024
2a3e7e7
Deactivate intel 19.1.2 on poodle (too long) and syntaxical cleaning
adrienbernede May 30, 2024
222dbfe
More syntaxical cleaning
adrienbernede May 30, 2024
0a18db5
Merge branch 'develop' into long58/ci_expansion
rhornung67 May 30, 2024
7d00d34
CI Changes based on GitHub PR Discussion
long58 Jun 4, 2024
f6f5ca3
Merge branch 'develop' into long58/ci_expansion
rhornung67 Jun 4, 2024
14ed520
Update RSC
adrienbernede Jun 7, 2024
6ad023f
Merge branch 'develop' into long58/ci_expansion
adrienbernede Jun 7, 2024
b7adbc8
From RSC: Fix wrong variant
adrienbernede Jun 7, 2024
7db7fd7
Fix indentation in omptarget job on lassen
adrienbernede Jun 10, 2024
a5ae073
From RSC: Specify conflicts between rocm omptarget and sycl
adrienbernede Jun 10, 2024
ed2b115
Turn rocm support in sycl job
adrienbernede Jun 10, 2024
c3fee46
From RSC: Apply same conflicts to camp
adrienbernede Jun 10, 2024
e5bb7df
Remove amdgpu_target variant, which supposes +rocm
adrienbernede Jun 10, 2024
a3e807b
Merge branch 'develop' into long58/ci_expansion
rhornung67 Jun 10, 2024
c48d2f8
#1605: Test RAJAPerf whenever a PR is created
long58 Jun 14, 2024
452f15b
Merge branch 'develop' into long58/ci_expansion
adrienbernede Jun 20, 2024
372c96c
Merge branch 'develop' into long58/ci_expansion
rhornung67 Jun 26, 2024
ed5e207
Merge branch 'develop' into long58/ci_expansion
long58 Jun 27, 2024
65bf2d2
Change name of custom corona sycl compiler to get around a bug in spack.
long58 Jun 27, 2024
646002b
Merge branch 'long58/ci_expansion' of https://github.com/LLNL/RAJA in…
long58 Jun 27, 2024
da45c39
Merge branch 'develop' of https://github.com/LLNL/RAJA into long58/ci…
long58 Jul 8, 2024
5f8f54b
Revert change to gitlab-ci.yml
long58 Jul 10, 2024
826b4e1
From RSC: merge
adrienbernede Jul 11, 2024
235f9e1
Igore warnings from corona sycl test.
long58 Jul 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ stages:
trigger-rajaperf:
stage: multi-project
rules:
- if: '$CI_COMMIT_BRANCH == "${MP_BRANCH}" || $MULTI_PROJECT == "ON"' #run only if ...
- if: $CI_COMMIT_BRANCH == $MP_BRANCH || $MULTI_PROJECT == "ON" #run only if ...
variables:
UPDATE_RAJA: ${MP_BRANCH}
trigger:
project: radiuss/rajaperf
branch: develop
strategy: depend

include:
# Sets ID tokens for every job using `default:`
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/custom-jobs-and-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ variables:
# Project specific variants for ruby
PROJECT_RUBY_VARIANTS: "~shared +openmp +vectorization +tests"
# Project specific deps for ruby
PROJECT_RUBY_DEPS: ""
PROJECT_RUBY_DEPS: "^blt@develop "

# Poodle
# Arguments for top level allocation
Expand All @@ -31,7 +31,7 @@ variables:
# Project specific variants for poodle
PROJECT_POODLE_VARIANTS: "~shared +openmp +vectorization +tests"
# Project specific deps for poodle
PROJECT_POODLE_DEPS: ""
PROJECT_POODLE_DEPS: "^blt@develop "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@long58 @rhornung67 let’s not deal with this in this PR, but blt@develop is heavily used in the CI. We should check whether that is still necessary, it’s not good to point at a moving target in CI.


# Corona
# Arguments for top level allocation
Expand Down
6 changes: 6 additions & 0 deletions .gitlab/jobs/corona.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ rocmcc_5_7_0_hip_desul_atomics:
SPEC: " ~shared +rocm ~openmp +tests +desul amdgpu_target=gfx906 %rocmcc@=5.7.0 ^hip@5.7.0 ^blt@develop"
extends: .job_on_corona

clang_19_0_0_sycl_gcc_10_3_1_rocmcc_5_7_1_hip:
variables:
SPEC: " ~shared +sycl ~openmp +tests %clang@=19.0.0 cxxflags==\"-w -fsycl -fsycl-unnamed-lambda -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906\" ^blt@develop"
MODULE_LIST: "rocm/5.7.1"
extends: .job_on_corona

10 changes: 10 additions & 0 deletions .gitlab/jobs/lassen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ gcc_8_3_1_cuda_10_1_243_desul_atomics:
variables:
SPEC: " ~shared +openmp +tests +cuda +desul %gcc@=8.3.1 cuda_arch=70 ^cuda@10.1.243+allow-unsupported-compilers ^blt@develop"
extends: .job_on_lassen

# Warning: Allowed to fail temporarily
# Deactivated due to issues with OpenMP Target and various tests and compilers.
clang_16_0_6_ibm_omptarget:
variables:
SPEC: " ~shared +openmp +omptarget +tests %clang@=16.0.6.ibm.gcc.8.3.1 ^blt@develop"
ON_LASSEN: "OFF"
extends: .job_on_lassen
allow_failure: true

16 changes: 11 additions & 5 deletions .gitlab/jobs/poodle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,32 @@
########################
# We duplicate the shared jobs description and add necessary changes for this
# project. We keep ${PROJECT_<MACHINE>_VARIANTS} and ${PROJECT_<MACHINE>_DEPS}
# So that the comparison with the original job is easier.
# when possible so that the comparison with the original job is easier.

# Identical to shared job, but use OpenMP tasks and no vectorization
clang_14_0_6:
variables:
SPEC: " ~shared +openmp +omptask +tests %clang@=14.0.6 ^blt@develop"
SPEC: " ~shared +openmp +omptask +tests %clang@=14.0.6 ${PROJECT_POODLE_DEPS}"
extends: .job_on_poodle

# Identical to shared job, but use OpenMP tasks and no vectorization
gcc_10_3_1:
variables:
SPEC: " ~shared +openmp +omptask +tests %gcc@=10.3.1 ^blt@develop"
SPEC: " ~shared +openmp +omptask +tests %gcc@=10.3.1 ${PROJECT_POODLE_DEPS}"
extends: .job_on_poodle

# Identical to shared job, but use OpenMP tasks and no vectorization
# Deactivated (too long on poodle)
intel_19_1_2_gcc_10_3_1:
variables:
SPEC: " ~shared +openmp +omptask +tests %intel@=19.1.2.gcc.10.3.1 ^blt@develop"
ON_POODLE: "OFF"
SPEC: " ~shared +openmp +omptask +tests %intel@=19.1.2.gcc.10.3.1 ${PROJECT_POODLE_DEPS}"
extends: .job_on_poodle

# Allowed to fail
intel_2022_1_0:
variables:
SPEC: "${PROJECT_POODLE_VARIANTS} %intel@=2022.1.0 ${PROJECT_POODLE_DEPS} ^blt@develop"
SPEC: "${PROJECT_POODLE_VARIANTS} %intel@=2022.1.0 ${PROJECT_POODLE_DEPS}"
allow_failure: true
extends: .job_on_poodle

Expand Down
14 changes: 9 additions & 5 deletions .gitlab/jobs/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,30 @@
########################
# We duplicate the shared jobs description and add necessary changes for this
# project. We keep ${PROJECT_<MACHINE>_VARIANTS} and ${PROJECT_<MACHINE>_DEPS}
# So that the comparison with the original job is easier.
# when possible so that the comparison with the original job is easier.

# Identical to shared job, but use OpenMP tasks and no vectorization
clang_14_0_6:
variables:
SPEC: " ~shared +openmp +omptask +tests %clang@=14.0.6 ^blt@develop"
SPEC: " ~shared +openmp +omptask +tests %clang@=14.0.6 ${PROJECT_RUBY_DEPS}"
extends: .job_on_ruby

# Identical to shared job, but use OpenMP tasks and no vectorization
gcc_10_3_1:
variables:
SPEC: " ~shared +openmp +omptask +tests %gcc@=10.3.1 ^blt@develop"
SPEC: " ~shared +openmp +omptask +tests %gcc@=10.3.1 ${PROJECT_RUBY_DEPS}"
extends: .job_on_ruby

# Identical to shared job, but use OpenMP tasks and no vectorization
intel_19_1_2_gcc_10_3_1:
variables:
SPEC: " ~shared +openmp +omptask +tests %intel@=19.1.2.gcc.10.3.1 ^blt@develop"
SPEC: " ~shared +openmp +omptask +tests %intel@=19.1.2.gcc.10.3.1 ${PROJECT_RUBY_DEPS}"
extends: .job_on_ruby

# Allowed to fail
intel_2022_1_0:
variables:
SPEC: "${PROJECT_RUBY_VARIANTS} %intel@=2022.1.0 ${PROJECT_RUBY_DEPS} ^blt@develop"
SPEC: "${PROJECT_RUBY_VARIANTS} %intel@=2022.1.0 ${PROJECT_RUBY_DEPS}"
allow_failure: true
extends: .job_on_ruby

Expand Down
108 changes: 108 additions & 0 deletions docs/sphinx/dev_guide/ci_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,114 @@ annotate the job for this. For example:
describe the change in the ``RAJA/.gitlab/jobs/<MACHINE>.yml`` file where
the job is overridden.


Building the Intel clang + SYCL HIP compiler for use in CI
----------------------------------------------------------

The SYCL CI tests on corona rely on a custom Intel Clang SYCL compiler that we
build ourselves. This compiler lives in the ``/usr/workspace/raja-dev/`` folder so
that it can be accessed by the gitlab CI system. Since the intel compiler does
not do releases in the typical sense (they simply update their repo *every night*),
it may become necessary to periodically build a new version of the compiler to
ensure that we are using the most up-to-date version available. The steps for
building, installing, and running are shown here.

Building the Compiler
^^^^^^^^^^^^^^^^^^^^^

.. important:: Because intel updates their compiler repo daily, there is a nonzero possibility that the head of the sycl branch will fail to build.
In the event that it does not build, try checking out a different commit. On the intel/llvm GitHub page, one can see which of their
commits builds by checking the status badge next to each commit. Look for a commit that passes.


#. Load the version of GCC that you want to use. In this case, we are using LC's gcc/10.3.1-magic installation::

module load gcc/10.3.1-magic

#. Load the version of rocm that you want to use. In this case, we are using 5.7.1::

module load rocm/5.7.1

#. Clone the "sycl" branch of intel's llvm compiler fork::

git clone https://github.com/intel/llvm -b sycl

#. cd into that folder::

cd llvm

In the event that the head of the sycl branch does not build, run ``git checkout <git sha>`` to checkout a version that does build.

#. Build the compiler.

Note that in this example, we are using rocm5.7.1, but one can change the version they wish to use simply by changing the paths in the configure step

a. Configure

.. code-block:: bash

srun -n1 /usr/bin/python3 buildbot/configure.py --hip -o buildrocm5.7.1 \
--cmake-gen "Unix Makefiles" \
--cmake-opt=-DSYCL_BUILD_PI_HIP_ROCM_DIR=/opt/rocm-5.7.1 \
--cmake-opt=-DSYCL_BUILD_PI_HIP_ROCM_INCLUDE_DIR=/opt/rocm-5.7.1/include \
--cmake-opt=-DSYCL_BUILD_PI_HIP_ROCM_LIB_DIR=/opt/rocm-5.7.1/lib \
--cmake-opt=-DSYCL_BUILD_PI_HIP_INCLUDE_DIR=/opt/rocm-5.7.1/include \
--cmake-opt=-DSYCL_BUILD_PI_HIP_HSA_INCLUDE_DIR=/opt/rocm-5.7.1/hsa/include/hsa \
--cmake-opt=-DSYCL_BUILD_PI_HIP_LIB_DIR=/opt/rocm-5.7.1/lib \
--cmake-opt=-DUR_HIP_ROCM_DIR=/opt/rocm-5.7.1 \
--cmake-opt=-DUR_HIP_INCLUDE_DIR=/opt/rocm-5.7.1/include \
--cmake-opt=-DUR_HIP_HSA_INCLUDE_DIR=/opt/rocm-5.7.1/hsa/include/hsa \
--cmake-opt=-DUR_HIP_LIB_DIR=/opt/rocm-5.7.1/lib

b. Build

.. code-block:: bash

srun -n1 /usr/bin/python3 buildbot/compile.py -o buildrocm5.7.1

#. Test the compiler

Follow the steps in the `Using the compiler`_ section to test this installation

#. Install

a. The build step will install the compiler to the folder ``buildrocm<version>/install``. Simply copy this folder to the ``/usr/workspace/raja-dev/`` directory using the naming scheme ``clang_sycl_<git sha>_hip_gcc<version>_rocm<version>``

#. Set the permissions of the folder, and everything in it to 750::

chmod 750 /usr/workspace/raja-dev/<foldername>/ -R

#. Change the group of the folder and everything in it to raja-dev::

chgrp raja-dev /usr/workspace/raja-dev/<foldername>/ -R


Using the compiler
^^^^^^^^^^^^^^^^^^

#. Load the version of rocm that you used when building the compiler::

module load rocm/5.7.1

#. Navigate to the root of your local checkout space of the RAJA repo::

cd /path/to/raja

#. Run the test config script::

./scripts/lc-builds/corona_sycl.sh /usr/workspace/raja-dev/clang_sycl_2f03ef85fee5_hip_gcc10.3.1_rocm5.7.1

Note that at the time of writing, the newest compiler we had built was at ``clang_sycl_2f03ef85fee5_hip_gcc10.3.1_rocm5.7.1``

#. cd into the auto generated build directory::

cd {build directory}

#. Run the tests::

make -j


==============
Azure CI Tasks
==============
Expand Down
2 changes: 1 addition & 1 deletion scripts/gitlab/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ then
mkdir -p ${build_dir} && cd ${build_dir}

timed_message "Building RAJA"
if [[ "${truehostname}" == "corona" || "${truehostname}" == "tioga" ]]
if [[ "${truehostname}" == "tioga" ]]
then
module unload rocm
fi
Expand Down
2 changes: 1 addition & 1 deletion test/functional/kernel/hyperplane/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set(TESTTYPES 2D 3D)
foreach( BACKEND ${KERNEL_BACKENDS} )
foreach( TEST_TYPE ${TESTTYPES} )
# Removing Sycl backend, implementation of Hyperplane does not exist
if( NOT ((BACKEND STREQUAL "Sycl")) )
if( NOT ((BACKEND STREQUAL "Sycl")) AND NOT ((BACKEND STREQUAL "OpenMPTarget")) )
configure_file( test-kernel-hyperplane-${TEST_TYPE}.cpp.in
test-kernel-hyperplane-${TEST_TYPE}-${BACKEND}.cpp )
raja_add_test( NAME test-kernel-hyperplane-${TEST_TYPE}-${BACKEND}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ set(TILESIZES 8 32)
# Note: KERNEL_BACKENDS is defined in ../CMakeLists.txt
#
foreach( BACKEND ${KERNEL_BACKENDS} )
foreach( TESTTYPE ${TESTTYPES} )
foreach( TILESIZE ${TILESIZES} )
configure_file( test-kernel-single-loop-tile-count.cpp.in
test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}.cpp )
raja_add_test( NAME test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}.cpp )
target_include_directories(test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
# using omp target crashes the compiler with this one
if( NOT ((BACKEND STREQUAL "OpenMPTarget")) )
foreach( TESTTYPE ${TESTTYPES} )
foreach( TILESIZE ${TILESIZES} )
configure_file( test-kernel-single-loop-tile-count.cpp.in
test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}.cpp )
raja_add_test( NAME test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}.cpp )
target_include_directories(test-kernel-single-loop-${TESTTYPE}-${TILESIZE}-${BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
endforeach()
endforeach()
endforeach()
endif()
endforeach()

unset( TILESIZES )
Expand Down
15 changes: 9 additions & 6 deletions test/functional/kernel/tile-variants/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ set(TILETYPES Fixed2D Fixed2DSum Fixed2DMinMax)

foreach( TILE_BACKEND ${KERNEL_BACKENDS} )
foreach( TILE_TYPE ${TILETYPES} )
configure_file( test-kernel-tilefixed.cpp.in
test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}.cpp )
raja_add_test( NAME test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}.cpp )
# OpenMPTarget crashes the xl compiler when building this test...
if( NOT((TILE_BACKEND STREQUAL "OpenMPTarget")) )
configure_file( test-kernel-tilefixed.cpp.in
test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}.cpp )
raja_add_test( NAME test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}.cpp )

target_include_directories(test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
target_include_directories(test-kernel-tile-${TILE_TYPE}-${TILE_BACKEND}.exe
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
endif()
endforeach()
endforeach()

Expand Down
7 changes: 7 additions & 0 deletions test/unit/workgroup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ if(RAJA_TEST_EXHAUSTIVE OR NOT RAJA_COMPILER MATCHES "RAJA_COMPILER_Intel")
set(Constructor_SUBTESTS Single)
buildunitworkgrouptest(Constructor "${Constructor_SUBTESTS}" "${DISPATCHERS}" "${BACKENDS}")

if(RAJA_ENABLE_TARGET_OPENMP)
# WorkGroup dispatcher for OpenMPTarget not implemented yet
list(REMOVE_ITEM BACKENDS OpenMPTarget)
endif()

set(Enqueue_SUBTESTS Single Multiple)
buildunitworkgrouptest(Enqueue "${Enqueue_SUBTESTS}" "${DISPATCHERS}" "${BACKENDS}")

Expand All @@ -70,10 +75,12 @@ if(RAJA_TEST_EXHAUSTIVE OR NOT RAJA_COMPILER MATCHES "RAJA_COMPILER_Intel")
endif()

set(Dispatcher_SUBTESTS Single)

if(RAJA_ENABLE_TARGET_OPENMP)
# WorkGroup dispatcher for OpenMPTarget not implemented yet
list(REMOVE_ITEM BACKENDS OpenMPTarget)
endif()

buildunitworkgrouptest(Dispatcher "${Dispatcher_SUBTESTS}" "${DISPATCHERS}" "${BACKENDS}")

set(WorkStorage_SUBTESTS Constructor Iterator InsertCall Multiple)
Expand Down