python: Apply Black formatter to Python files

The command executed was `black src configs tests util`.

Change-Id: I8dfaa6ab04658fea37618127d6ac19270028d771
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47024
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2022-07-05 11:02:25 -07:00
committed by Giacomo Travaglini
parent 1cfaa8da83
commit 787204c92d
980 changed files with 35668 additions and 22233 deletions

View File

@@ -32,7 +32,8 @@ from m5.proxy import *
from m5.objects.TesterThread import TesterThread
class CpuThread(TesterThread):
type = 'CpuThread'
type = "CpuThread"
cxx_header = "cpu/testers/gpu_ruby_test/cpu_thread.hh"
cxx_class = 'gem5::CpuThread'
cxx_class = "gem5::CpuThread"

View File

@@ -32,7 +32,8 @@ from m5.proxy import *
from m5.objects.TesterThread import TesterThread
class DmaThread(TesterThread):
type = 'DmaThread'
type = "DmaThread"
cxx_header = "cpu/testers/gpu_ruby_test/dma_thread.hh"
cxx_class = 'gem5::DmaThread'
cxx_class = "gem5::DmaThread"

View File

@@ -32,9 +32,10 @@ from m5.proxy import *
from m5.objects.TesterThread import TesterThread
class GpuWavefront(TesterThread):
type = 'GpuWavefront'
type = "GpuWavefront"
cxx_header = "cpu/testers/gpu_ruby_test/gpu_wavefront.hh"
cxx_class = 'gem5::GpuWavefront'
cxx_class = "gem5::GpuWavefront"
cu_id = Param.Int("Compute Unit ID")

View File

@@ -31,10 +31,11 @@ from m5.objects.ClockedObject import ClockedObject
from m5.params import *
from m5.proxy import *
class ProtocolTester(ClockedObject):
type = 'ProtocolTester'
type = "ProtocolTester"
cxx_header = "cpu/testers/gpu_ruby_test/protocol_tester.hh"
cxx_class = 'gem5::ProtocolTester'
cxx_class = "gem5::ProtocolTester"
cpu_ports = VectorRequestPort("Ports for CPUs")
dma_ports = VectorRequestPort("Ports for DMAs")
@@ -49,23 +50,30 @@ class ProtocolTester(ClockedObject):
wavefronts_per_cu = Param.Int(1, "Number of wavefronts per CU")
workitems_per_wavefront = Param.Int(64, "Number of workitems per wf")
max_cu_tokens = Param.Int(4, "Maximum number of tokens, i.e., the number"
" of instructions that can be uncoalesced"
" before back-pressure occurs from the"
" coalescer.")
max_cu_tokens = Param.Int(
4,
"Maximum number of tokens, i.e., the number"
" of instructions that can be uncoalesced"
" before back-pressure occurs from the"
" coalescer.",
)
cpu_threads = VectorParam.CpuThread("All cpus")
dma_threads = VectorParam.DmaThread("All DMAs")
wavefronts = VectorParam.GpuWavefront("All wavefronts")
num_atomic_locations = Param.Int(2, "Number of atomic locations")
num_normal_locs_per_atomic = Param.Int(1000, \
"Number of normal locations per atomic")
num_normal_locs_per_atomic = Param.Int(
1000, "Number of normal locations per atomic"
)
episode_length = Param.Int(10, "Number of actions per episode")
max_num_episodes = Param.Int(20, "Maximum number of episodes")
debug_tester = Param.Bool(False, "Are we debugging the tester?")
random_seed = Param.Int(0, "Random seed number. Default value (0) means \
using runtime-specific value.")
random_seed = Param.Int(
0,
"Random seed number. Default value (0) means \
using runtime-specific value.",
)
log_file = Param.String("Log file's name")
system = Param.System(Parent.any, "System we belong to")

View File

@@ -29,7 +29,8 @@
from m5.objects.Device import DmaDevice
class TesterDma(DmaDevice):
type = 'TesterDma'
type = "TesterDma"
cxx_header = "cpu/testers/gpu_ruby_test/tester_dma.hh"
cxx_class = 'gem5::TesterDma'
cxx_class = "gem5::TesterDma"

View File

@@ -31,11 +31,12 @@ from m5.objects.ClockedObject import ClockedObject
from m5.params import *
from m5.proxy import *
class TesterThread(ClockedObject):
type = 'TesterThread'
type = "TesterThread"
abstract = True
cxx_header = "cpu/testers/gpu_ruby_test/tester_thread.hh"
cxx_class = 'gem5::TesterThread'
cxx_class = "gem5::TesterThread"
thread_id = Param.Int("Unique TesterThread ID")
num_lanes = Param.Int("Number of lanes this thread has")