Skip to content

Commit

Permalink
Trying to use srun and cleaned up composite actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDue committed Feb 18, 2023
1 parent 81ca1ab commit 6c4111f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
14 changes: 7 additions & 7 deletions .github/actions/benchmark/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
script:
description: 'Script to run'
required: true
slurm:
slurm-options:
description: 'Options to pass to srun'
required: false
default: ''
Expand All @@ -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
43 changes: 24 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -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
Expand Down Expand Up @@ -321,15 +321,15 @@ jobs:
source virtualenv/bin/activate
pip install jsonschema
- uses: ./.github/actions/slurm
- uses: ./.github/actions/futhark-slurm
with:
script: |
futhark test tests \
--backend=opencl \
--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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6c4111f

Please sign in to comment.