Matthew Poremba has uploaded this change for review. ( 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
---
M configs/example/ruby_gpu_random_test.py
1 file changed, 25 insertions(+), 7 deletions(-)



diff --git a/configs/example/ruby_gpu_random_test.py b/configs/example/ruby_gpu_random_test.py
index a5d9a49..be6d3f7 100644
--- a/configs/example/ruby_gpu_random_test.py
+++ b/configs/example/ruby_gpu_random_test.py
@@ -234,11 +234,15 @@
 #
 # 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
+else:
+    # If no DMAs, we do not need a piobus
+    system.piobus = None

 #
 # Create the Ruby system
@@ -250,7 +254,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 +280,8 @@
 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
+    if system.piobus is not None:
+        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: 1
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
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