From 03aeae7084fbefad4f0f8a47a947f68843303d80 Mon Sep 17 00:00:00 2001 From: Joyesh Mishra Date: Mon, 6 Feb 2023 13:11:37 -0800 Subject: [PATCH] Add compile config to rs_builder --- src/lava/magma/compiler/builders/runtimeservice_builder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lava/magma/compiler/builders/runtimeservice_builder.py b/src/lava/magma/compiler/builders/runtimeservice_builder.py index 358caa983..ff07c2f7d 100644 --- a/src/lava/magma/compiler/builders/runtimeservice_builder.py +++ b/src/lava/magma/compiler/builders/runtimeservice_builder.py @@ -38,6 +38,7 @@ def __init__( model_ids: ty.List[int], loihi_version: ty.Type[LoihiVersion], loglevel: int = logging.WARNING, + compile_config: ty.Optional[ty.Dict[str, ty.Any]] = None, *args, **kwargs ): @@ -47,6 +48,7 @@ def __init__( self.rs_kwargs = kwargs self.log = logging.getLogger(__name__) self.log.setLevel(loglevel) + self._compile_config = compile_config self._runtime_service_id = runtime_service_id self._model_ids: ty.List[int] = model_ids self.csp_send_port: ty.Dict[str, CspSendPort] = {} @@ -57,6 +59,7 @@ def __init__( @property def runtime_service_id(self): + """Return runtime service id.""" return self._runtime_service_id def set_csp_ports(self, csp_ports: ty.List[AbstractCspPort]): @@ -103,6 +106,7 @@ def build(self) -> AbstractRuntimeService: self.sync_protocol, loihi_version=self.loihi_version, loglevel=self.log.level, + compile_config=self._compile_config, **self.rs_kwargs ) nxsdk_rts = True