stdlib: Fix checkpoint setting through set_workload func

Due to a typo ('checkpoint_dir' instead of 'checkpoint'), setting
checkpoints via the set_workload functions was not working. This patch
fixes this error.

Change-Id: I5720406f2a01f166666e80079c1f84651f750fe2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68277
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2023-02-22 03:17:09 -08:00
committed by Bobby Bruce
parent 55348d062c
commit b4b024808e

View File

@@ -111,16 +111,16 @@ class SEBinaryWorkload:
# Set whether to exit on work items for the se_workload
self.exit_on_work_items = exit_on_work_items
# Here we set `self._checkpoint_dir`. This is then used by the
# Here we set `self._checkpoint`. This is then used by the
# Simulator module to setup checkpoints.
if checkpoint:
if isinstance(checkpoint, Path):
self._checkpoint = checkpoint
elif isinstance(checkpoint, AbstractResource):
self._checkpoint_dir = Path(checkpoint.get_local_path())
self._checkpoint = Path(checkpoint.get_local_path())
else:
raise Exception(
"The checkpoint_dir must be None, Path, or "
"The checkpoint must be None, Path, or "
"AbstractResource."
)