From 0f78b9ef2ac3304b1d075ef6092c9490033bee0f Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Tue, 13 Feb 2024 11:36:13 +0100 Subject: [PATCH 1/5] Bring back CI on OpenCL and HIP. A bit hacky, since the system with the MI100 is not properly part of any Slurm queue yet. --- .github/actions/is-slurm/action.yml | 2 +- .github/workflows/benchmark.yml | 56 ++++++++++----------- .github/workflows/main.yml | 76 ++++++++++++++--------------- 3 files changed, 67 insertions(+), 67 deletions(-) diff --git a/.github/actions/is-slurm/action.yml b/.github/actions/is-slurm/action.yml index 1d2f8e63da..1c5167b21e 100644 --- a/.github/actions/is-slurm/action.yml +++ b/.github/actions/is-slurm/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | printf '#!/bin/bash - if ! srun --version &> /dev/null; then + if ! srun --version &> /dev/null && $(hostname) != hendrixfut02fl.unicph.domain; then echo "is-slurm=false" else echo "is-slurm=true" diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 67c3377e53..6bb5052c0f 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -33,37 +33,37 @@ jobs: name: futhark-nightly-linux-x86_64.tar.xz path: result/futhark-nightly-linux-x86_64.tar.xz - # benchmark-MI100-opencl: - # runs-on: MI100 - # needs: [build-linux-nix] + benchmark-MI100-opencl: + runs-on: MI100 + needs: [build-linux-nix] - # env: - # TMPDIR: "/scratch" - # steps: - # - uses: actions/checkout@v3 - # with: - # submodules: recursive - # fetch-depth: 0 - # - uses: ./.github/actions/benchmark - # with: - # backend: opencl - # system: MI100 + env: + TMPDIR: "/scratch" + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - uses: ./.github/actions/benchmark + with: + backend: opencl + system: MI100 - # benchmark-MI100-hip: - # runs-on: MI100 - # needs: [build-linux-nix] + benchmark-MI100-hip: + runs-on: MI100 + needs: [build-linux-nix] - # env: - # TMPDIR: "/scratch" - # steps: - # - uses: actions/checkout@v3 - # with: - # submodules: recursive - # fetch-depth: 0 - # - uses: ./.github/actions/benchmark - # with: - # backend: hip - # system: MI100 + env: + TMPDIR: "/scratch" + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - uses: ./.github/actions/benchmark + with: + backend: hip + system: MI100 benchmark-A100: runs-on: hendrix diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e21829755..b9479f2bd0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -388,46 +388,46 @@ jobs: pip install numpy pyopencl jsonschema futhark test tests -c --no-terminal --backend=pyopencl --exclude=compiled --cache-extension=cache --pass-option=--build-option=-O0 --runner=tools/oclgrindrunner.sh - # test-opencl: - # runs-on: opencl - # needs: [build-linux-nix] - # if: github.repository == 'diku-dk/futhark' - # steps: - # - uses: actions/checkout@v3 + test-opencl: + runs-on: opencl + needs: [build-linux-nix] + if: github.repository == 'diku-dk/futhark' + steps: + - uses: actions/checkout@v3 - # - uses: ./.github/actions/futhark-slurm - # with: - # script: | - # set -e - # virtualenv virtualenv - # source virtualenv/bin/activate - # pip install jsonschema - # module unload cuda - # module load cuda/11.8 - # futhark test tests \ - # --backend=opencl \ - # --cache-extension=cache - # FUTHARK_BACKEND=opencl make -C tests_lib/c -j - # slurm-options: -p gpu --time=0-01:00:00 --gres=gpu:1 --job-name=fut-opencl-test --exclude=hendrixgpu05fl,hendrixgpu06fl - - # test-pyopencl: - # runs-on: opencl - # needs: [build-linux-nix] - # if: github.repository == 'diku-dk/futhark' - # steps: - # - uses: actions/checkout@v3 + - uses: ./.github/actions/futhark-slurm + with: + script: | + set -e + virtualenv virtualenv + source virtualenv/bin/activate + pip install jsonschema + module unload cuda + module load cuda/11.8 + futhark test tests \ + --backend=opencl \ + --cache-extension=cache + FUTHARK_BACKEND=opencl make -C tests_lib/c -j + slurm-options: -p gpu --time=0-01:00:00 --gres=gpu:1 --job-name=fut-opencl-test --exclude=hendrixgpu05fl,hendrixgpu06fl - # - uses: ./.github/actions/futhark-slurm - # with: - # script: | - # set -e - # virtualenv virtualenv - # source virtualenv/bin/activate - # pip install numpy pyopencl jsonschema - # module unload cuda - # module load cuda/11.8 - # futhark test tests --no-terminal --backend=pyopencl - # slurm-options: -p gpu --time=0-01:00:00 --gres=gpu:1 --job-name=fut-pyopencl-test --exclude=hendrixgpu05fl,hendrixgpu06fl + test-pyopencl: + runs-on: opencl + needs: [build-linux-nix] + if: github.repository == 'diku-dk/futhark' + steps: + - uses: actions/checkout@v3 + + - uses: ./.github/actions/futhark-slurm + with: + script: | + set -e + virtualenv virtualenv + source virtualenv/bin/activate + pip install numpy pyopencl jsonschema + module unload cuda + module load cuda/11.8 + futhark test tests --no-terminal --backend=pyopencl + slurm-options: -p gpu --time=0-01:00:00 --gres=gpu:1 --job-name=fut-pyopencl-test --exclude=hendrixgpu05fl,hendrixgpu06fl test-cuda: runs-on: cuda From d01ad5d6969626d9767d0d9e7ddcfefc709ef1b3 Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Tue, 13 Feb 2024 12:01:13 +0100 Subject: [PATCH 2/5] Also HIP. --- .github/workflows/main.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9479f2bd0..5986c7edcb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -453,25 +453,25 @@ jobs: FUTHARK_BACKEND=cuda make -C tests_lib/c -j slurm-options: -p gpu --time=0-01:00:00 --gres=gpu:a100:1 --job-name=fut-cuda-test - # test-hip: - # runs-on: MI100 - # needs: [build-linux-nix] - # if: github.repository == 'diku-dk/futhark' - # steps: - # - uses: actions/checkout@v3 + test-hip: + runs-on: MI100 + needs: [build-linux-nix] + if: github.repository == 'diku-dk/futhark' + steps: + - uses: actions/checkout@v3 - # - run: | - # virtualenv virtualenv - # source virtualenv/bin/activate - # pip install jsonschema + - run: | + virtualenv virtualenv + source virtualenv/bin/activate + pip install jsonschema - # - uses: ./.github/actions/futhark-slurm - # with: - # script: | - # set -e - # futhark test tests --no-terminal --backend=hip --concurrency=8 - # source virtualenv/bin/activate - # FUTHARK_BACKEND=hip make -C tests_lib/c -j + - uses: ./.github/actions/futhark-slurm + with: + script: | + set -e + futhark test tests --no-terminal --backend=hip --concurrency=8 + source virtualenv/bin/activate + FUTHARK_BACKEND=hip make -C tests_lib/c -j test-wasm: runs-on: ubuntu-22.04 From 16091fde02bd722be3a984b3c76b62c9aa11e917 Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Tue, 13 Feb 2024 13:22:37 +0100 Subject: [PATCH 3/5] Fix. --- .github/actions/is-slurm/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/is-slurm/action.yml b/.github/actions/is-slurm/action.yml index 1c5167b21e..8c2d0eb743 100644 --- a/.github/actions/is-slurm/action.yml +++ b/.github/actions/is-slurm/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | printf '#!/bin/bash - if ! srun --version &> /dev/null && $(hostname) != hendrixfut02fl.unicph.domain; then + if ! srun --version &> /dev/null || $(hostname) = hendrixfut02fl.unicph.domain; then echo "is-slurm=false" else echo "is-slurm=true" From e736e7d4202fde2a9be6435dec9711fb57bd8659 Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Tue, 13 Feb 2024 13:44:38 +0100 Subject: [PATCH 4/5] Fix again. --- .github/actions/is-slurm/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/is-slurm/action.yml b/.github/actions/is-slurm/action.yml index 8c2d0eb743..91f4c33333 100644 --- a/.github/actions/is-slurm/action.yml +++ b/.github/actions/is-slurm/action.yml @@ -14,7 +14,7 @@ runs: shell: bash run: | printf '#!/bin/bash - if ! srun --version &> /dev/null || $(hostname) = hendrixfut02fl.unicph.domain; then + if ! srun --version &> /dev/null || [ $(hostname) = hendrixfut02fl.unicph.domain ]; then echo "is-slurm=false" else echo "is-slurm=true" From ff2528a4be22918c0d55c44f8776fef6b224e4f8 Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Wed, 14 Feb 2024 12:51:52 +0100 Subject: [PATCH 5/5] These just need hendrix. --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5986c7edcb..98b5b22d0d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -389,7 +389,7 @@ jobs: futhark test tests -c --no-terminal --backend=pyopencl --exclude=compiled --cache-extension=cache --pass-option=--build-option=-O0 --runner=tools/oclgrindrunner.sh test-opencl: - runs-on: opencl + runs-on: hendrix needs: [build-linux-nix] if: github.repository == 'diku-dk/futhark' steps: @@ -411,7 +411,7 @@ jobs: slurm-options: -p gpu --time=0-01:00:00 --gres=gpu:1 --job-name=fut-opencl-test --exclude=hendrixgpu05fl,hendrixgpu06fl test-pyopencl: - runs-on: opencl + runs-on: hendrix needs: [build-linux-nix] if: github.repository == 'diku-dk/futhark' steps: