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 NxSDKRuntimeService #182

Merged
merged 22 commits into from
Feb 25, 2022
Merged

Add NxSDKRuntimeService #182

merged 22 commits into from
Feb 25, 2022

Conversation

mgkwill
Copy link
Contributor

@mgkwill mgkwill commented Feb 15, 2022

Issue Number: #181

Objective of pull request: Create NxSDKRuntimeService

Pull request checklist

Your PR fulfills the following requirements:

Pull request type

Please check your PR type:

  • Feature

What is the current behavior?

  • NxSDKRuntimeService does not exist and Lava cannot interact with Loihi.

What is the new behavior?

  • NxSDKRuntimeService is able to interact with Loihi through NxCore.

Does this introduce a breaking change?

  • No

mgkwill and others added 4 commits February 15, 2022 13:07
Signed-off-by: Marcus G K Williams <[email protected]>
* Minor: Removed a divide by zero warning from the fixed point LIF ProcessModel

Signed-off-by: Risbud, Sumedh <[email protected]>

* Improved to MNIST end-to-end tutorial
    - uses fixed point bit-accurate ProcessModels for LIF and Dense
    - resets internal neural state of all LIF neurons
    - these changes are needed to make the pre-trained networks parameters work, because the network was trained with these assumptions

Signed-off-by: Risbud, Sumedh <[email protected]>

* Post code review @awintel and @phstratmann

Signed-off-by: Risbud, Sumedh <[email protected]>

* Post code review @awintel and @phstratmann

Signed-off-by: Risbud, Sumedh <[email protected]>

* Post re-review by @phstratmann

Signed-off-by: Risbud, Sumedh <[email protected]>

Co-authored-by: PhilippPlank <[email protected]>
Signed-off-by: Marcus G K Williams <[email protected]>
@mgkwill mgkwill added area: magma/runtime Issues with something in lava/magma/runtime area: magma/compiler Issues with something in lava/magma/compiler labels Feb 15, 2022
@mgkwill mgkwill self-assigned this Feb 15, 2022
@mgkwill mgkwill linked an issue Feb 15, 2022 that may be closed by this pull request
2 tasks
Signed-off-by: Marcus G K Williams <[email protected]>
Signed-off-by: Marcus G K Williams <[email protected]>
@mgkwill
Copy link
Contributor Author

mgkwill commented Feb 15, 2022

Add docstrings everywhere.

Signed-off-by: Marcus G K Williams <[email protected]>
@mgkwill
Copy link
Contributor Author

mgkwill commented Feb 15, 2022

NxSDKRuntimeService does not meet class naming standards.

Change to NxSdkRuntimeService.

Same everywhere for NxSDK.

Signed-off-by: Marcus G K Williams <[email protected]>
src/lava/magma/core/model/nc/model.py Outdated Show resolved Hide resolved
src/lava/magma/core/model/nc/model.py Outdated Show resolved Hide resolved
tests/lava/magma/runtime/test_runtime_service.py Outdated Show resolved Hide resolved
Copy link
Contributor

@awintel awintel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before approving or requesting changes I need some fundamental architectural questions clarified.

src/lava/magma/runtime/runtime_services/runtime_service.py Outdated Show resolved Hide resolved
src/lava/magma/runtime/runtime_services/runtime_service.py Outdated Show resolved Hide resolved
src/lava/magma/core/model/nc/ports.py Outdated Show resolved Hide resolved
src/lava/magma/core/model/nc/model.py Show resolved Hide resolved
mgkwill and others added 3 commits February 17, 2022 10:28
@mgkwill mgkwill dismissed joyeshmishra’s stale review February 24, 2022 00:20

Old review. Please look at update.

Remove commented code in compiler.py

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
mgkwill and others added 7 commits February 24, 2022 11:16
Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
@joyeshmishra joyeshmishra merged commit 64a3e4c into lava-nc:main Feb 25, 2022
@mgkwill mgkwill deleted the nxsdkRTS_base branch February 25, 2022 03:44
monkin77 pushed a commit to monkin77/thesis-lava that referenced this pull request Jul 12, 2024
* Address review comments

Signed-off-by: Marcus G K Williams <[email protected]>

* Improve mnist tutorial (lava-nc#147)

* Minor: Removed a divide by zero warning from the fixed point LIF ProcessModel

Signed-off-by: Risbud, Sumedh <[email protected]>

* Improved to MNIST end-to-end tutorial
    - uses fixed point bit-accurate ProcessModels for LIF and Dense
    - resets internal neural state of all LIF neurons
    - these changes are needed to make the pre-trained networks parameters work, because the network was trained with these assumptions

Signed-off-by: Risbud, Sumedh <[email protected]>

* Post code review @awintel and @phstratmann

Signed-off-by: Risbud, Sumedh <[email protected]>

* Post code review @awintel and @phstratmann

Signed-off-by: Risbud, Sumedh <[email protected]>

* Post re-review by @phstratmann

Signed-off-by: Risbud, Sumedh <[email protected]>

Co-authored-by: PhilippPlank <[email protected]>

* Check process lineage before join (lava-nc#177)

Signed-off-by: Marcus G K Williams <[email protected]>

* Add NxSDKRuntimeService

Signed-off-by: Marcus G K Williams <[email protected]>

* Fix unit test, linting

Signed-off-by: Marcus G K Williams <[email protected]>

* Remove comments

Signed-off-by: Marcus G K Williams <[email protected]>

* Handle nxsdk import exception

Signed-off-by: Marcus G K Williams <[email protected]>

* Fix indentation issue

Signed-off-by: Marcus G K Williams <[email protected]>

* Uncomment board.run in nc proc model

Signed-off-by: Marcus G K Williams <[email protected]>

* Address review, rework NxSdkRuntime Service

Signed-off-by: Marcus G K Williams <[email protected]>

* Fix unit tests, merge with main

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

* Remove nc/ports.py again

Remove commented code in compiler.py

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

* Update comments logging

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

* Update test Utils method name and document

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

* Update test name and docs for nxsdkruntimeservice

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

* Update docstrings for RuntimeService

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

* Update logging

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

* Remove unneeded logging import

Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>

Co-authored-by: Risbud, Sumedh <[email protected]>
Co-authored-by: PhilippPlank <[email protected]>
Co-authored-by: Marcus G K Williams <Marcus G K Williams [email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: magma/compiler Issues with something in lava/magma/compiler area: magma/runtime Issues with something in lava/magma/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create NxSDKRuntimeService
5 participants