gpu-compute,tests: Move GPU tests to testlib (#1270)

A new host tag `gcn_gpu` has been added. This allows for selection of
those GPU tests which depend upon the gcn-gpu docker image to run.

In addition to this, the square GPU tests has been moved to the CI
tests. This ensures some GPU code is compiled and run on every PR.
This commit is contained in:
Bobby R. Bruce
2024-08-19 10:58:06 -07:00
committed by GitHub
parent b0d81ec8a2
commit f600db4a98
8 changed files with 255 additions and 97 deletions

View File

@@ -221,6 +221,32 @@ jobs:
path: tests/testing-results
retention-days: 30
gpu-tests:
runs-on: [self-hosted, linux, x64]
container: ghcr.io/gem5/gcn-gpu:latest
timeout-minutes: 180
needs: [pre-commit, check-for-change-id]
steps:
- uses: actions/checkout@v4
# Build the VEGA_X86/gem5.opt binary.
- name: Build VEGA_X86/gem5.opt
run: scons build/VEGA_X86/gem5.opt -j`nproc`
# Run the GPU tests.
- name: Run Testlib GPU Tests
working-directory: ${{ github.workspace }}/tests
run: ./main.py run --skip-build -vvv -t $(nproc) --host gcn_gpu gem5/gpu
# Upload the tests/testing-results directory as an artifact.
- name: Upload results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ci-tests-run-${{ github.run_number }}-attempt-${{ github.run_attempt }}-gpu-status-${{ steps.run-tests.outcome }}-output
path: tests/testing-results
retention-days: 30
ci-tests:
# It is 'testlib-quick' which needs to pass for the pull request to be
# merged. This job is a dummy job that depends on all the other jobs.
@@ -232,5 +258,6 @@ jobs:
- unittests-all-opt
- pre-commit
- check-for-change-id
- gpu-tests
steps:
- run: echo "This job's status is ${{ job.status }}."