diff --git a/.github/actions/benchmark/action.yml b/.github/actions/benchmark/action.yml index 49878cdf99..b2a923f81f 100644 --- a/.github/actions/benchmark/action.yml +++ b/.github/actions/benchmark/action.yml @@ -15,10 +15,6 @@ inputs: description: 'Options to pass to srun' required: false default: '' - gpu: - description: 'The GPU and numbers of GPUs to use' - required: false - default: '1' runs: using: "composite" steps: @@ -28,11 +24,15 @@ runs: cd futhark-benchmarks ./get-data.sh external-data.txt - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | - futhark bench futhark-benchmarks --backend ${{inputs.backend}} --exclude no_${{inputs.system}} --json futhark-${{inputs.backend}}-${{inputs.system}}-$GITHUB_SHA.json --ignore-files /lib/ ${{inputs.futhark-options}} - slurm: -p gpu --gres=gpu:${{inputs.gpu}} ${{inputs.slurm-options}} + futhark bench futhark-benchmarks \ + --backend ${{inputs.backend}} \ + --exclude no_${{inputs.system}} \ + --json futhark-${{inputs.backend}}-${{inputs.system}}-$GITHUB_SHA.json \ + --ignore-files /lib/ ${{inputs.futhark-options}} + slurm-options: ${{inputs.slurm-options}} - uses: actions/upload-artifact@v1 with: diff --git a/.github/actions/slurm/action.yml b/.github/actions/futhark-slurm/action.yml similarity index 85% rename from .github/actions/slurm/action.yml rename to .github/actions/futhark-slurm/action.yml index d941262ef7..901d6ef5c3 100644 --- a/.github/actions/slurm/action.yml +++ b/.github/actions/futhark-slurm/action.yml @@ -4,7 +4,7 @@ inputs: script: description: 'Script to run' required: true - slurm: + slurm-options: description: 'Options to pass to srun' required: false default: '' @@ -28,16 +28,13 @@ runs: - if: steps.slurm.outputs.is-slurm == 'false' shell: bash run: | - printf "#!/bin/bash - ${{inputs.script}}" | sh + ${{inputs.script}} - if: steps.slurm.outputs.is-slurm == 'true' shell: bash run: | printf '#!/bin/bash - #SBATCH --wait --output=/dev/fd/1 ${{inputs.slurm}} - ${{inputs.script}}' > temp.sh chmod +x temp.sh - sbatch temp.sh + srun ${{inputs.slurm-options}} temp.sh rm temp.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a8792dcb3e..b1d54a0814 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -191,11 +191,11 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | futhark test -i tests - slurm: --cpus-per-task=2 + slurm-options: --cpus-per-task=2 test-c: runs-on: hendrix @@ -209,12 +209,12 @@ jobs: pip install jsonschema export CFLAGS="-fsanitize=undefined -fsanitize=address -fno-sanitize-recover -O" - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | futhark test tests -c --backend=c --no-tuning make -C tests_lib/c -j - slurm: --cpus-per-task=2 + slurm-options: --cpus-per-task=2 test-multicore: runs-on: hendrix @@ -228,12 +228,12 @@ jobs: pip install jsonschema export CFLAGS="-fsanitize=undefined -fsanitize=address -fno-sanitize-recover -O" - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | futhark test tests -c --backend=multicore --no-tuning make -C tests_lib/c FUTHARK_BACKEND=multicore - slurm: --cpus-per-task=2 + slurm-options: --cpus-per-task=2 test-ispc: runs-on: ubuntu-22.04 @@ -276,7 +276,7 @@ jobs: module load python/3.9.9 pip install numpy - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | futhark test tests \ @@ -286,7 +286,7 @@ jobs: --exclude=no_python \ --exclude=compiled make -C tests_lib/python -j - slurm: --cpus-per-task=2 + slurm-options: --cpus-per-task=2 test-oclgrind: runs-on: ubuntu-22.04 @@ -321,7 +321,7 @@ jobs: source virtualenv/bin/activate pip install jsonschema - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | futhark test tests \ @@ -329,7 +329,7 @@ jobs: --cache-extension=cache source virtualenv/bin/activate FUTHARK_BACKEND=opencl make -C tests_lib/c -j - slurm: -p gpu --gres=gpu:1 + slurm-options: -p gpu --gres=gpu:1 test-pyopencl: runs-on: hendrix @@ -344,12 +344,12 @@ jobs: source virtualenv/bin/activate pip install numpy pyopencl jsonschema - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | source virtualenv/bin/activate futhark test tests --no-terminal --backend=pyopencl - slurm: -p gpu --gres=gpu:1 + slurm-options: -p gpu --gres=gpu:1 test-cuda: runs-on: hendrix @@ -364,13 +364,13 @@ jobs: source virtualenv/bin/activate pip install jsonschema - - uses: ./.github/actions/slurm + - uses: ./.github/actions/futhark-slurm with: script: | futhark test tests --no-terminal --backend=cuda source virtualenv/bin/activate FUTHARK_BACKEND=cuda make -C tests_lib/c -j - slurm: -p gpu --gres=gpu:1 + slurm-options: -p gpu --gres=gpu:1 test-wasm: runs-on: ubuntu-22.04 @@ -402,7 +402,12 @@ jobs: run: | node --version export EMCFLAGS="-sINITIAL_MEMORY=2147418112 -O1" # 2gb - 64kb... largest value of memory - futhark test -c --backend=wasm --runner=./tools/node-simd.sh --no-tuning --exclude=no_wasm tests + futhark test \ + -c \ + --backend=wasm \ + --runner=./tools/node-simd.sh \ + --no-tuning \ + --exclude=no_wasm tests test-wasm-multicore: runs-on: ubuntu-22.04 @@ -593,7 +598,7 @@ jobs: with: backend: cuda system: titanx - gpu: titanx:1 + slurm-options: -p gpu --gres=gpu:titanx:1 futhark-options: --exclude=mem_16gb benchmark-titanx-opencl: @@ -609,7 +614,7 @@ jobs: with: backend: opencl system: titanx - gpu: titanx:1 + slurm-options: -p gpu --gres=gpu:titanx:1 futhark-options: --exclude=mem_16gb benchmark-titanrtx-cuda: @@ -625,7 +630,7 @@ jobs: with: backend: cuda system: titanrtx - gpu: titanrtx:1 + slurm-options: -p gpu --gres=gpu:titanrtx:1 benchmark-titanrtx-opencl: runs-on: hendrix @@ -640,7 +645,7 @@ jobs: with: backend: opencl system: titanrtx - gpu: titanrtx:1 + slurm-options: -p gpu --gres=gpu:titanrtx:1 benchmark-results: runs-on: ubuntu-22.04