Kyle Roarty has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46240
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Matthew Poremba <matthew.pore...@amd.com>
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Reviewed-by: Bobby R. Bruce <bbr...@ucdavis.edu>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
---
M configs/example/hsaTopology.py
1 file changed, 15 insertions(+), 2 deletions(-)

Approvals:
  Matthew Poremba: Looks good to me, approved
  Matt Sinclair: Looks good to me, approved; Looks good to me, approved
  Bobby R. Bruce: Looks good to me, but someone else must approve
  kokoro: Regressions pass



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)



2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
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: 4
Gerrit-Owner: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Alex Dutu <alexandru.d...@amd.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
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