From d3637a489d6ddcc8ca5d99f20b53a1ea64bbc422 Mon Sep 17 00:00:00 2001 From: Vishnu Ramadas Date: Tue, 3 Oct 2023 12:10:42 -0500 Subject: [PATCH] configs: Add option to disable AVX in GPUFS GPUFS+KVM simulations automatically enable AVX. This commit adds a command line option to disable AVX if its not needed for a GPUFS simulation. Change-Id: Ic22592767dbdca86f3718eca9c837a8e29b6b781 --- configs/example/gpufs/runfs.py | 10 ++++++++++ configs/example/gpufs/system/system.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configs/example/gpufs/runfs.py b/configs/example/gpufs/runfs.py index 0f090e2f89..5d29959eff 100644 --- a/configs/example/gpufs/runfs.py +++ b/configs/example/gpufs/runfs.py @@ -158,6 +158,16 @@ def addRunFSOptions(parser): help="Root partition of disk image", ) + parser.add_argument( + "--disable-avx", + action="store_true", + default=False, + help="Disables AVX. AVX is used in some ROCm libraries but " + "does not have checkpointing support yet. If simulation either " + "creates a checkpoint or restores from one, then AVX needs to " + "be disabled for correct functionality ", + ) + def runGpuFSSystem(args): """ diff --git a/configs/example/gpufs/system/system.py b/configs/example/gpufs/system/system.py index 7ddc4f0752..7cb0ce1aa5 100644 --- a/configs/example/gpufs/system/system.py +++ b/configs/example/gpufs/system/system.py @@ -234,7 +234,7 @@ def makeGpuFSSystem(args): # If we are using KVM cpu, enable AVX. AVX is used in some ROCm libraries # such as rocBLAS which is used in higher level libraries like PyTorch. use_avx = False - if ObjectList.is_kvm_cpu(TestCPUClass): + if ObjectList.is_kvm_cpu(TestCPUClass) and not args.disable_avx: # AVX also requires CR4.osxsave to be 1. These must be set together # of KVM will error out. system.workload.enable_osxsave = 1