gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: configs: Allow other CPU types in GPUFS

MP
Matthew Poremba (Gerrit)
Sat, Apr 22, 2023 12:48 AM

Matthew Poremba has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/69979?usp=email )

Change subject: configs: Allow other CPU types in GPUFS
......................................................................

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 noreply+kokoro@google.com
Maintainer: Matt Sinclair mattdsinclair@gmail.com
Reviewed-by: Matt Sinclair mattdsinclair@gmail.com

M configs/example/gpufs/system/system.py
1 file changed, 6 insertions(+), 3 deletions(-)

Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/configs/example/gpufs/system/system.py
b/configs/example/gpufs/system/system.py
index a1b59ef..93f0194 100644
--- a/configs/example/gpufs/system/system.py
+++ b/configs/example/gpufs/system/system.py
@@ -61,7 +61,9 @@
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 @@

  # 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)
    

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69979?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: Ib616c3ef60f173871421b55a8bb73b25ce2990b5
Gerrit-Change-Number: 69979
Gerrit-PatchSet: 2
Gerrit-Owner: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: Jason Lowe-Power jason@lowepower.com
Gerrit-Reviewer: Matt Sinclair mattdsinclair@gmail.com
Gerrit-Reviewer: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com

Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/69979?usp=email ) Change subject: configs: Allow other CPU types in GPUFS ...................................................................... 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 <noreply+kokoro@google.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> --- M configs/example/gpufs/system/system.py 1 file changed, 6 insertions(+), 3 deletions(-) Approvals: Matt Sinclair: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/configs/example/gpufs/system/system.py b/configs/example/gpufs/system/system.py index a1b59ef..93f0194 100644 --- a/configs/example/gpufs/system/system.py +++ b/configs/example/gpufs/system/system.py @@ -61,7 +61,9 @@ 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 @@ # 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) -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69979?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: Ib616c3ef60f173871421b55a8bb73b25ce2990b5 Gerrit-Change-Number: 69979 Gerrit-PatchSet: 2 Gerrit-Owner: Matthew Poremba <matthew.poremba@amd.com> Gerrit-Reviewer: Jason Lowe-Power <jason@lowepower.com> Gerrit-Reviewer: Matt Sinclair <mattdsinclair@gmail.com> Gerrit-Reviewer: Matthew Poremba <matthew.poremba@amd.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com>