Hello Tuan Ta,

I'd like you to do a code review. Please visit

    https://gem5-review.googlesource.com/c/public/gem5/+/32857

to review the following change.


Change subject: config: fix python compatibility issue in viper_ruby_test
......................................................................

config: fix python compatibility issue in viper_ruby_test

Change-Id: Icf2de2532eecdfe61407440d6e6ca220cf517ed9
---
M configs/example/viper_ruby_test.py
1 file changed, 14 insertions(+), 14 deletions(-)



diff --git a/configs/example/viper_ruby_test.py b/configs/example/viper_ruby_test.py
index edaf324..1c2e4ba 100644
--- a/configs/example/viper_ruby_test.py
+++ b/configs/example/viper_ruby_test.py
@@ -137,7 +137,7 @@
     options.tcc_size="1024kB"
     options.tcc_assoc=16
 else:
- print "Error: option cache_size '%s' not recognized" % options.cache_size + print("Error: option cache_size '%s' not recognized", options.cache_size)
      sys.exit(1)

 #
@@ -168,8 +168,7 @@
     options.cu_per_scalar_cache = 4
     options.num_compute_units = 8
 else:
-    print "Error: option system size '%s' not recognized" \
-                % options.system_size
+ print("Error: option system size '%s' not recognized", options.system_size)
     sys.exit(1)

 #
@@ -185,8 +184,8 @@
     num_atomic_locs = 100
     num_regular_locs_per_atomic_loc = 100000
 elif (options.address_range != 0):
-    print "Error: option address_range '%s' not recognized" \
-            % options.address_range
+    print("Error: option address_range '%s' not recognized", \
+              options.address_range)
     sys.exit(1)

 #
@@ -201,8 +200,8 @@
 elif (options.episode_length == 2):
     eps_length = 500
 elif (options.episode_length != 0):
-    print "Error: option episode_length '%s' not recognized" \
-            % options.episode_length
+    print("Error: option episode_length '%s' not recognized",
+              options.episode_length)
     sys.exit(1)

 # set the Ruby's and tester's deadlock thresholds
@@ -239,7 +238,7 @@
     options.cu_per_scalar_cache = 0

 if args:
-     print "Error: script doesn't take any positional arguments"
+     print("Error: script doesn't take any positional arguments")
      sys.exit(1)

 #
@@ -298,11 +297,11 @@
 #               sqc_sequencers,
 #               scalar_sequencers
 #
-print "Attaching ruby ports to the tester"
+print("Attaching ruby ports to the tester")
 i = 0
 for ruby_port in system.ruby._cpu_ports:
     ruby_port.no_retry_on_stall = True
-    ruby_port.using_ruby_tester = False
+    ruby_port.using_ruby_tester = True

     if i < n_CPUs:
         tester.cpu_ports = ruby_port.slave
@@ -322,7 +321,7 @@
                               voltage_domain = system.voltage_domain)

 cpu_threads = []
-print "Creating %i CpuThreads" % (n_CPUs)
+print("Creating %i CpuThreads" % n_CPUs)
 for cpu_idx in range(n_CPUs):
     cpu_threads.append(CpuThread(thread_id = cpu_idx,
                                  num_lanes = 1,     # CPU thread is scalar
@@ -336,8 +335,8 @@
 #
 wavefronts = []
 g_thread_idx = n_CPUs
-print "Creating %i WFs attached to %i CUs" % \
-                (n_CUs * tester.wavefronts_per_cu, n_CUs)
+print("Creating %i WFs attached to %i CUs" % \
+                (n_CUs * tester.wavefronts_per_cu, n_CUs))
 for cu_idx in range(n_CUs):
     for wf_idx in range(tester.wavefronts_per_cu):
         wavefronts.append(GpuWavefront(thread_id = g_thread_idx,
@@ -364,4 +363,5 @@
 # simulate until program terminates
 exit_event = m5.simulate(options.abs_max_tick)

-print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()
+print('Exiting tick: ', m5.curTick())
+print('Exiting because ', exit_event.getCause())

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32857
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: Icf2de2532eecdfe61407440d6e6ca220cf517ed9
Gerrit-Change-Number: 32857
Gerrit-PatchSet: 1
Gerrit-Owner: Bradford Beckmann <[email protected]>
Gerrit-Reviewer: Tuan Ta <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to