name: test on: push: jobs: build: runs-on: [slurm] strategy: matrix: &matrix include: - name: GNU, NVIDIA A4000 partition: defq gres: gpu:A4000 cmake_flags: "-DTRIGDX_USE_MKL=1 -DTRIGDX_USE_GPU=1 -DTRIGDX_USE_MKL=1 -DTRIGDX_USE_XSIMD=1 -DCMAKE_CUDA_ARCHITECTURES=86" environment_modules: "spack/20250403 intel-oneapi-mkl cuda python" - name: Intel, NVIDIA A4000 partition: defq gres: gpu:A4000 cmake_flags: "-DTRIGDX_USE_MKL=1 -DTRIGDX_USE_GPU=1 -DTRIGDX_USE_MKL=1 -DTRIGDX_USE_XSIMD=1 -DCMAKE_CUDA_ARCHITECTURES=86" environment_modules: "spack/20250403 intel-oneapi-compilers intel-oneapi-mkl cuda python" - name: NVIDIA GH200 partition: ghq gres: gpu:GH200 cmake_flags: "-DTRIGDX_USE_GPU=1 -DTRIGDX_USE_XSIMD=1 -DCMAKE_CUDA_ARCHITECTURES=90a -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc" env: DEVICE_NAME: ${{ matrix.name }} PARTITION_NAME: ${{ matrix.partition }} CMAKE_FLAGS: ${{ matrix.cmake_flags }} ENVIRONMENT_MODULES: ${{ matrix.environment_modules }} steps: - &cleanup name: "Remove old workspace" run: | rm -rf $GITHUB_WORKSPACE/* mkdir -p $GITHUB_WORKSPACE - uses: actions/checkout@v4 - uses: astron-rd/slurm-action@v1.2 with: partition: ${{ matrix.partition }} gres: ${{ matrix.gres }} commands: | module load ${ENVIRONMENT_MODULES} cmake -S . -B build ${CMAKE_FLAGS} make -C build -j - name: Upload build uses: pyTooling/upload-artifact@v4 with: name: build-${{ matrix.name }} path: build test: runs-on: [slurm] needs: build strategy: matrix: *matrix env: DEVICE_NAME: ${{ matrix.name }} PARTITION_NAME: ${{ matrix.partition }} steps: - *cleanup - uses: pyTooling/download-artifact@v4 with: name: build-${{ matrix.name }} - uses: astron-rd/slurm-action@v1.2 with: partition: ${{ matrix.partition }} gres: ${{ matrix.gres }} commands: | find tests -type f -executable -exec {} \; benchmark: runs-on: [slurm] needs: build strategy: matrix: *matrix env: DEVICE_NAME: ${{ matrix.name }} PARTITION_NAME: ${{ matrix.partition }} steps: - *cleanup - uses: pyTooling/download-artifact@v4 with: name: build-${{ matrix.name }} - uses: astron-rd/slurm-action@v1.2 with: partition: ${{ matrix.partition }} gres: ${{ matrix.gres }} commands: | ls -la ls -la benchmarks find benchmarks -type f -executable -exec {} \;