From 3b48aa4d4c871663a79df999890bc66127cf4934 Mon Sep 17 00:00:00 2001 From: Matt Sinclair Date: Thu, 21 Oct 2021 16:54:42 -0500 Subject: [PATCH] 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 Maintainer: Bobby R. Bruce Reviewed-by: Bobby R. Bruce Tested-by: kokoro --- tests/weekly.sh | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/weekly.sh b/tests/weekly.sh index 12793daced..c7ba7e6aef 100755 --- a/tests/weekly.sh +++ b/tests/weekly.sh @@ -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