diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index 944a46a868..781ce8e27c 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -133,6 +133,11 @@ def runGpuFSSystem(args): that should not be changed by the user. """ + # GPUFS is primarily designed to use the X86 KVM CPU. This model needs to + # use multiple event queues when more than one CPU is simulated. Force it + # on if that is the case. + args.host_parallel = True if args.num_cpus > 1 else False + # These are used by the protocols. They should not be set by the user. n_cu = args.num_compute_units args.num_sqc = int(math.ceil(float(n_cu) / args.cu_per_sqc)) @@ -149,6 +154,9 @@ def runGpuFSSystem(args): time_sync_period="1000us", ) + if args.host_parallel: + root.sim_quantum = int(1e8) + if args.script is not None: system.readfile = args.script diff --git a/configs/example/gpufs/system/system.py b/configs/example/gpufs/system/system.py index 46b023f1b5..a1b59ef20b 100644 --- a/configs/example/gpufs/system/system.py +++ b/configs/example/gpufs/system/system.py @@ -204,6 +204,15 @@ def makeGpuFSSystem(args): for j in range(len(system.cpu[i].isa)): system.cpu[i].isa[j].vendor_string = "AuthenticAMD" + if args.host_parallel: + # To get the KVM CPUs to run on different host CPUs, specify a + # different event queue for each CPU. The last CPU is a GPU + # shader and should be skipped. + for i, cpu in enumerate(system.cpu[:-1]): + for obj in cpu.descendants(): + obj.eventq_index = 0 + cpu.eventq_index = i + 1 + gpu_port_idx = ( len(system.ruby._cpu_ports) - args.num_compute_units