Distributed Arithmetic for Machine Learning
Project description
Alkaid: Distributed Arithmetic for Machine Learning
alkaid is a lightweight compiler for generating low-latency static-dataflow kernels for FPGAs. It traces quantized arithmetic into ALIR, applies distributed-arithmetic optimization through CMVM where useful, and emits RTL or HLS projects.
The supported code generation targets are:
- RTL: Verilog and VHDL 2008, with optional pipelining.
- HLS: Vitis HLS, HLSlib, and oneAPI-style C++.
- XLS: experimental Verilog generation and JIT execution through
xls-python.
Models can be described with the NumPy-like symbolic tracing API, loaded from serialized ALIR JSON/JSON.GZ, or converted through plugins. The package includes top-level keras, torch, and alkaid example tracer plugins; Keras and Torch support can also be extended with second-level alkaid_keras and alkaid_torch entry points.
Installation
pip install alkaid
Binary wheels are published for Linux x86_64 and macOS ARM64. Building from source requires Python 3.10 or newer, NumPy, meson-python, and a C++20 compiler with OpenMP support.
pip install --no-build-isolation -e '.[tests]'
Use pip install 'alkaid[docs]' for documentation dependencies. Install xls-python when using the XLS backend outside the test extra.
CLI
alkaid convert model.keras /tmp/rtl_output --flavor verilog --latency-cutoff 5
alkaid convert model.json.gz /tmp/hls_output --flavor vitis
alkaid report /tmp/rtl_output --sort-by comb_metric
See the documentation for tracing, plugin, ALIR, and backend details.
License
LGPLv3. See the LICENSE file for details.
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 Distributions
Built Distributions
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 alkaid-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 861.2 kB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d41a26f82750e1572e333e06142c3237facbccec038212fc13f3bb18312a4bda
|
|
| MD5 |
799c7bb9ff65a8f901c236958760af34
|
|
| BLAKE2b-256 |
150bc7885b7e4245cc909dd73ac610f6689d22e53c1d6e45d1e64eb3a00ed93f
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
d41a26f82750e1572e333e06142c3237facbccec038212fc13f3bb18312a4bda - Sigstore transparency entry: 1442967862
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp314-cp314-macosx_15_0_arm64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp314-cp314-macosx_15_0_arm64.whl
- Upload date:
- Size: 889.1 kB
- Tags: CPython 3.14, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09630f8b1071bcc3f6ff4c5f031a2d867519729c46c7905ee56cc325c760c8ae
|
|
| MD5 |
4fe1a2c924fcd1679bce93863b0fb8a7
|
|
| BLAKE2b-256 |
62b248226b2d31d8fad998dcb201f153dbb23e3eb59d7e12469453457ece4fb2
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp314-cp314-macosx_15_0_arm64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp314-cp314-macosx_15_0_arm64.whl -
Subject digest:
09630f8b1071bcc3f6ff4c5f031a2d867519729c46c7905ee56cc325c760c8ae - Sigstore transparency entry: 1442967332
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 861.0 kB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00e1349cb8affc3ba6c2291ebadc6cfcb2ce5586161654904c604cb7f6711994
|
|
| MD5 |
755f4787da627eb1b1a3eb4fcf9f0c76
|
|
| BLAKE2b-256 |
5cf868d9e4887420007c35c4588e1178364c11ddd97941fae6f9682bce99f899
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
00e1349cb8affc3ba6c2291ebadc6cfcb2ce5586161654904c604cb7f6711994 - Sigstore transparency entry: 1442967252
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp313-cp313-macosx_15_0_arm64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp313-cp313-macosx_15_0_arm64.whl
- Upload date:
- Size: 888.8 kB
- Tags: CPython 3.13, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cbefaf183d3bd3bcfb57c9f8f0a387206a19363fbeaad4cf0c8aafedbf4484f
|
|
| MD5 |
6e0aa3efadb2963a93781b59f1ef8284
|
|
| BLAKE2b-256 |
485718be57c009f70599caf36185d8c2218fefdf9bd3fb11799c8b473a05d980
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp313-cp313-macosx_15_0_arm64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp313-cp313-macosx_15_0_arm64.whl -
Subject digest:
2cbefaf183d3bd3bcfb57c9f8f0a387206a19363fbeaad4cf0c8aafedbf4484f - Sigstore transparency entry: 1442967149
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 861.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a019c4e9041a6a0b606a0e84ac58b2387c9ef6dab129f51fa5d63d22b475f6
|
|
| MD5 |
da46cc0e8fe088adac8973bf21d0eae7
|
|
| BLAKE2b-256 |
584b04251c24af067dba948b0d0767cac18f09bebfc50f46d97a73aac8ed1da3
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
34a019c4e9041a6a0b606a0e84ac58b2387c9ef6dab129f51fa5d63d22b475f6 - Sigstore transparency entry: 1442967039
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp312-cp312-macosx_15_0_arm64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp312-cp312-macosx_15_0_arm64.whl
- Upload date:
- Size: 888.8 kB
- Tags: CPython 3.12, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79e12b9ced280cc45f161c197128d68edf86a772ed06bc37791bd6b18cf0c31e
|
|
| MD5 |
2bbd1c3d8219b5f7d7bcde491a3bbbcd
|
|
| BLAKE2b-256 |
70aed549ec45e337d9634aefc56fb3e41c49022b64e06dd0a1814f5307d55dcd
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp312-cp312-macosx_15_0_arm64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp312-cp312-macosx_15_0_arm64.whl -
Subject digest:
79e12b9ced280cc45f161c197128d68edf86a772ed06bc37791bd6b18cf0c31e - Sigstore transparency entry: 1442967481
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 861.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf9e086a59283fcf39475d3246d335f6c6f9dfcdf68aea31e148a1830cccaac5
|
|
| MD5 |
eb63785c577ea83f04b70f8f774b33ce
|
|
| BLAKE2b-256 |
97a38279dc2af02243599a60060a79335b3aa2a57005489502661b2a79a3630b
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
bf9e086a59283fcf39475d3246d335f6c6f9dfcdf68aea31e148a1830cccaac5 - Sigstore transparency entry: 1442967419
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp311-cp311-macosx_15_0_arm64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp311-cp311-macosx_15_0_arm64.whl
- Upload date:
- Size: 889.4 kB
- Tags: CPython 3.11, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db3d5fcf1a2013858f904714fc178e476138c71ea6873824420ddda66d65d6a8
|
|
| MD5 |
8f3d716861f91102a8f69f363bfdc418
|
|
| BLAKE2b-256 |
04aaa3a5bdd6e0eda01b23d36bdc32edda85ddff59d129139a9cd3275cc0ff1f
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp311-cp311-macosx_15_0_arm64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp311-cp311-macosx_15_0_arm64.whl -
Subject digest:
db3d5fcf1a2013858f904714fc178e476138c71ea6873824420ddda66d65d6a8 - Sigstore transparency entry: 1442967690
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 861.8 kB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e41db6cedb2b5ed43a972090df43f189911ceb0f0de363120afeb110a504a035
|
|
| MD5 |
1205a50917f9b41eff3b7a5cab32a185
|
|
| BLAKE2b-256 |
2e28539c8e9ee85e39c3cfa6f627c4dab89cac9f975ba6ff21d008a86d0d6814
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
e41db6cedb2b5ed43a972090df43f189911ceb0f0de363120afeb110a504a035 - Sigstore transparency entry: 1442967581
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file alkaid-0.7.0-cp310-cp310-macosx_15_0_arm64.whl.
File metadata
- Download URL: alkaid-0.7.0-cp310-cp310-macosx_15_0_arm64.whl
- Upload date:
- Size: 889.6 kB
- Tags: CPython 3.10, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07e717be6ae4de57c38f9f6e22d1209cdac9dd1a9361e475fa21f29f68223b48
|
|
| MD5 |
30f65d2395ad9f9e4f3ec88eaa6cfe82
|
|
| BLAKE2b-256 |
480369c13f57c5aae0408184005f9f1b3addb5d89de675dc5116090c2efe494a
|
Provenance
The following attestation bundles were made for alkaid-0.7.0-cp310-cp310-macosx_15_0_arm64.whl:
Publisher:
python-publish.yml on calad0i/alkaid
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alkaid-0.7.0-cp310-cp310-macosx_15_0_arm64.whl -
Subject digest:
07e717be6ae4de57c38f9f6e22d1209cdac9dd1a9361e475fa21f29f68223b48 - Sigstore transparency entry: 1442967778
- Sigstore integration time:
-
Permalink:
calad0i/alkaid@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e21def98df5c39f3b613c66a22c327bb01f7ddbd -
Trigger Event:
release
-
Statement type: