No project description provided
Project description
elastic-ai.Experiment-Framework
A framework to support you in performing experiments with the elastic-ai.Hardware (eai.Hardware) and related setups.
Features
- Stream data to elastic-ai.Hardware
- Stream data from elastic-ai.Hardware
- Parse Vivado reports into python dictionaries
- Call custom functions on the elastic-ai.Hardware from python scripts
- Measure Power/Latency for different workloads
- Perform different types of inferences on the HW accelerators from the elastic-ai.Creator via python API
- Push multiple bitstreams with FPGA configurations to eai.Hardware flash chips
- Load specific bitstreams from flash to FPGA
- Communication via USB/UART
- Communication via TCP/Lightweight IP
- Parse headers with c structs to automatically generate corresponding python types and methods to construct them from received data
- Parse headers with c functions to automatically generate corresponding python stubs for remote procedure calls to the eai.Hardware
- Semi-automatic synthesis (info via
eaixp synth --help) with- Vivado local
- Vivado remote
- Cached Synthesis
Quick Start
$ uvx --from "git+https://github.com/es-ude/elastic-ai.experiment-framework.git" eaixp --help
or
$ uv tool install "git+https://github.com/es-ude/elastic-ai.experiment-framework.git"
$ uv tool run eaixp --help
or
$ pip install "git+https://github.com/es-ude/elastic-ai.experiment-framework.git"
$ eaixp --help
Communicating with the elastic node via elasticai runtime
- Checkout the elastic ai runtime
$ git clone git@github.com:es-ude/elastic-ai.runtime.enV5.git $ cd elastic-ai.runtime.env5
- build the firmware either directly (make sure to have gcc-arm-noneabi available)
$ cmake --preset env5_rev2_release $ cmake --build --preset env5_rev2_release
alternatively with devenv
$ devenv tasks run -m before build
- set the hardware to bootloader mode, e.g., by cycling power, while holding the boot button
- copy the firmware to the device, e.g.,
$ cp build/env5_rev2_release/test\
/hardware/TestUsbProtocol/HardwareTestUsbProtocol.uf2\
/var/Volume/RP2
- run the remote control
uv run python -m elasticai.tester.remote_control -h
Extend the remote control CLI
The remote control lives in elasticai.experiment_framework.remote_control.
The CLI can be easily extended as follows:
import elasticai.experiment_framework.remote_control as rc
import click
@rc.main.command
@click.pass_obj
@click.argument("data", type=str)
def my_custom_command(obj):
rc_handle = rc.RemoteControl(obj)
my_cmd_id = 250
result = rc_handle.send_command(my_cmd_id, data, len(data))
print(result)
If you need more control, you can use the
elasticai.experiment_framework.remote_control_protocol
directly in your command.
Synthesis
To use the synthesis feature, you have to provide information on where and how to run the synthesis.
You can do that explicitly from your python script.
But in most cases this will be user specific, so it is better to store that information in environment variables.
If you're using devenv, you can create a file called devenv.local.nix with content like this:
{pkgs, ...}:
{
env = {
SYNTH_HOST = "192.168.1.34";
SYNTH_SSH_USER = "elasticai";
SYNTH_TARGET = "env5";
SYNTH_WORKING_DIR = "/home/ies/synthesis";
SYNTH_KEY = "hw_testing";
};
}
Make sure to gitignore that file so you don't accidentally push it. Also note that the exact variables may also depend on the concrete synthesis you are running.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elasticai_experiment_framework-0.2.0.tar.gz.
File metadata
- Download URL: elasticai_experiment_framework-0.2.0.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f6d260a4a9207a50c47008356f372984d20c75c571775149bd6dad9510b21e0
|
|
| MD5 |
a42b8bfb3239f9fee6f1ca9c2f8796f7
|
|
| BLAKE2b-256 |
dd3b048a5fd98872f3282c385df6ac73443635509e655c5754656897edc016c3
|
File details
Details for the file elasticai_experiment_framework-0.2.0-py3-none-any.whl.
File metadata
- Download URL: elasticai_experiment_framework-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea8dd2138df1c65df2fc89e7fec8ffa732aa32b39ae5d61d03d17e4b8f580ef1
|
|
| MD5 |
7d573404cf0165b58d6c759799f77ce7
|
|
| BLAKE2b-256 |
7842dbcb43731a0700c045a9dacd427570c1665c8c3b181f27b2154bd6f6ad78
|