tests: Add GPU ISA parameter to nightly/weekly
GCN3_X86 and VEGA_X86 can use the same test binaries to run tests for that build configuration. This adds an option to the nightly and weekly test scripts to select which GPU ISA to test. By default the GCN3_X86 ISA is tested which was previously the only test. No behavior is changed from current testing. Change-Id: Ifedcdea5d7c1c8e9994559a20aea5e1954180772 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54083 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Bobby Bruce
parent
c7689b0ddb
commit
c70403ed80
@@ -46,6 +46,18 @@ if [[ $# -gt 1 ]]; then
|
||||
run_threads=$2
|
||||
fi
|
||||
|
||||
# The third argument is the GPU ISA to run. If no argument is given we default
|
||||
# to GCN3_X86.
|
||||
gpu_isa=GCN3_X86
|
||||
if [[ $# -gt 2 ]]; then
|
||||
gpu_isa=$3
|
||||
fi
|
||||
|
||||
if [[ "$gpu_isa" != "GCN3_X86" ]] && [[ "$gpu_isa" != "VEGA_X86" ]]; then
|
||||
echo "Invalid GPU ISA: $gpu_isa"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build_target () {
|
||||
isa=$1
|
||||
|
||||
@@ -88,12 +100,12 @@ docker run -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
|
||||
./main.py run --length long -j${compile_threads} -t${run_threads} -vv
|
||||
|
||||
# Run the GPU tests.
|
||||
# For the GPU tests we compile and run GCN3_X86 inside a gcn-gpu container.
|
||||
# For the GPU tests we compile and run the GPU ISA inside a gcn-gpu container.
|
||||
docker pull gcr.io/gem5-test/gcn-gpu:latest
|
||||
docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
|
||||
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest bash -c \
|
||||
"scons build/GCN3_X86/gem5.opt -j${compile_threads} \
|
||||
|| (rm -rf build && scons build/GCN3_X86/gem5.opt -j${compile_threads})"
|
||||
"scons build/${gpu_isa}/gem5.opt -j${compile_threads} \
|
||||
|| (rm -rf build && scons build/${gpu_isa}/gem5.opt -j${compile_threads})"
|
||||
|
||||
# get square
|
||||
wget -qN http://dist.gem5.org/dist/develop/test-progs/square/square
|
||||
@@ -104,7 +116,7 @@ mkdir -p tests/testing-results
|
||||
# Thus, we always want to run this in the nightly regressions to make sure
|
||||
# basic GPU functionality is working.
|
||||
docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
|
||||
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt \
|
||||
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/${gpu_isa}/gem5.opt \
|
||||
configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c square
|
||||
|
||||
# get HeteroSync
|
||||
@@ -115,7 +127,7 @@ wget -qN http://dist.gem5.org/dist/develop/test-progs/heterosync/gcn3/allSyncPri
|
||||
# moderate contention case for the default 4 CU GPU config and help ensure GPU
|
||||
# atomics are tested.
|
||||
docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
|
||||
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt \
|
||||
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/${gpu_isa}/gem5.opt \
|
||||
configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c \
|
||||
allSyncPrims-1kernel --options="sleepMutex 10 16 4"
|
||||
|
||||
@@ -125,7 +137,7 @@ docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
|
||||
# moderate contention case for the default 4 CU GPU config and help ensure GPU
|
||||
# atomics are tested.
|
||||
docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
|
||||
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/GCN3_X86/gem5.opt \
|
||||
"${gem5_root}" gcr.io/gem5-test/gcn-gpu:latest build/${gpu_isa}/gem5.opt \
|
||||
configs/example/apu_se.py --reg-alloc-policy=dynamic -n3 -c \
|
||||
allSyncPrims-1kernel --options="lfTreeBarrUniq 10 16 4"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user