configs,gpu-compute: Fixes to connect gmTokenPort

When the TokenPort was moved from the GCN3 staging branch to develop the
TokenPort was changed from being the port connecting the ComputeUnit to
Ruby's vector memory port to a sideband port which inhibits requests to
Ruby's vector memory port. As such, it needs to be explicitly connected
as a new port. This changes the getPort method in ComputeUnit to be
aware of the port as well as modifying the example config to connect to
TCPs.

The iteration to connect in the config file was modified since it was
not properly connecting to TCPs each time and Ruby.py does not
explicitly return a list of each MachineType.

Change-Id: Ia70a6756b2af54d95e94d19bec5d8aadd3c2d5c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35096
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Matthew Poremba
2020-09-25 10:04:38 -07:00
parent 8eaae6bc20
commit 53807c8276
2 changed files with 12 additions and 2 deletions

View File

@@ -566,6 +566,16 @@ gpu_port_idx = len(system.ruby._cpu_ports) \
- options.num_scalar_cache
gpu_port_idx = gpu_port_idx - options.num_cp * 2
# Connect token ports. For this we need to search through the list of all
# sequencers, since the TCP coalescers will not necessarily be first. Only
# TCP coalescers use a token port for back pressure.
token_port_idx = 0
for i in range(len(system.ruby._cpu_ports)):
if isinstance(system.ruby._cpu_ports[i], VIPERCoalescer):
system.cpu[shader_idx].CUs[token_port_idx].gmTokenPort = \
system.ruby._cpu_ports[i].gmTokenPort
token_port_idx += 1
wavefront_size = options.wf_size
for i in range(n_cu):
# The pipeline issues wavefront_size number of uncoalesced requests
@@ -573,8 +583,6 @@ for i in range(n_cu):
for j in range(wavefront_size):
system.cpu[shader_idx].CUs[i].memory_port[j] = \
system.ruby._cpu_ports[gpu_port_idx].slave[j]
system.cpu[shader_idx].CUs[i].gmTokenPort = \
system.ruby._cpu_ports[gpu_port_idx].gmTokenPort
gpu_port_idx += 1
for i in range(n_cu):

View File

@@ -1015,6 +1015,8 @@ class ComputeUnit : public ClockedObject
return sqcTLBPort;
} else if (if_name == "ldsPort") {
return ldsPort;
} else if (if_name == "gmTokenPort") {
return gmTokenPort;
} else {
return ClockedObject::getPort(if_name, idx);
}