Philip Metzler has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45622 )

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

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
---
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/+/45622
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib3202b2d4d1b8418a4adf54739fe389d4ee07743
Gerrit-Change-Number: 45622
Gerrit-PatchSet: 1
Gerrit-Owner: Philip Metzler <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to