Skip to main content

finn-plus-driver

Runtime driver for FPGA accelerators generated by finn-plus and deployed to ZYNQ/PYNQ boards.

This package contains everything needed to run a FINN-generated accelerator and nothing of the compiler itself. It is installed on the board, while the accelerator-specific artifacts (bitfile, settings.json, runtime weights) are produced by the finn-plus build flow and copied to the board separately.

Installation

On a PYNQ board, inside the PYNQ virtual environment:

sudo pip install finn-plus-driver

pynq itself is not declared as a dependency: it is part of the board image.

To install the version matching a repository checkout (e.g. in CI):

sudo pip install ./driver

Usage

The driver is usually invoked through its CLI, which instantiates the driver class named in settings.json and calls one of its member functions:

finn-plus-driver -b bitfile/finn-accel.bit -s driver/settings.json -f throughput_test

It can equally be used as a library:

from finn_plus_driver import FINNDMAOverlay

accel = FINNDMAOverlay("finn-accel.bit", io_shape_dict=io_shape_dict)
output = accel.execute(input_array)

Contents

Module Purpose
finn_plus_driver.overlays.dma FINNDMAOverlay, the standard DMA-based accelerator driver
finn_plus_driver.overlays.instrumentation FINNInstrumentationOverlay, DMA-less instrumentation runs
finn_plus_driver.overlays.live_fifo FINNLiveFIFOOverlay, live FIFO sizing experiments
finn_plus_driver.overlays.dma_instrumentation FINNDMAInstrumentationOverlay, combined DMA + instrumentation
finn_plus_driver.packing Data packing/unpacking between numpy and the accelerator's bit-level format
finn_plus_driver.validate Dataset-specific accuracy validation, see Validation datasets
finn_plus_driver.cli Command line interface

Validation datasets

The validate function of the DMA-based drivers runs the accelerator on the validation data of the dataset named by validation_dataset in settings.json and writes the top-1 accuracy to report_dma_validate.json. MNIST and CIFAR are downloaded on first use, all other datasets are read from the directory that the DATASET_DIR environment variable points to (or from the path given as dataset_path):

validation_dataset Dataset Expected in $DATASET_DIR
mnist MNIST test set downloaded
cifar, cifar100 CIFAR-10 / CIFAR-100 test set downloaded
imagenet ILSVRC2012 validation set ImageNet2012/ILSVRC2012_img_val/, ImageNet2012/val.txt
radioml RadioML 2018.01A, highest-SNR test samples (VGG10 model) GOLD_XYZ_OSC.0001_1024.hdf5
radioml_transformer RadioML 2018.01A, evaluation split of the finn-transformers model GOLD_XYZ_OSC.0001_1024.hdf5
unswnb15 UNSW-NB15 (binarized) test set unsw_nb15_binarized.npz
speechcommands Google Speech Commands v2 validation split, as MFCC features python_speech_preprocessing_all_validation_KWS_data.npz
gtsrb GTSRB test set, scaled to 32x32 pixels gtsrb_test_32x32.npz
tinystories TinyStories validation split as masked token sequences tinystories_validation_mlm.npz

The files for speechcommands, gtsrb and tinystories are fetched and converted by scripts/prepare_validation_datasets.py of the finn-plus repository.

The inputs are converted to what the accelerator expects: the CIFAR images are normalized and the RadioML and Speech Commands samples are left unquantized for accelerators with a float input, whose input quantizer is part of the hardware. For tinystories the reported top-1 accuracy is the share of masked tokens that were predicted correctly.

Metadata

Release files for finn-plus-driver 1.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finn-plus-driver 1.6.2
File Size Uploaded Provenance Actions
finn_plus_driver-1.6.2.tar.gz 44.4 kB Without provenance Details for finn_plus_driver-1.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for finn-plus-driver 1.6.2
File Interpreter ABI Platform Actions
finn_plus_driver-1.6.2-py3-none-any.whl Python 3 none any Details for finn_plus_driver-1.6.2-py3-none-any.whl

Total release size: 98.4 kB

Release files / finn_plus_driver-1.6.2.tar.gz

Download URL finn_plus_driver-1.6.2.tar.gz
Size 44.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d4651c32fb9dd8c24fe1965502888a5f902ca142236a120ac1b6ed028230e3f4
BLAKE2b-256 checksum
How to use checksums
9cf883aa9227ac6c9808c0b93673596b4b6d01bce7da321af1285c68c4a0e912
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.10 Linux/7.0.0-1017-azure

Release files / finn_plus_driver-1.6.2-py3-none-any.whl

Download URL finn_plus_driver-1.6.2-py3-none-any.whl
Size 54.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69e915242b3814d4387de5cf767b46a1b14c3726b532b0ed53e3c69a4de3f3e6
BLAKE2b-256 checksum
How to use checksums
6496c344b431a6c21bb41eb959b5e0818e0bf580e7187d43efec586411d88083
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.10 Linux/7.0.0-1017-azure

Security for finn-plus-driver 1.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page