VISHNU RAMADAS has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/70078?usp=email )
Change subject: dev-amdgpu: Update vega10_kvm.py to add checkpointing
instruction
......................................................................
dev-amdgpu: Update vega10_kvm.py to add checkpointing instruction
The vega10_kvm.py script configures a system to run in GPUFS mode. To
create a checkpoint, an m5 checkpoint instruction has to be added to the
script manually. This commit automatically adds the instruction if the
checkpoint-dir flag is set
M configs/example/gpufs/vega10_kvm.py
1 file changed, 26 insertions(+), 1 deletion(-)
Approvals:
Matthew Poremba: Looks good to me, approved
Matt Sinclair: Looks good to me, but someone else must approve; Looks
good to me, approved
kokoro: Regressions pass
diff --git a/configs/example/gpufs/vega10_kvm.py
b/configs/example/gpufs/vega10_kvm.py
index 9c7e457..11f9fe2 100644
--- a/configs/example/gpufs/vega10_kvm.py
+++ b/configs/example/gpufs/vega10_kvm.py
@@ -41,7 +41,7 @@
from ruby import Ruby
-demo_runscript = """
+demo_runscript_without_checkpoint = """
export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH
export HSA_ENABLE_INTERRUPT=0
dmesg -n8
@@ -58,6 +58,24 @@
/sbin/m5 exit
"""
+demo_runscript_with_checkpoint = """
+export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH
+export HSA_ENABLE_INTERRUPT=0
+dmesg -n8
+dd if=/root/roms/vega10.rom of=/dev/mem bs=1k seek=768 count=128
+if [ ! -f /lib/modules/uname -r
/updates/dkms/amdgpu.ko ]; then
- echo "ERROR: Missing DKMS package for kernel
uname -r
. Exiting gem5."
- /sbin/m5 exit
+fi
+modprobe -v amdgpu ip_block_mask=0xff ppfeaturemask=0 dpm=0 audio=0
+echo "Running {} {}"
+echo "{}" | base64 -d > myapp
+chmod +x myapp
+/sbin/m5 checkpoint
+./myapp {}
+/sbin/m5 exit
+"""
def addDemoOptions(parser):
parser.add_argument(
@@ -79,6 +97,7 @@
# Parse now so we can override options
args = parser.parse_args()
-
demo_runscript = ""
Create temp script to run application
if args.app is None:
@@ -97,6 +116,12 @@
print("Could not find applcation", args.app)
sys.exit(1)
-
Choose runscript Based on whether any checkpointing args are set
-
if args.checkpoint_dir is not None:
-
demo_runscript = demo_runscript_with_checkpoint
-
else:
-
demo_runscript = demo_runscript_without_checkpoint
-
with open(os.path.abspath(args.app), "rb") as binfile:
encodedBin = base64.b64encode(binfile.read()).decode()
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/70078?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: I552fae6e98f6ec33a70a5b384242e87edb0e9526
Gerrit-Change-Number: 70078
Gerrit-PatchSet: 3
Gerrit-Owner: VISHNU RAMADAS vramadas@wisc.edu
Gerrit-Reviewer: Matt Sinclair mattdsinclair.wisc@gmail.com
Gerrit-Reviewer: Matt Sinclair mattdsinclair@gmail.com
Gerrit-Reviewer: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: VISHNU RAMADAS vramadas@wisc.edu
Gerrit-Reviewer: kokoro noreply+kokoro@google.com
VISHNU RAMADAS has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/70078?usp=email )
Change subject: dev-amdgpu: Update vega10_kvm.py to add checkpointing
instruction
......................................................................
dev-amdgpu: Update vega10_kvm.py to add checkpointing instruction
The vega10_kvm.py script configures a system to run in GPUFS mode. To
create a checkpoint, an m5 checkpoint instruction has to be added to the
script manually. This commit automatically adds the instruction if the
checkpoint-dir flag is set
Change-Id: I552fae6e98f6ec33a70a5b384242e87edb0e9526
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70078
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
---
M configs/example/gpufs/vega10_kvm.py
1 file changed, 26 insertions(+), 1 deletion(-)
Approvals:
Matthew Poremba: Looks good to me, approved
Matt Sinclair: Looks good to me, but someone else must approve; Looks
good to me, approved
kokoro: Regressions pass
diff --git a/configs/example/gpufs/vega10_kvm.py
b/configs/example/gpufs/vega10_kvm.py
index 9c7e457..11f9fe2 100644
--- a/configs/example/gpufs/vega10_kvm.py
+++ b/configs/example/gpufs/vega10_kvm.py
@@ -41,7 +41,7 @@
from ruby import Ruby
-demo_runscript = """\
+demo_runscript_without_checkpoint = """\
export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH
export HSA_ENABLE_INTERRUPT=0
dmesg -n8
@@ -58,6 +58,24 @@
/sbin/m5 exit
"""
+demo_runscript_with_checkpoint = """\
+export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH
+export HSA_ENABLE_INTERRUPT=0
+dmesg -n8
+dd if=/root/roms/vega10.rom of=/dev/mem bs=1k seek=768 count=128
+if [ ! -f /lib/modules/`uname -r`/updates/dkms/amdgpu.ko ]; then
+ echo "ERROR: Missing DKMS package for kernel `uname -r`. Exiting gem5."
+ /sbin/m5 exit
+fi
+modprobe -v amdgpu ip_block_mask=0xff ppfeaturemask=0 dpm=0 audio=0
+echo "Running {} {}"
+echo "{}" | base64 -d > myapp
+chmod +x myapp
+/sbin/m5 checkpoint
+./myapp {}
+/sbin/m5 exit
+"""
+
def addDemoOptions(parser):
parser.add_argument(
@@ -79,6 +97,7 @@
# Parse now so we can override options
args = parser.parse_args()
+ demo_runscript = ""
# Create temp script to run application
if args.app is None:
@@ -97,6 +116,12 @@
print("Could not find applcation", args.app)
sys.exit(1)
+ # Choose runscript Based on whether any checkpointing args are set
+ if args.checkpoint_dir is not None:
+ demo_runscript = demo_runscript_with_checkpoint
+ else:
+ demo_runscript = demo_runscript_without_checkpoint
+
with open(os.path.abspath(args.app), "rb") as binfile:
encodedBin = base64.b64encode(binfile.read()).decode()
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/70078?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: I552fae6e98f6ec33a70a5b384242e87edb0e9526
Gerrit-Change-Number: 70078
Gerrit-PatchSet: 3
Gerrit-Owner: VISHNU RAMADAS <vramadas@wisc.edu>
Gerrit-Reviewer: Matt Sinclair <mattdsinclair.wisc@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsinclair@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.poremba@amd.com>
Gerrit-Reviewer: VISHNU RAMADAS <vramadas@wisc.edu>
Gerrit-Reviewer: kokoro <noreply+kokoro@google.com>