Package: lava-nc
A Software Framework for Neuromorphic ComputingIf you like lava and want to support it, the easiest way is to star our repo (click star in the upper right corner).OverviewLava is an open source SW framework to develop applications for
neuromorphic hardware architectures. It provides developers with the abstractions
and tools to develop distributed and massively parallel applications. These
applications can be deployed to heterogeneous system architectures containing
conventional processors as well as neuromorphic chips that exploit event-based
message passing for communication. The Lava framework comprises high-level
libraries for deep learning, constrained optimization, and others for productive
algorithm development. It also includes tools to map those algorithms to
different types of hardware architectures.Today Lava supports conventional CPUs and Intel's Loihi architecture, but
its compiler and runtime are open to extension for other architectures.To learn more about the Lava Software Framework, please refer to the
detailed documentation athttp://lava-nc.org/.The Lava framework is licensed with permissive open source
BSD 3 licensing to highly encourage community contributions.
Lower level components in Lava, that map algorithms to different
hardware backends, are licensed with the LGPL-2.1 license to discourage
commercial proprietary forks. Specific sensitive components
supporting architectures like Intel Loihi may remain proprietary
to Intel and will be shared as extensions to eligible users.Lava extension for Intel's LoihiThe Lava extension for Loihi is available for members of the Intel Neuromorphic Research Community (INRC). The extension enables execution of Lava on Intel's Loihi hardware platform.Developers interested in using Lava with Loihi systems need to join the INRC. Loihi 1 and 2 research systems are currently not available commercially. Once a member of the INRC, developers will gain access to cloud-hosted Loihi systems or may be able to obtain physical Loihi systems on a loan basis.To join the INRC, visithttp://neuromorphic.intel.comor email atinrc_interest@intel.com.If you are already a member of the INRC, please read how toget started with the Lava extension for Loihi. This page isonlyaccessible to members of the INRC.Getting startedThe open-source Lava Software framework and its complementary algorithm
libraries are hosted athttp://github.com/lava-ncand
the framework supports at minimimum CPU backends.Note that you should install the core Lava repositorylavabefore installing other Lava libraries such aslava-optimizationorlava-dl.Installing Lava from sourceIf you are interested in developing in Lava and modifying Lava source code,
we recommend cloning the repository and usingpoetryto setup Lava. You
will need to install thepoetryPython package.Open apython 3terminal and run based on the OS you are on:Linux/MacOScd$HOMEcurl-sSLhttps://install.python-poetry.org|python3-
gitclonegit@github.com:lava-nc/lava.gitcdlava
gitcheckoutv0.9.0
./utils/githook/install-hook.sh
poetryconfigvirtualenvs.in-projecttruepoetryinstallsource.venv/bin/activate
pytest## See FAQ for more info: https://github.com/lava-nc/lava/wiki/Frequently-Asked-Questions-(FAQ)#installWindows# Commands using PowerShellcd$HOMEgitclonegit@github.com:lava-nc/lava.gitcdlavagitcheckoutv0.9.0python3-mvenv.venv.venv\Scripts\activatepipinstall-Upipcurl-sSLhttps://install.python-poetry.org|python3-poetryconfigvirtualenvs.in-projecttruepoetryinstallpytestYou should expect the following output after running the unit tests:$ pytest
============================================== test session starts ==============================================
platform linux -- Python 3.8.10, pytest-7.0.1, pluggy-1.0.0
rootdir: /home/user/lava, configfile: pyproject.toml, testpaths: tests
plugins: cov-3.0.0
collected 205 items

tests/lava/magma/compiler/test_channel_builder.py .                                                       [  0%]
tests/lava/magma/compiler/test_compiler.py ........................                                       [ 12%]
tests/lava/magma/compiler/test_node.py ..                                                                 [ 13%]
tests/lava/magma/compiler/builder/test_channel_builder.py .                                               [ 13%]

...... pytest output ...

tests/lava/proc/sdn/test_models.py ........                                                               [ 98%]
tests/lava/proc/sdn/test_process.py ...                                                                   [100%]
=============================================== warnings summary ================================================

...... pytest output ...

src/lava/proc/lif/process.py                                                           38      0   100%
src/lava/proc/monitor/models.py                                                        27      0   100%
src/lava/proc/monitor/process.py                                                       79      0   100%
src/lava/proc/sdn/models.py                                                           159      9    94%   199-202, 225-231
src/lava/proc/sdn/process.py                                                           59      0   100%
-----------------------------------------------------------------------------------------------------------------TOTAL
                                                                                     4048    453    89%

Required test coverage of 85.0% reached. Total coverage: 88.81%
============================ 199 passed, 6 skipped, 2 warnings in 118.17s (0:01:58) =============================Alternative: Installing Lava via CondaIf you use the Conda package manager, you can simply install the Lava package
via:condainstalllava-cconda-forgeAlternatively with intel numpy and scipy:condacreate-nlavapython=3.9-cintel
condaactivatelava
condainstall-nlava-cintelnumpyscipy
condainstall-nlava-cconda-forgelava--freeze-installedAlternative: Installing Lava from pypiIf you would like to install Lava as a user you can install via pypi binaries.
Installing in this way does not give you access to run tests.Open a Python terminal and run:Windows/MacOS/Linuxpython-mvenv.venvsource.venv/bin/activate## Or Windows: .venv\Scripts\activatepipinstall-Upip
pipinstalllava-ncAlternative: Installing Lava from binariesYou can also install Lava as a user with published Lava releases viaGitHub Releases. Please download
the package and install it with the following commands. Installing in this way does not
give you access to run tests.Open a Python terminal and run:Windows/MacOS/Linuxpython-mvenv.venvsource.venv/bin/activate## Or Windows: .venv\Scripts\activatepipinstall-Upip# Substitute lava version needed for lava-nc-<version here>.tar.gz belowpipinstalllava-nc-0.9.0.tar.gzLinting, testing, documentation and packaging# Install poetrycurl-sSLhttps://install.python-poetry.org|python3-
poetryconfigvirtualenvs.in-projecttruepoetryinstall
poetryshell# Run lintingflakeheavenlintsrc/lavatests# Run unit testspytest# Create distributionpoetrybuild#### Find builds at dist/# Run Secuity Lintingbandit-rsrc/lava/.#### If security linting fails run bandit directly#### and format failuresbandit-rsrc/lava/.--formatcustom--msg-template'{abspath}:{line}: {test_id}[bandit]: {severity}: {msg}'Refer to the tutorials directory for in-depth as well as end-to-end tutorials on how to write Lava Processes, connect them, and execute the code.Stay in touchTo receive regular updates on the latest developments and releases of the Lava
Software Framework
pleasesubscribe to our newsletter.