Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/56451 )

Change subject: configs: Allow for no DMAs in Ruby GPU tester
......................................................................

configs: Allow for no DMAs in Ruby GPU tester

If there are no DMA devices, we should not create any tester threads,
sequencers, or an IO crossbar.

Change-Id: I5762a70a064df5310e3f30d41bffc7800b53eb0b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56451
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M configs/example/ruby_gpu_random_test.py
1 file changed, 28 insertions(+), 7 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/configs/example/ruby_gpu_random_test.py b/configs/example/ruby_gpu_random_test.py
index a5d9a49..0763454 100644
--- a/configs/example/ruby_gpu_random_test.py
+++ b/configs/example/ruby_gpu_random_test.py
@@ -234,11 +234,12 @@
 #
 # Make generic DMA sequencer for Ruby to use
 #
-dma_devices = [TesterDma()] * n_DMAs
-system.piobus = IOXBar()
-for _, dma_device in enumerate(dma_devices):
-    dma_device.pio = system.piobus.mem_side_ports
-system.dma_devices = dma_devices
+if n_DMAs > 0:
+    dma_devices = [TesterDma()] * n_DMAs
+    system.piobus = IOXBar()
+    for _, dma_device in enumerate(dma_devices):
+        dma_device.pio = system.piobus.mem_side_ports
+    system.dma_devices = dma_devices

 #
 # Create the Ruby system
@@ -250,7 +251,8 @@
 # size of system.cpu
 cpu_list = [ system.cpu ] * args.num_cpus
 Ruby.create_system(args, full_system = False,
-                   system = system, dma_ports = system.dma_devices,
+                   system = system,
+                   dma_ports = system.dma_devices if n_DMAs > 0 else [],
                    cpus = cpu_list)

 #
@@ -275,7 +277,10 @@
 for i, ruby_port in enumerate(system.ruby._cpu_ports):
     ruby_port.no_retry_on_stall = True
     ruby_port.using_ruby_tester = True
-    ruby_port.mem_request_port = system.piobus.cpu_side_ports
+
+    # piobus is only created if there are DMAs
+    if n_DMAs > 0:
+        ruby_port.mem_request_port = system.piobus.cpu_side_ports

     if i < n_CUs:
         tester.cu_vector_ports = ruby_port.in_ports

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/56451
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: I5762a70a064df5310e3f30d41bffc7800b53eb0b
Gerrit-Change-Number: 56451
Gerrit-PatchSet: 3
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.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