From c2c5cd10480c45f39dc30184afe273ba70f7d035 Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Thu, 20 Apr 2023 13:18:26 -0500 Subject: [PATCH] configs: Allow other CPU types in GPUFS Previously the CPU type and memory modes were hardcoded for KVM, because there was a deadlock bug. After some recent testing, this deadlock bug no longer exists with the simple CPU models. Thus, changing the configs to allow for other CPU models as a first step toward lifting the KVM requirement from GPUFS. Change-Id: Ib616c3ef60f173871421b55a8bb73b25ce2990b5 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69979 Tested-by: kokoro Maintainer: Matt Sinclair Reviewed-by: Matt Sinclair --- configs/example/gpufs/system/system.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configs/example/gpufs/system/system.py b/configs/example/gpufs/system/system.py index a1b59ef20b..93f0194efb 100644 --- a/configs/example/gpufs/system/system.py +++ b/configs/example/gpufs/system/system.py @@ -61,7 +61,9 @@ def makeGpuFSSystem(args): panic("Need at least 2GB of system memory to load amdgpu module") # Use the common FSConfig to setup a Linux X86 System - (TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(args) + (TestCPUClass, test_mem_mode) = Simulation.getCPUClass(args.cpu_type) + if test_mem_mode == "atomic": + test_mem_mode = "atomic_noncaching" disks = [args.disk_image] if args.second_disk is not None: disks.extend([args.second_disk]) @@ -91,10 +93,11 @@ def makeGpuFSSystem(args): # Create specified number of CPUs. GPUFS really only needs one. system.cpu = [ - X86KvmCPU(clk_domain=system.cpu_clk_domain, cpu_id=i) + TestCPUClass(clk_domain=system.cpu_clk_domain, cpu_id=i) for i in range(args.num_cpus) ] - system.kvm_vm = KvmVM() + if ObjectList.is_kvm_cpu(TestCPUClass): + system.kvm_vm = KvmVM() # Create AMDGPU and attach to southbridge shader = createGPU(system, args)