Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compile config to rs_builder #608

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lava/magma/compiler/builders/runtimeservice_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
):
Expand All @@ -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] = {}
Expand All @@ -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]):
Expand Down Expand Up @@ -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
Expand Down