gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: configs: Add simple check for valid GPU MMIO trace

MP
Matthew Poremba (Gerrit)
Sat, Apr 22, 2023 12:48 AM

Matthew Poremba has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/69978?usp=email )

Change subject: configs: Add simple check for valid GPU MMIO trace
......................................................................

configs: Add simple check for valid GPU MMIO trace

This file is a required input to the simulator for GPUFS. There seems to
be confusion from several users who are not providing this input. This
usually results in the amdgpu driver failing to load, leading to the
application under test exiting along with it.

This changeset adds a simple md5 hashsum check to compare against the
known good MMIO trace located in the gem5-resources repository.

Change-Id: I59819fc795a6bc4bc6badbd4d120db1246498987
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69978
Tested-by: kokoro noreply+kokoro@google.com
Reviewed-by: Matt Sinclair mattdsinclair@gmail.com
Maintainer: Matt Sinclair mattdsinclair@gmail.com

M configs/example/gpufs/runfs.py
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py
index 4a28068a..52b79ab 100644
--- a/configs/example/gpufs/runfs.py
+++ b/configs/example/gpufs/runfs.py
@@ -30,6 +30,7 @@

System includes

import argparse
import math
+import hashlib

gem5 related

import m5
@@ -145,6 +146,11 @@
math.ceil(float(n_cu) / args.cu_per_scalar_cache)
)

  • Verify MMIO trace is valid

  • mmio_md5 =
    hashlib.md5(open(args.gpu_mmio_trace, "rb").read()).hexdigest()
  • if mmio_md5 != "c4ff3326ae8a036e329b8b595c83bd6d":
  •    m5.util.panic("MMIO file does not match gem5 resources")
    
  • system = makeGpuFSSystem(args)
    
    root = Root(
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69978?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I59819fc795a6bc4bc6badbd4d120db1246498987
Gerrit-Change-Number: 69978
Gerrit-PatchSet: 2
Gerrit-Owner: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: Jason Lowe-Power jason@lowepower.com
Gerrit-Reviewer: Matt Sinclair mattdsinclair@gmail.com
Gerrit-Reviewer: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com

Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/69978?usp=email ) Change subject: configs: Add simple check for valid GPU MMIO trace ...................................................................... configs: Add simple check for valid GPU MMIO trace This file is a required input to the simulator for GPUFS. There seems to be confusion from several users who are not providing this input. This usually results in the amdgpu driver failing to load, leading to the application under test exiting along with it. This changeset adds a simple md5 hashsum check to compare against the known good MMIO trace located in the gem5-resources repository. Change-Id: I59819fc795a6bc4bc6badbd4d120db1246498987 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69978 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> --- M configs/example/gpufs/runfs.py 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Matt Sinclair: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index 4a28068a..52b79ab 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -30,6 +30,7 @@ # System includes import argparse import math +import hashlib # gem5 related import m5 @@ -145,6 +146,11 @@ math.ceil(float(n_cu) / args.cu_per_scalar_cache) ) + # Verify MMIO trace is valid + mmio_md5 = hashlib.md5(open(args.gpu_mmio_trace, "rb").read()).hexdigest() + if mmio_md5 != "c4ff3326ae8a036e329b8b595c83bd6d": + m5.util.panic("MMIO file does not match gem5 resources") + system = makeGpuFSSystem(args) root = Root( -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69978?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I59819fc795a6bc4bc6badbd4d120db1246498987 Gerrit-Change-Number: 69978 Gerrit-PatchSet: 2 Gerrit-Owner: Matthew Poremba <matthew.poremba@amd.com> Gerrit-Reviewer: Jason Lowe-Power <jason@lowepower.com> Gerrit-Reviewer: Matt Sinclair <mattdsinclair@gmail.com> Gerrit-Reviewer: Matthew Poremba <matthew.poremba@amd.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com>