From 9f6800e530535be6463b8f36e795b8577aad5c21 Mon Sep 17 00:00:00 2001 From: Matt Sinclair Date: Sun, 13 Mar 2022 19:29:38 -0500 Subject: [PATCH] tests,configs,mem-ruby: Handle num DMAs in GPU Ruby tester Currently the GPU Ruby tester does not support requests returned as aliased. To get around this, the GPU Ruby tester needs numDMAs to be 0. To enable this, change the default value to allow us to identify when a user wants more DMAs. Change-Id: I0a31f66c831f0379544c15bd7364f185e1edb1b2 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57535 Maintainer: Matt Sinclair Tested-by: kokoro Reviewed-by: Matthew Poremba --- configs/example/ruby_gpu_random_test.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/configs/example/ruby_gpu_random_test.py b/configs/example/ruby_gpu_random_test.py index 0763454b41..029a97d42c 100644 --- a/configs/example/ruby_gpu_random_test.py +++ b/configs/example/ruby_gpu_random_test.py @@ -79,7 +79,7 @@ parser.add_argument("--random-seed", type=int, default=0, help="Random seed number. Default value (i.e., 0) means \ using runtime-specific value") parser.add_argument("--log-file", type=str, default="gpu-ruby-test.log") -parser.add_argument("--num-dmas", type=int, default=0, +parser.add_argument("--num-dmas", type=int, default=None, help="The number of DMA engines to use in tester config.") args = parser.parse_args() @@ -108,7 +108,7 @@ if (args.system_size == "small"): args.wf_size = 1 args.wavefronts_per_cu = 1 args.num_cpus = 1 - args.num_dmas = 1 + n_DMAs = 1 args.cu_per_sqc = 1 args.cu_per_scalar_cache = 1 args.num_compute_units = 1 @@ -117,7 +117,7 @@ elif (args.system_size == "medium"): args.wf_size = 16 args.wavefronts_per_cu = 4 args.num_cpus = 4 - args.num_dmas = 2 + n_DMAs = 2 args.cu_per_sqc = 4 args.cu_per_scalar_cache = 4 args.num_compute_units = 4 @@ -126,11 +126,19 @@ elif (args.system_size == "large"): args.wf_size = 32 args.wavefronts_per_cu = 4 args.num_cpus = 4 - args.num_dmas = 4 + n_DMAs = 4 args.cu_per_sqc = 4 args.cu_per_scalar_cache = 4 args.num_compute_units = 8 +# Number of DMA engines +if not(args.num_dmas is None): + n_DMAs = args.num_dmas + # currently the tester does not support requests returned as + # aliased, thus we need num_dmas to be 0 for it + if not(args.num_dmas == 0): + print("WARNING: num_dmas != 0 not supported with VIPER") + # # Set address range - 2 options # level 0: small @@ -173,9 +181,6 @@ tester_deadlock_threshold = 1e9 # For now we're testing only GPU protocol, so we force num_cpus to be 0 args.num_cpus = 0 -# Number of DMA engines -n_DMAs = args.num_dmas - # Number of CUs n_CUs = args.num_compute_units