Kyle Roarty has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/46240 )
Change subject: configs: Add mem_banks to Carrizo topology
......................................................................
configs: Add mem_banks to Carrizo topology
ROCm 4 iterates through the mem_banks to find an appropriate place to
allocate memory. Previously, Carrizo didn't have any mem_banks, which
resulted in the ROCm 4 runtime erroring out, as it didn't know where to
allocate memory.
The implementation is fairly similar to the implementation used for the
Fiji or Vega configs
Change-Id: I5bb4e89657d44c6cb690fd224ee1bf1d4d6cf2a5
---
M configs/example/hsaTopology.py
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/configs/example/hsaTopology.py b/configs/example/hsaTopology.py
index 51585de..78fe1f7 100644
--- a/configs/example/hsaTopology.py
+++ b/configs/example/hsaTopology.py
@@ -36,7 +36,7 @@
from os.path import join as joinpath
from os.path import isdir
from shutil import rmtree, copyfile
-from m5.util.convert import toFrequency
+from m5.util.convert import toFrequency, toMemorySize
def file_append(path, contents):
with open(joinpath(*path), 'a') as f:
@@ -422,12 +422,14 @@
# must have marketing name
file_append((node_dir, 'name'), 'Carrizo\n')
+ mem_banks_cnt = 1
+
# populate global node properties
# NOTE: SIMD count triggers a valid GPU agent creation
node_prop = 'cpu_cores_count %s\n' %
options.num_cpus + \
'simd_count %s\n'
\
% (options.num_compute_units *
options.simds_per_cu) + \
- 'mem_banks_count
0\n' + \
+ 'mem_banks_count %s\n' %
mem_banks_cnt + \
'caches_count
0\n' + \
'io_links_count
0\n' + \
'cpu_core_id_base
16\n' + \
@@ -453,3 +455,14 @@
% int(toFrequency(options.CPUClock) / 1e6)
file_append((node_dir, 'properties'), node_prop)
+
+ for i in range(mem_banks_cnt):
+ mem_dir = joinpath(node_dir, f'mem_banks/{i}')
+ remake_dir(mem_dir)
+
+ mem_prop = f'heap_type
0\n' + \
+ f'size_in_bytes
{toMemorySize(options.mem_size)}' + \
+ f'flags
0\n' + \
+ f'width
64\n' + \
+ f'mem_clk_max 1600\n'
+ file_append((mem_dir, 'properties'), mem_prop)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46240
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: I5bb4e89657d44c6cb690fd224ee1bf1d4d6cf2a5
Gerrit-Change-Number: 46240
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty <kyleroarty1...@gmail.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