Matthew Poremba has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/70038?usp=email )
Change subject: dev-amdgpu,configs: Add human readable names for different
GPUs
......................................................................
dev-amdgpu,configs: Add human readable names for different GPUs
Add a human readable string for GPU device names rather than using the
device ID in the code. This is intended to make code more readable.
Change-Id: Id3ea74ca37422b1f4a0f09e5a9522d37b5998c1a
---
M configs/example/gpufs/runfs.py
M configs/example/gpufs/system/amdgpu.py
M src/dev/amdgpu/AMDGPU.py
3 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py
index 52b79ab..efea26b 100644
--- a/configs/example/gpufs/runfs.py
+++ b/configs/example/gpufs/runfs.py
@@ -126,6 +126,13 @@
help="type of memory to use",
)
+ parser.add_argument(
+ "--gpu-device",
+ default="Vega10",
+ choices=["Vega10", "MI100"],
+ help="GPU model to run: Vega10 (gfx900) or MI100 (gfx908)",
+ )
+
def runGpuFSSystem(args):
"""
diff --git a/configs/example/gpufs/system/amdgpu.py
b/configs/example/gpufs/system/amdgpu.py
index 1fd3e2f..5f98b55 100644
--- a/configs/example/gpufs/system/amdgpu.py
+++ b/configs/example/gpufs/system/amdgpu.py
@@ -170,3 +170,14 @@
system.pc.south_bridge.gpu.checkpoint_before_mmios = (
args.checkpoint_before_mmios
)
+
+ system.pc.south_bridge.gpu.device_name = args.gpu_device
+
+ if args.gpu_device == "MI100":
+ system.pc.south_bridge.gpu.DeviceID = 0x738C
+ system.pc.south_bridge.gpu.SubsystemVendorID = 0x1002
+ system.pc.south_bridge.gpu.SubsystemID = 0x0C34
+ elif args.gpu_device == "Vega10":
+ system.pc.south_bridge.gpu.DeviceID = 0x6863
+ else:
+ panic("Unknown GPU device: {}".format(args.gpu_device))
diff --git a/src/dev/amdgpu/AMDGPU.py b/src/dev/amdgpu/AMDGPU.py
index f9d953f..1e78672 100644
--- a/src/dev/amdgpu/AMDGPU.py
+++ b/src/dev/amdgpu/AMDGPU.py
@@ -46,6 +46,9 @@
cxx_header = "dev/amdgpu/amdgpu_device.hh"
cxx_class = "gem5::AMDGPUDevice"
+ # Human readable name for device ID
+ device_name = Param.String("Vega10", "Codename for device")
+
# IDs for AMD Vega 10
VendorID = 0x1002
DeviceID = 0x6863
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/70038?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-MessageType: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id3ea74ca37422b1f4a0f09e5a9522d37b5998c1a
Gerrit-Change-Number: 70038
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org