Attention is currently required from: Gabe Black.
Hello kokoro, Gabe Black,

I'd like you to do a code review.
Please visit

    https://gem5-review.googlesource.com/c/public/gem5/+/45827

to review the following change.


Change subject: fastmodel: Fix scx_get_parameter_list for ARM fastmodels.
......................................................................

fastmodel: Fix scx_get_parameter_list for ARM fastmodels.

The first non-critical piece of this CL removes the unused self
from the Python function signature.

Then also includes "stl.h" from pybind11 to allow the
implicit conversion from std::map<std::string, std::string>
to a Python dict (otherwise there will be a runtime (not compile time)
error when calling the function.

As the current implementation always throws an error because of the
missing stl.h I don't believe anyone is using this function, and as such
it should be safe to just change the signature of
scx_get_parameter_list.

Change-Id: Ib3202b2d4d1b8418a4adf54739fe389d4ee07743
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45622
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Maintainer: Gabe Black <gabe.bl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/arm/fastmodel/arm_fast_model.py
M src/python/pybind11/pybind.hh
2 files changed, 2 insertions(+), 1 deletion(-)



diff --git a/src/arch/arm/fastmodel/arm_fast_model.py b/src/arch/arm/fastmodel/arm_fast_model.py
index 3b9c7cb..c9d1113 100644
--- a/src/arch/arm/fastmodel/arm_fast_model.py
+++ b/src/arch/arm/fastmodel/arm_fast_model.py
@@ -77,7 +77,7 @@
     _m5.arm_fast_model.scx_get_parameter(name, value)
     return value

-def scx_get_parameter_list(self):
+def scx_get_parameter_list():
     return _m5.arm_fast_model.scx_get_parameter_list()

 def scx_set_cpi_file(cpi_file_path):
diff --git a/src/python/pybind11/pybind.hh b/src/python/pybind11/pybind.hh
index cdf18bc..256120e 100644
--- a/src/python/pybind11/pybind.hh
+++ b/src/python/pybind11/pybind.hh
@@ -39,6 +39,7 @@
 #define __PYTHON_PYBIND11_PYBIND_HH__

 #include "pybind11/pybind11.h"
+#include "pybind11/stl.h"

 void pybind_init_core(pybind11::module_ &m_native);
 void pybind_init_debug(pybind11::module_ &m_native);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45827
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: minor-release-staging-v21-0-1
Gerrit-Change-Id: Ib3202b2d4d1b8418a4adf54739fe389d4ee07743
Gerrit-Change-Number: 45827
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Philip Metzler <cpm...@google.com>
Gerrit-Attention: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to