Skip to main content

Distributed Arithmetic for Machine Learning

Project description

Alkaid: Distributed Arithmetic for Machine Learning

Tests Documentation Cov

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

alkaid-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.2 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

alkaid-0.7.0-cp314-cp314-macosx_15_0_arm64.whl (889.1 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

alkaid-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

alkaid-0.7.0-cp313-cp313-macosx_15_0_arm64.whl (888.8 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

alkaid-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

alkaid-0.7.0-cp312-cp312-macosx_15_0_arm64.whl (888.8 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

alkaid-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

alkaid-0.7.0-cp311-cp311-macosx_15_0_arm64.whl (889.4 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

alkaid-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

alkaid-0.7.0-cp310-cp310-macosx_15_0_arm64.whl (889.6 kB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

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

File hashes

Hashes for alkaid-0.7.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d41a26f82750e1572e333e06142c3237facbccec038212fc13f3bb18312a4bda
MD5 799c7bb9ff65a8f901c236958760af34
BLAKE2b-256 150bc7885b7e4245cc909dd73ac610f6689d22e53c1d6e45d1e64eb3a00ed93f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alkaid-0.7.0-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 09630f8b1071bcc3f6ff4c5f031a2d867519729c46c7905ee56cc325c760c8ae
MD5 4fe1a2c924fcd1679bce93863b0fb8a7
BLAKE2b-256 62b248226b2d31d8fad998dcb201f153dbb23e3eb59d7e12469453457ece4fb2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for alkaid-0.7.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 00e1349cb8affc3ba6c2291ebadc6cfcb2ce5586161654904c604cb7f6711994
MD5 755f4787da627eb1b1a3eb4fcf9f0c76
BLAKE2b-256 5cf868d9e4887420007c35c4588e1178364c11ddd97941fae6f9682bce99f899

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alkaid-0.7.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 2cbefaf183d3bd3bcfb57c9f8f0a387206a19363fbeaad4cf0c8aafedbf4484f
MD5 6e0aa3efadb2963a93781b59f1ef8284
BLAKE2b-256 485718be57c009f70599caf36185d8c2218fefdf9bd3fb11799c8b473a05d980

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for alkaid-0.7.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 34a019c4e9041a6a0b606a0e84ac58b2387c9ef6dab129f51fa5d63d22b475f6
MD5 da46cc0e8fe088adac8973bf21d0eae7
BLAKE2b-256 584b04251c24af067dba948b0d0767cac18f09bebfc50f46d97a73aac8ed1da3

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alkaid-0.7.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 79e12b9ced280cc45f161c197128d68edf86a772ed06bc37791bd6b18cf0c31e
MD5 2bbd1c3d8219b5f7d7bcde491a3bbbcd
BLAKE2b-256 70aed549ec45e337d9634aefc56fb3e41c49022b64e06dd0a1814f5307d55dcd

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for alkaid-0.7.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bf9e086a59283fcf39475d3246d335f6c6f9dfcdf68aea31e148a1830cccaac5
MD5 eb63785c577ea83f04b70f8f774b33ce
BLAKE2b-256 97a38279dc2af02243599a60060a79335b3aa2a57005489502661b2a79a3630b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alkaid-0.7.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 db3d5fcf1a2013858f904714fc178e476138c71ea6873824420ddda66d65d6a8
MD5 8f3d716861f91102a8f69f363bfdc418
BLAKE2b-256 04aaa3a5bdd6e0eda01b23d36bdc32edda85ddff59d129139a9cd3275cc0ff1f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for alkaid-0.7.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e41db6cedb2b5ed43a972090df43f189911ceb0f0de363120afeb110a504a035
MD5 1205a50917f9b41eff3b7a5cab32a185
BLAKE2b-256 2e28539c8e9ee85e39c3cfa6f627c4dab89cac9f975ba6ff21d008a86d0d6814

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file alkaid-0.7.0-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 07e717be6ae4de57c38f9f6e22d1209cdac9dd1a9361e475fa21f29f68223b48
MD5 30f65d2395ad9f9e4f3ec88eaa6cfe82
BLAKE2b-256 480369c13f57c5aae0408184005f9f1b3addb5d89de675dc5116090c2efe494a

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page