spikeforge-targets 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spikeforge_targets-0.1.1/LICENSE +30 -0
- spikeforge_targets-0.1.1/PKG-INFO +130 -0
- spikeforge_targets-0.1.1/README.md +94 -0
- spikeforge_targets-0.1.1/pyproject.toml +90 -0
- spikeforge_targets-0.1.1/setup.cfg +4 -0
- spikeforge_targets-0.1.1/spikeforge_targets/__init__.py +46 -0
- spikeforge_targets-0.1.1/spikeforge_targets/activation_quant.py +407 -0
- spikeforge_targets-0.1.1/spikeforge_targets/activation_quant_report.py +54 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/__init__.py +162 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/api.py +342 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/base.py +23 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/compare.py +53 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/errors.py +19 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/lava_backend.py +79 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/lowering.py +125 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/norse_backend.py +176 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/reference_backend.py +40 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/result.py +73 -0
- spikeforge_targets-0.1.1/spikeforge_targets/backends/vendor_backend.py +111 -0
- spikeforge_targets-0.1.1/spikeforge_targets/capability_matrix.py +50 -0
- spikeforge_targets-0.1.1/spikeforge_targets/catalog.py +154 -0
- spikeforge_targets-0.1.1/spikeforge_targets/cli/__init__.py +1 -0
- spikeforge_targets-0.1.1/spikeforge_targets/cli/target_cli.py +249 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/__init__.py +35 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/accounting.py +208 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/cli.py +108 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/cost_table.py +80 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/errors.py +24 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/probe.py +28 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/report.py +43 -0
- spikeforge_targets-0.1.1/spikeforge_targets/energy/target_costs.py +53 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/__init__.py +39 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/counters.py +54 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/dense_compare.py +50 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/errors.py +29 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/ops.py +136 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/sparse_result.py +52 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/sparse_runner.py +64 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/sparse_step.py +98 -0
- spikeforge_targets-0.1.1/spikeforge_targets/event_runtime/spike_view.py +75 -0
- spikeforge_targets-0.1.1/spikeforge_targets/matrix_result.py +51 -0
- spikeforge_targets-0.1.1/spikeforge_targets/node_view.py +33 -0
- spikeforge_targets-0.1.1/spikeforge_targets/primitives.py +31 -0
- spikeforge_targets-0.1.1/spikeforge_targets/probe.py +50 -0
- spikeforge_targets-0.1.1/spikeforge_targets/quantize.py +127 -0
- spikeforge_targets-0.1.1/spikeforge_targets/quantize_report.py +45 -0
- spikeforge_targets-0.1.1/spikeforge_targets/quantize_result.py +25 -0
- spikeforge_targets-0.1.1/spikeforge_targets/quantize_schemes.py +69 -0
- spikeforge_targets-0.1.1/spikeforge_targets/registry.py +44 -0
- spikeforge_targets-0.1.1/spikeforge_targets/report.py +156 -0
- spikeforge_targets-0.1.1/spikeforge_targets/rewrite.py +147 -0
- spikeforge_targets-0.1.1/spikeforge_targets/rewrite_drift.py +76 -0
- spikeforge_targets-0.1.1/spikeforge_targets/rewrite_outcome.py +25 -0
- spikeforge_targets-0.1.1/spikeforge_targets/rewrite_report.py +58 -0
- spikeforge_targets-0.1.1/spikeforge_targets/rewrite_result.py +24 -0
- spikeforge_targets-0.1.1/spikeforge_targets/substitute_ops.py +107 -0
- spikeforge_targets-0.1.1/spikeforge_targets/substitution.py +19 -0
- spikeforge_targets-0.1.1/spikeforge_targets/summary.py +35 -0
- spikeforge_targets-0.1.1/spikeforge_targets/target_spec.py +49 -0
- spikeforge_targets-0.1.1/spikeforge_targets/test_deploy.py +178 -0
- spikeforge_targets-0.1.1/spikeforge_targets/test_deploy_result.py +115 -0
- spikeforge_targets-0.1.1/spikeforge_targets.egg-info/PKG-INFO +130 -0
- spikeforge_targets-0.1.1/spikeforge_targets.egg-info/SOURCES.txt +66 -0
- spikeforge_targets-0.1.1/spikeforge_targets.egg-info/dependency_links.txt +1 -0
- spikeforge_targets-0.1.1/spikeforge_targets.egg-info/entry_points.txt +3 -0
- spikeforge_targets-0.1.1/spikeforge_targets.egg-info/not-zip-safe +1 -0
- spikeforge_targets-0.1.1/spikeforge_targets.egg-info/requires.txt +14 -0
- spikeforge_targets-0.1.1/spikeforge_targets.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Capsize LLC
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
* Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: spikeforge-targets
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Deployment targets, event-driven energy accounting, and backend execution for spikeforge.
|
|
5
|
+
Author-email: Capsize LLC <contact@capsizegames.com>
|
|
6
|
+
Maintainer-email: Capsize LLC <contact@capsizegames.com>
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
|
+
Project-URL: Homepage, https://github.com/capsize-games/spikeforge
|
|
9
|
+
Project-URL: Repository, https://github.com/capsize-games/spikeforge
|
|
10
|
+
Keywords: spiking neural networks,deployment,neuromorphic,lava,norse
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: spikeforge~=0.3.0
|
|
25
|
+
Requires-Dist: numpy>=1.26
|
|
26
|
+
Requires-Dist: torch>=2.5
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
30
|
+
Requires-Dist: ruff>=0.0.280; extra == "dev"
|
|
31
|
+
Provides-Extra: norse
|
|
32
|
+
Requires-Dist: norse; extra == "norse"
|
|
33
|
+
Provides-Extra: lava
|
|
34
|
+
Requires-Dist: lava-nc; extra == "lava"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# spikeforge
|
|
38
|
+
|
|
39
|
+
[](https://github.com/capsize-games/spikeforge/actions/workflows/ci.yml)
|
|
40
|
+
[](OPEN_SOURCE_CHECKLIST.md)
|
|
41
|
+
[](LICENSE)
|
|
42
|
+
[](https://www.python.org/downloads/)
|
|
43
|
+
[](https://github.com/astral-sh/ruff)
|
|
44
|
+
[](https://github.com/capsize-games/spikeforge/blob/main/CONTRIBUTING.md)
|
|
45
|
+
[](documentation/README.md)
|
|
46
|
+
|
|
47
|
+
A spiking-neural-network (SNN) toolkit built on
|
|
48
|
+
[snnTorch](https://snntorch.readthedocs.io/) and PyTorch. Loads MNIST-style
|
|
49
|
+
and neuromorphic event datasets, encodes them into rate, latency, delta, and
|
|
50
|
+
random spikes, and trains, validates, exports, and deploys LIF networks —
|
|
51
|
+
with a live browser dashboard served over WebSockets.
|
|
52
|
+
|
|
53
|
+
> **Pre-1.0 and unpublished.** `install.sh` is the supported path today;
|
|
54
|
+
> PyPI ships once the distributions are published. Before trusting any
|
|
55
|
+
> number this produces, read
|
|
56
|
+
> [Implications and boundaries](documentation/implications-and-boundaries.md).
|
|
57
|
+
|
|
58
|
+
## Quickstart
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/capsize-games/spikeforge.git
|
|
62
|
+
cd spikeforge
|
|
63
|
+
docker compose up --build
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Open <http://localhost:8877> — the dashboard connects to the WebSocket on
|
|
67
|
+
the same host and port. No separate backend or proxy to run.
|
|
68
|
+
|
|
69
|
+
Prefer a local install, a headless example, or the CLI tools instead? See
|
|
70
|
+
[Usage](documentation/usage.md) and [Quickstart](documentation/quickstart.md)
|
|
71
|
+
for every path (`./install.sh`, local dev with Vite, `examples/`, and the
|
|
72
|
+
eight `spikeforge-*` console scripts).
|
|
73
|
+
|
|
74
|
+
## Features
|
|
75
|
+
|
|
76
|
+
- **Encoding** — rate, latency, delta, and random spike coders.
|
|
77
|
+
- **Training** — fully-connected and convolutional LIF networks with
|
|
78
|
+
surrogate-gradient cross-entropy, checkpointing, and opt-in AMP / gradient
|
|
79
|
+
checkpointing / truncated BPTT / multi-GPU.
|
|
80
|
+
- **Topologies** — `fc_legacy`, `fc_small`, `conv_net`, `recurrent_net`, plus
|
|
81
|
+
the sequence presets `sequence_mlp` and `sequence_attn`.
|
|
82
|
+
- **Datasets** — MNIST, Fashion-MNIST, KMNIST, QMNIST, USPS, EMNIST,
|
|
83
|
+
CIFAR-10, and (via the `events` extra) N-MNIST, DVS128 Gesture,
|
|
84
|
+
CIFAR10-DVS, and Spiking Speech Commands.
|
|
85
|
+
- **Interpreter spine** — NIR export, an independent NIR interpreter, and
|
|
86
|
+
numerical drift validation.
|
|
87
|
+
- **Introspection** — educational-mode `U[t]`/`I[t]`/`S[t]` traces,
|
|
88
|
+
trajectory metrics, and surrogate-derivative curves.
|
|
89
|
+
- **Deployment** — a capability matrix, weight quantization, energy
|
|
90
|
+
accounting, and executable `reference`, `norse`, and `lava_loihi2`
|
|
91
|
+
backends.
|
|
92
|
+
- **Model hub** — a curated, offline-first catalog plus optional live
|
|
93
|
+
Hugging Face search.
|
|
94
|
+
- **Dashboard** — a React + TypeScript UI with training, introspection,
|
|
95
|
+
analysis, targets, energy, and hub panels, and seven guided walkthroughs.
|
|
96
|
+
|
|
97
|
+
## Packages
|
|
98
|
+
|
|
99
|
+
This repository is a single workspace that publishes four distributions:
|
|
100
|
+
|
|
101
|
+
| Distribution | Import root | Purpose |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| `spikeforge` | `spikeforge` | Core package: encoders, topologies, training, simulator, NIR bridge, tracking |
|
|
104
|
+
| `spikeforge-targets` | `spikeforge_targets` | Deployment targets, quantization, energy accounting, sparse event runtime |
|
|
105
|
+
| `spikeforge-hub` | `spikeforge_hub` | Curated model hub and optional Hugging Face access |
|
|
106
|
+
| `spikeforge-server` | `server` | FastAPI + WebSocket server and dashboard hosting |
|
|
107
|
+
|
|
108
|
+
## Documentation
|
|
109
|
+
|
|
110
|
+
This README stays short on purpose.
|
|
111
|
+
[`documentation/`](documentation/README.md) is the full reference — install
|
|
112
|
+
paths, the CLI tools, architecture, module layout, and the dev workflow —
|
|
113
|
+
written for contributors and coding agents alike. Also see
|
|
114
|
+
[COOKBOOK.md](COOKBOOK.md) for copy-pasteable recipes,
|
|
115
|
+
[examples/](examples/) for runnable end-to-end scripts, and
|
|
116
|
+
[plans/](plans/) for design documents and the roadmap.
|
|
117
|
+
|
|
118
|
+
See [CONTRIBUTING.md](https://github.com/capsize-games/spikeforge/blob/main/CONTRIBUTING.md)
|
|
119
|
+
and [rules.md](rules.md) before opening a pull request.
|
|
120
|
+
|
|
121
|
+
## Citing
|
|
122
|
+
|
|
123
|
+
If spikeforge is useful in your research, please cite it — see
|
|
124
|
+
[CITATION.cff](CITATION.cff) (GitHub renders a "Cite this repository"
|
|
125
|
+
button from it automatically).
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
Released under the **BSD 3-Clause License** — see [LICENSE](LICENSE) and
|
|
130
|
+
[AUTHORS](AUTHORS).
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# spikeforge
|
|
2
|
+
|
|
3
|
+
[](https://github.com/capsize-games/spikeforge/actions/workflows/ci.yml)
|
|
4
|
+
[](OPEN_SOURCE_CHECKLIST.md)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
[](https://github.com/astral-sh/ruff)
|
|
8
|
+
[](https://github.com/capsize-games/spikeforge/blob/main/CONTRIBUTING.md)
|
|
9
|
+
[](documentation/README.md)
|
|
10
|
+
|
|
11
|
+
A spiking-neural-network (SNN) toolkit built on
|
|
12
|
+
[snnTorch](https://snntorch.readthedocs.io/) and PyTorch. Loads MNIST-style
|
|
13
|
+
and neuromorphic event datasets, encodes them into rate, latency, delta, and
|
|
14
|
+
random spikes, and trains, validates, exports, and deploys LIF networks —
|
|
15
|
+
with a live browser dashboard served over WebSockets.
|
|
16
|
+
|
|
17
|
+
> **Pre-1.0 and unpublished.** `install.sh` is the supported path today;
|
|
18
|
+
> PyPI ships once the distributions are published. Before trusting any
|
|
19
|
+
> number this produces, read
|
|
20
|
+
> [Implications and boundaries](documentation/implications-and-boundaries.md).
|
|
21
|
+
|
|
22
|
+
## Quickstart
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git clone https://github.com/capsize-games/spikeforge.git
|
|
26
|
+
cd spikeforge
|
|
27
|
+
docker compose up --build
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Open <http://localhost:8877> — the dashboard connects to the WebSocket on
|
|
31
|
+
the same host and port. No separate backend or proxy to run.
|
|
32
|
+
|
|
33
|
+
Prefer a local install, a headless example, or the CLI tools instead? See
|
|
34
|
+
[Usage](documentation/usage.md) and [Quickstart](documentation/quickstart.md)
|
|
35
|
+
for every path (`./install.sh`, local dev with Vite, `examples/`, and the
|
|
36
|
+
eight `spikeforge-*` console scripts).
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- **Encoding** — rate, latency, delta, and random spike coders.
|
|
41
|
+
- **Training** — fully-connected and convolutional LIF networks with
|
|
42
|
+
surrogate-gradient cross-entropy, checkpointing, and opt-in AMP / gradient
|
|
43
|
+
checkpointing / truncated BPTT / multi-GPU.
|
|
44
|
+
- **Topologies** — `fc_legacy`, `fc_small`, `conv_net`, `recurrent_net`, plus
|
|
45
|
+
the sequence presets `sequence_mlp` and `sequence_attn`.
|
|
46
|
+
- **Datasets** — MNIST, Fashion-MNIST, KMNIST, QMNIST, USPS, EMNIST,
|
|
47
|
+
CIFAR-10, and (via the `events` extra) N-MNIST, DVS128 Gesture,
|
|
48
|
+
CIFAR10-DVS, and Spiking Speech Commands.
|
|
49
|
+
- **Interpreter spine** — NIR export, an independent NIR interpreter, and
|
|
50
|
+
numerical drift validation.
|
|
51
|
+
- **Introspection** — educational-mode `U[t]`/`I[t]`/`S[t]` traces,
|
|
52
|
+
trajectory metrics, and surrogate-derivative curves.
|
|
53
|
+
- **Deployment** — a capability matrix, weight quantization, energy
|
|
54
|
+
accounting, and executable `reference`, `norse`, and `lava_loihi2`
|
|
55
|
+
backends.
|
|
56
|
+
- **Model hub** — a curated, offline-first catalog plus optional live
|
|
57
|
+
Hugging Face search.
|
|
58
|
+
- **Dashboard** — a React + TypeScript UI with training, introspection,
|
|
59
|
+
analysis, targets, energy, and hub panels, and seven guided walkthroughs.
|
|
60
|
+
|
|
61
|
+
## Packages
|
|
62
|
+
|
|
63
|
+
This repository is a single workspace that publishes four distributions:
|
|
64
|
+
|
|
65
|
+
| Distribution | Import root | Purpose |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `spikeforge` | `spikeforge` | Core package: encoders, topologies, training, simulator, NIR bridge, tracking |
|
|
68
|
+
| `spikeforge-targets` | `spikeforge_targets` | Deployment targets, quantization, energy accounting, sparse event runtime |
|
|
69
|
+
| `spikeforge-hub` | `spikeforge_hub` | Curated model hub and optional Hugging Face access |
|
|
70
|
+
| `spikeforge-server` | `server` | FastAPI + WebSocket server and dashboard hosting |
|
|
71
|
+
|
|
72
|
+
## Documentation
|
|
73
|
+
|
|
74
|
+
This README stays short on purpose.
|
|
75
|
+
[`documentation/`](documentation/README.md) is the full reference — install
|
|
76
|
+
paths, the CLI tools, architecture, module layout, and the dev workflow —
|
|
77
|
+
written for contributors and coding agents alike. Also see
|
|
78
|
+
[COOKBOOK.md](COOKBOOK.md) for copy-pasteable recipes,
|
|
79
|
+
[examples/](examples/) for runnable end-to-end scripts, and
|
|
80
|
+
[plans/](plans/) for design documents and the roadmap.
|
|
81
|
+
|
|
82
|
+
See [CONTRIBUTING.md](https://github.com/capsize-games/spikeforge/blob/main/CONTRIBUTING.md)
|
|
83
|
+
and [rules.md](rules.md) before opening a pull request.
|
|
84
|
+
|
|
85
|
+
## Citing
|
|
86
|
+
|
|
87
|
+
If spikeforge is useful in your research, please cite it — see
|
|
88
|
+
[CITATION.cff](CITATION.cff) (GitHub renders a "Cite this repository"
|
|
89
|
+
button from it automatically).
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
Released under the **BSD 3-Clause License** — see [LICENSE](LICENSE) and
|
|
94
|
+
[AUTHORS](AUTHORS).
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# PEP 621 packaging authority for the spikeforge-targets distribution (ARCH-0001
|
|
2
|
+
# Phase 3).
|
|
3
|
+
#
|
|
4
|
+
# The distribution owns the ``spikeforge_targets`` import root, which absorbs the
|
|
5
|
+
# former ``spikeforge.targets`` (plus ``.backends``), ``.energy`` and
|
|
6
|
+
# ``.event_runtime`` subpackages. It depends on core, but core never depends on
|
|
7
|
+
# it. The volatile backend SDKs (norse, lava) are optional extras here, which
|
|
8
|
+
# is why core no longer advertises them.
|
|
9
|
+
#
|
|
10
|
+
# ``spikeforge_targets/`` stays at its repository-root path and is exposed to the
|
|
11
|
+
# build via the ``spikeforge_targets`` symlink next to this file (the same pattern the
|
|
12
|
+
# core and server distributions use; see the ``packages.find`` table below).
|
|
13
|
+
|
|
14
|
+
[build-system]
|
|
15
|
+
requires = ["setuptools>=68"]
|
|
16
|
+
build-backend = "setuptools.build_meta"
|
|
17
|
+
|
|
18
|
+
[project]
|
|
19
|
+
name = "spikeforge-targets"
|
|
20
|
+
version = "0.1.1"
|
|
21
|
+
description = "Deployment targets, event-driven energy accounting, and backend execution for spikeforge."
|
|
22
|
+
# ``README.md`` and ``LICENSE`` are committed symlinks to the repository-root
|
|
23
|
+
# files, mirroring the core and server distributions' metadata approach.
|
|
24
|
+
readme = "README.md"
|
|
25
|
+
requires-python = ">=3.10"
|
|
26
|
+
license = "BSD-3-Clause"
|
|
27
|
+
license-files = ["LICENSE"]
|
|
28
|
+
authors = [
|
|
29
|
+
{ name = "Capsize LLC", email = "contact@capsizegames.com" },
|
|
30
|
+
]
|
|
31
|
+
maintainers = [
|
|
32
|
+
{ name = "Capsize LLC", email = "contact@capsizegames.com" },
|
|
33
|
+
]
|
|
34
|
+
keywords = [
|
|
35
|
+
"spiking neural networks",
|
|
36
|
+
"deployment",
|
|
37
|
+
"neuromorphic",
|
|
38
|
+
"lava",
|
|
39
|
+
"norse",
|
|
40
|
+
]
|
|
41
|
+
classifiers = [
|
|
42
|
+
"Development Status :: 4 - Beta",
|
|
43
|
+
"Intended Audience :: Developers",
|
|
44
|
+
"Intended Audience :: Science/Research",
|
|
45
|
+
"Operating System :: OS Independent",
|
|
46
|
+
"Programming Language :: Python :: 3",
|
|
47
|
+
"Programming Language :: Python :: 3.10",
|
|
48
|
+
"Programming Language :: Python :: 3.11",
|
|
49
|
+
"Programming Language :: Python :: 3.12",
|
|
50
|
+
"Programming Language :: Python :: 3.13",
|
|
51
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
52
|
+
]
|
|
53
|
+
dependencies = [
|
|
54
|
+
"spikeforge~=0.3.0",
|
|
55
|
+
"numpy>=1.26",
|
|
56
|
+
"torch>=2.5",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[project.optional-dependencies]
|
|
60
|
+
dev = [
|
|
61
|
+
"pytest>=7.0",
|
|
62
|
+
"pytest-cov>=4.0",
|
|
63
|
+
"ruff>=0.0.280",
|
|
64
|
+
]
|
|
65
|
+
norse = [
|
|
66
|
+
"norse",
|
|
67
|
+
]
|
|
68
|
+
lava = [
|
|
69
|
+
"lava-nc",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[project.scripts]
|
|
73
|
+
spikeforge-energy = "spikeforge_targets.energy.cli:main"
|
|
74
|
+
spikeforge-targets = "spikeforge_targets.cli.target_cli:main"
|
|
75
|
+
|
|
76
|
+
[project.urls]
|
|
77
|
+
Homepage = "https://github.com/capsize-games/spikeforge"
|
|
78
|
+
Repository = "https://github.com/capsize-games/spikeforge"
|
|
79
|
+
|
|
80
|
+
[tool.setuptools]
|
|
81
|
+
zip-safe = false
|
|
82
|
+
|
|
83
|
+
[tool.setuptools.packages.find]
|
|
84
|
+
# Mirror the core/server distributions: the `spikeforge_targets` import root is
|
|
85
|
+
# exposed next to this file as a symlink to `../../spikeforge_targets` so the default
|
|
86
|
+
# via-sdist `python -m build` produces a complete wheel. Discovery depends only
|
|
87
|
+
# on this top-level package, never on core.
|
|
88
|
+
where = ["."]
|
|
89
|
+
include = ["spikeforge_targets*"]
|
|
90
|
+
exclude = ["spikeforge", "server*", "tests*"]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Deployment targets, their declared capabilities, and reports.
|
|
2
|
+
|
|
3
|
+
This package declares what each target *can* run (a :class:`TargetSpec`),
|
|
4
|
+
resolves whether it is actually installed through one isolated probe, and
|
|
5
|
+
classifies a graph node-by-node against a target. The reference interpreter
|
|
6
|
+
is always available; every other entry is an honest placeholder until its
|
|
7
|
+
optional SDK extra is installed. No backend SDK is imported at import time.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from spikeforge_targets.capability_matrix import (
|
|
11
|
+
classify,
|
|
12
|
+
classify_by_name,
|
|
13
|
+
compare_targets,
|
|
14
|
+
)
|
|
15
|
+
from spikeforge_targets.matrix_result import CapabilityMatrix
|
|
16
|
+
from spikeforge_targets.primitives import EMITTED_PRIMITIVES
|
|
17
|
+
from spikeforge_targets.registry import (
|
|
18
|
+
available,
|
|
19
|
+
available_names,
|
|
20
|
+
get_target,
|
|
21
|
+
target_names,
|
|
22
|
+
unavailable_names,
|
|
23
|
+
)
|
|
24
|
+
from spikeforge_targets.report import deployment_report
|
|
25
|
+
from spikeforge_targets.substitution import Substitution
|
|
26
|
+
from spikeforge_targets.summary import target_summaries, target_summary
|
|
27
|
+
from spikeforge_targets.target_spec import TargetKind, TargetSpec
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"EMITTED_PRIMITIVES",
|
|
31
|
+
"CapabilityMatrix",
|
|
32
|
+
"Substitution",
|
|
33
|
+
"TargetKind",
|
|
34
|
+
"TargetSpec",
|
|
35
|
+
"available",
|
|
36
|
+
"available_names",
|
|
37
|
+
"classify",
|
|
38
|
+
"classify_by_name",
|
|
39
|
+
"compare_targets",
|
|
40
|
+
"deployment_report",
|
|
41
|
+
"get_target",
|
|
42
|
+
"target_names",
|
|
43
|
+
"target_summaries",
|
|
44
|
+
"target_summary",
|
|
45
|
+
"unavailable_names",
|
|
46
|
+
]
|