From ab9e28ddb8afc0d053f9b399e14e16c3ed5c5a43 Mon Sep 17 00:00:00 2001 From: Kyle Roarty Date: Wed, 30 Jun 2021 16:34:41 -0500 Subject: [PATCH] configs,gpu-compute: Set proper dGPUPoolID defaults In GPU.py, dGPUPoolID is defined as an int, but was defaulted to False. Explicitly set it to 0, instead. In apu_se.py, dGPUPoolID was being set to 1, but that was resulting in crashes. Setting it to 0 avoids those crashes. Change-Id: I0f1161588279a335bbd0d8ae7acda97fc23201b5 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47527 Reviewed-by: Matt Sinclair Reviewed-by: Matthew Poremba Maintainer: Matt Sinclair Tested-by: kokoro --- configs/example/apu_se.py | 3 ++- src/gpu-compute/GPU.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py index 98a1e19c60..6f686f3f4d 100644 --- a/configs/example/apu_se.py +++ b/configs/example/apu_se.py @@ -432,9 +432,10 @@ if args.dgpu: args.m_type = 6 # HSA kernel mode driver +# dGPUPoolID is 0 because we only have one memory pool gpu_driver = GPUComputeDriver(filename = "kfd", isdGPU = args.dgpu, gfxVersion = args.gfx_version, - dGPUPoolID = 1, m_type = args.m_type) + dGPUPoolID = 0, m_type = args.m_type) renderDriNum = 128 render_driver = GPURenderDriver(filename = f'dri/renderD{renderDriNum}') diff --git a/src/gpu-compute/GPU.py b/src/gpu-compute/GPU.py index 6b0bb2ed63..d2f9b6e59b 100644 --- a/src/gpu-compute/GPU.py +++ b/src/gpu-compute/GPU.py @@ -245,7 +245,7 @@ class GPUComputeDriver(EmulatedDriver): device = Param.GPUCommandProcessor('GPU controlled by this driver') isdGPU = Param.Bool(False, 'Driver is for a dGPU') gfxVersion = Param.GfxVersion('gfx801', 'ISA of gpu to model') - dGPUPoolID = Param.Int(False, 'Pool ID for dGPU.') + dGPUPoolID = Param.Int(0, 'Pool ID for dGPU.') # Default Mtype for caches #-- 1 1 1 C_RW_S (Cached-ReadWrite-Shared) #-- 1 1 0 C_RW_US (Cached-ReadWrite-Unshared)