Matt Sinclair has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/51187 )

Change subject: tests: add DNNMark to weekly regression
......................................................................

tests: add DNNMark to weekly regression

DNNMark is representative of several simple (fast) layers within ML
applications, which are heavily used in modern GPU applications.  Thus,
we want to make sure support for these applications are tested.  This
commit updates the weekly regression to run three variants: fwd_softmax,
bwd_bn, and fwd_pool -- ensuring we test both inference and training as
well as a variety of ML layers.

Change-Id: I38bfa9bd3a2817099ece46afc2d6132ce346e21a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51187
Reviewed-by: Bobby R. Bruce <bbr...@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
---
M tests/weekly.sh
1 file changed, 103 insertions(+), 1 deletion(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/tests/weekly.sh b/tests/weekly.sh
index b697c29..c699f65 100755
--- a/tests/weekly.sh
+++ b/tests/weekly.sh
@@ -58,4 +58,86 @@

# LULESH is heavily used in the HPC community on GPUs, and does a good job of
 # stressing several GPU compute and memory components
-docker run --rm -v ${PWD}:${PWD} -w ${PWD} -u $UID:$GID gcr.io/gem5-test/gcn-gpu gem5/build/GCN3_X86/gem5.opt gem5/configs/example/apu_se.py -n3 --mem-size=8GB --benchmark-root=gem5-resources/src/gpu/lulesh/bin -clulesh
+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 \
+    configs/example/apu_se.py -n3 --mem-size=8GB -clulesh
+
+# get DNNMark
+# Delete gem5 resources repo if it already exists -- need to do in docker
+# because of cachefiles DNNMark creates
+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 the gem5 resources to the root of the gem5 directory -- 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"
+
+# setup cmake for DNNMark
+docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
+     "${gem5_root}/gem5-resources/src/gpu/DNNMark" \
+     gcr.io/gem5-test/gcn-gpu:latest bash -c "./setup.sh HIP"
+
+# make the DNNMark library
+docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
+    "${gem5_root}/gem5-resources/src/gpu/DNNMark/build" \
+    gcr.io/gem5-test/gcn-gpu:latest bash -c "make -j${threads}"
+
+# generate cachefiles -- since we are testing gfx801 and 4 CUs (default config)
+# in tester, we want cachefiles for this setup
+docker run --rm --volume "${gem5_root}":"${gem5_root}" -w \
+    "${gem5_root}/gem5-resources/src/gpu/DNNMark" \
+ "-v${gem5_root}/gem5-resources/src/gpu/DNNMark/cachefiles:/root/.cache/miopen/2.9.0" \
+    gcr.io/gem5-test/gcn-gpu:latest bash -c \
+    "python3 generate_cachefiles.py cachefiles.csv --gfx-version=gfx801 \
+    --num-cus=4"
+
+# generate mmap data for DNNMark (makes simulation much faster)
+docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
+ "${gem5_root}/gem5-resources/src/gpu/DNNMark" gcr.io/gem5-test/gcn-gpu:latest bash -c \
+    "g++ -std=c++0x generate_rand_data.cpp -o generate_rand_data"
+
+docker run --rm -u $UID:$GID --volume "${gem5_root}":"${gem5_root}" -w \
+ "${gem5_root}/gem5-resources/src/gpu/DNNMark" gcr.io/gem5-test/gcn-gpu:latest bash -c \
+    "./generate_rand_data"
+
+# now we can run DNNMark!
+# DNNMark is representative of several simple (fast) layers within ML
+# applications, which are heavily used in modern GPU applications. So, we want +# to make sure support for these applications are tested. Run three variants: +# fwd_softmax, bwd_bn, fwd_pool; these tests ensure we run a variety of ML kernels,
+# including both inference and training
+docker run --rm --volume "${gem5_root}":"${gem5_root}" -v \
+ "${gem5_root}/gem5-resources/src/gpu/DNNMark/cachefiles:/root/.cache/miopen/2.9.0" \ + -w "${gem5_root}/gem5-resources/src/gpu/DNNMark" gcr.io/gem5-test/gcn-gpu \ + "${gem5_root}/build/GCN3_X86/gem5.opt" "${gem5_root}/configs/example/apu_se.py" -n3 \ + --benchmark-root="${gem5_root}/gem5-resources/src/gpu/DNNMark/build/benchmarks/test_fwd_softmax" \
+       -cdnnmark_test_fwd_softmax \
+ --options="-config ${gem5_root}/gem5-resources/src/gpu/DNNMark/config_example/softmax_config.dnnmark \
+       -mmap ${gem5_root}/gem5-resources/src/gpu/DNNMark/mmap.bin"
+
+docker run --rm --volume "${gem5_root}":"${gem5_root}" -v \
+ "${gem5_root}/gem5-resources/src/gpu/DNNMark/cachefiles:/root/.cache/miopen/2.9.0" \ + -w "${gem5_root}/gem5-resources/src/gpu/DNNMark" gcr.io/gem5-test/gcn-gpu \ + "${gem5_root}/build/GCN3_X86/gem5.opt" "${gem5_root}/configs/example/apu_se.py" -n3 \ + --benchmark-root="${gem5_root}/gem5-resources/src/gpu/DNNMark/build/benchmarks/test_fwd_pool" \
+       -cdnnmark_test_fwd_pool \
+ --options="-config ${gem5_root}/gem5-resources/src/gpu/DNNMark/config_example/pool_config.dnnmark \
+       -mmap ${gem5_root}/gem5-resources/src/gpu/DNNMark/mmap.bin"
+
+docker run --rm --volume "${gem5_root}":"${gem5_root}" -v \
+ "${gem5_root}/gem5-resources/src/gpu/DNNMark/cachefiles:/root/.cache/miopen/2.9.0" \ + -w "${gem5_root}/gem5-resources/src/gpu/DNNMark" gcr.io/gem5-test/gcn-gpu \ + "${gem5_root}/build/GCN3_X86/gem5.opt" "${gem5_root}/configs/example/apu_se.py" -n3 \ + --benchmark-root="${gem5_root}/gem5-resources/src/gpu/DNNMark/build/benchmarks/test_bwd_bn" \
+       -cdnnmark_test_bwd_bn \
+ --options="-config ${gem5_root}/gem5-resources/src/gpu/DNNMark/config_example/bn_config.dnnmark \
+       -mmap ${gem5_root}/gem5-resources/src/gpu/DNNMark/mmap.bin"
+
+# Delete the gem5 resources repo we created -- need to do in docker because of
+# cachefiles DNNMark creates
+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"

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/51187
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I38bfa9bd3a2817099ece46afc2d6132ce346e21a
Gerrit-Change-Number: 51187
Gerrit-PatchSet: 6
Gerrit-Owner: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Alex Dutu <alexandru.d...@amd.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to