Metadata-Version: 2.4
Name: talon-backend
Version: 0.0.1
Summary: TALON Backend: Config generation, CPU simulation, and FPGA deployment for Talon IR graphs
Author-email: Anurag Daram <anurag@type1compute.com>, Subham Kumar Das <subham@type1compute.com>
Maintainer-email: Type 1 Compute <dev@type1compute.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/type1compute/talonbackend
Project-URL: Documentation, https://type1compute.github.io/docs/talon-ecosystem/introduction
Project-URL: Repository, https://github.com/type1compute/talonbackend.git
Project-URL: Issues, https://github.com/type1compute/talonbackend/-/issues
Project-URL: Changelog, https://github.com/type1compute/talonbackend/-/releases
Keywords: talon,neuromorphic,spiking-neural-networks,hardware-backend,config-generator,cpu-simulator
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: talon-ir
Requires-Dist: talon-graph
Requires-Dist: numpy<3,>=1.24.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
Requires-Dist: Cython>=3.0; extra == "dev"
Requires-Dist: inline-snapshot>=0.31.0; extra == "dev"
Dynamic: license-file

# TALON Backend

Config generation and CPU simulation for TALON IR graphs. Compiles partitioned graphs into JSON/binary descriptors for hardware runtime and provides a CPU simulator for correctness validation and profiling.

## Installation

```bash
uv add talon-backend
```

## Features

- **Config Generator**: Produces JSON/binary hardware descriptors (not bitstream)
- **CPU Simulator**: Validates graph execution correctness
- **From-Scratch Profiler**: Latency, energy, and memory estimation without external deps
- **Backend Registry**: Plugin system for custom hardware backends
- **DAG + Cyclic Support**: Auto-detects topology and selects execution mode

## Quick Start

```python
from talon import ir, backend

# Load a partitioned graph
graph = ir.read("model.t1c")

# Compile to hardware descriptor
cpu = backend.get_backend("cpu")
descriptor = cpu.compile(graph)
descriptor.to_json("model_config.json")

# Simulate for correctness
result = cpu.simulate(graph, input_data, n_steps=100)
print(f"Valid: {result.outputs_valid}")

# Profile (from scratch, no external deps)
profile = cpu.profile(graph, input_data, n_steps=100)
print(f"Latency: {profile.total_latency_us} us")
print(f"Energy: {profile.energy_estimate_uj} uJ")
```

## License

MIT
