From 70ef9b219ca7aa6aaf05f163dae20ff0dc259d13 Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Thu, 20 Apr 2023 13:16:36 -0500 Subject: [PATCH] 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 --- configs/example/gpufs/runfs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index 4a28068a11..52b79abfaa 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 @@ def runGpuFSSystem(args): 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(