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

2023-04-21 Thread Matthew Poremba (Gerrit) via gem5-dev
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 
Reviewed-by: Matt Sinclair 
Maintainer: Matt Sinclair 
---
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 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: Matthew Poremba 
Gerrit-Reviewer: kokoro 
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


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

2023-04-20 Thread Matthew Poremba (Gerrit) via gem5-dev
Matthew Poremba has uploaded this change for review. (  
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
---
M configs/example/gpufs/runfs.py
1 file changed, 6 insertions(+), 0 deletions(-)



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: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I59819fc795a6bc4bc6badbd4d120db1246498987
Gerrit-Change-Number: 69978
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba 
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org