Metadata-Version: 2.1
Name: femtocrux
Version: 0.2.8
Summary: Femtosense Compiler
Home-page: https://github.com/femtosense/femtocrux
Author: Femtosense
Author-email: info@femtosense.ai
Project-URL: Source, https://github.com/femtosense/femtocrux
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Cython
Requires-Dist: docker
Requires-Dist: fmot (==1.*,>=1.3.0.dev0)
Requires-Dist: grpcio
Requires-Dist: grpcio-tools
Requires-Dist: numpy (>=1.18.0)
Requires-Dist: protobuf
Requires-Dist: passlib
Requires-Dist: requests (<2.29.0)
Requires-Dist: urllib3 (<2.0.0,>=1.26.0)

![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiRGpDOFpEOXF1M0prSy9OOVNkZ3F2NkRKM0NNMG8xbmpZU0hZdUp1ejhHOEswdDRhOEZOakMrdWZyaHp1WGVtQ1lVTStzRUpXaFlYeFZPSEJFd21NdjF3PSIsIml2UGFyYW1ldGVyU3BlYyI6InJZYzhuZ3d3a1FUUzBzM0kiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)

# femtocrux

Compiler API for the Femotsense Sparse Processing Unit (SPU).

This package drives compilation of machine learning models to SPU binaries, as well as simulation of those binaries on SPU hardware.

The package itself is a thin Python wrapper communicating to the actual compiler / simulator via gRPC.

Supported ML model representations:
 - Femtosense Quantized IR (FQIR)
 - Tensorflow Lite (TFLite)

## Installation

You will need to have python `3.10` and Docker installed.
Install Docker by following [these instructions](https://docs.docker.com/get-docker/).

femtocrux is available on PyPI via

```
pip install femtocrux
```

## Basic Usage

```python
# fqir_model = ... # Assuming we have an FQIRModel
# inputs = ... # Assuming we have inputs for the model

from femtocrux import CompilerClient
client = CompilerClient()
simulator = client.simulate(fqir_model)
outputs = simulator.simulate(inputs)
```

## APIs

Coming soon...
