tests: fix bug in weekly regression

66a056b8 changed the weekly regression to use a single docker for
all GPU tests, to reduce how many times gem5 needed to be compiled.
However, in my local testing of that patch, gem5-resources was not
deleted until after the docker was created -- which causes a problem
when gem5-resources does not exist already from a prior run, since
the creation of the dockerfile requires it for HACC.  This commit
fixes this problem by moving the pull of gem5-resources to be before
anything else related to the GPU happens.

Change-Id: I006860204d03807d95628aa5dcf6e82d202fef9c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51907
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Matt Sinclair
2021-10-21 16:54:42 -05:00
parent d2a684c5bd
commit 3b48aa4d4c

View File

@@ -44,6 +44,20 @@ docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
"${gem5_root}"/tests --rm gcr.io/gem5-test/ubuntu-20.04_all-dependencies \
./main.py run --length very-long -j${threads} -t${threads}
# before pulling gem5 resources, make sure it doesn't exist already
docker run --rm --volume "${gem5_root}":"${gem5_root}" -w \
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest bash -c \
"rm -rf ${gem5_root}/gem5-resources"
# Pull gem5 resources to the root of the gem5 directory -- currently the
# pre-built binares for LULESH are out-of-date and won't run correctly with
# ROCm 4.0. In the meantime, we can build the binary as part of this script.
# Moreover, DNNMark builds a library and thus doesn't have a binary, so we
# need to build it before we run it.
# Need to pull this first because HACC's docker requires this path to exist
git clone -b develop https://gem5.googlesource.com/public/gem5-resources \
"${gem5_root}/gem5-resources"
# For the GPU tests we compile and run GCN3_X86 inside a gcn-gpu container.
# HACC requires setting numerous environment variables to run correctly. To
# avoid needing to set all of these, we instead build a docker for it, which
@@ -57,20 +71,7 @@ docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
"scons build/GCN3_X86/gem5.opt -j${threads} \
|| rm -rf build && scons build/GCN3_X86/gem5.opt -j${threads}"
# before pulling gem5 resources, make sure it doesn't exist already
docker run --rm --volume "${gem5_root}":"${gem5_root}" -w \
"${gem5_root}" hacc-test-weekly bash -c \
"rm -rf ${gem5_root}/gem5-resources"
# test LULESH
# Pull gem5 resources to the root of the gem5 directory -- currently the
# pre-built binares for LULESH are out-of-date and won't run correctly with
# ROCm 4.0. In the meantime, we can build the binary as part of this script.
# Moreover, DNNMark builds a library and thus doesn't have a binary, so we
# need to build it before we run it.
git clone -b develop https://gem5.googlesource.com/public/gem5-resources \
"${gem5_root}/gem5-resources"
mkdir -p tests/testing-results
# build LULESH