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.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.9 kB view details)

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

alkaid-0.7.1-cp314-cp314-macosx_15_0_arm64.whl (890.8 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

alkaid-0.7.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.8 kB view details)

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

alkaid-0.7.1-cp313-cp313-macosx_15_0_arm64.whl (890.4 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

alkaid-0.7.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (861.8 kB view details)

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

alkaid-0.7.1-cp312-cp312-macosx_15_0_arm64.whl (890.4 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

alkaid-0.7.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (862.4 kB view details)

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

alkaid-0.7.1-cp311-cp311-macosx_15_0_arm64.whl (891.1 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

alkaid-0.7.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (862.7 kB view details)

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

alkaid-0.7.1-cp310-cp310-macosx_15_0_arm64.whl (891.2 kB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file alkaid-0.7.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5944a2082784243cafbf196f6c0bc4eaa542aeeb48b1faf1fa059226f9d9f52e
MD5 fbed080f75687440cc22a06292629dbe
BLAKE2b-256 b7cfe8e3bb28f82f9e49f190851f133487dfc66af85af5ebf33e346c2eb73132

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 25e90a584e93eb45d1693886c9c67a185863bc85d4360dbefbfe28f7426e375c
MD5 f5147b726e651a32f4137f1a833bf164
BLAKE2b-256 6e9f30f98c19ffd7645b28d9b61a6593c0e3da8520ff5a81585d57b6f05f8044

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b4e424d661340dbdbaaefc1c5b517b0b637eea55012404472d6907aaed52de5
MD5 aca6bbfed5f9ea4839ccef051ff3f629
BLAKE2b-256 dc9966fc76860ced087cdf503b7d52d1a2813f74ae7a0001a88d4b17a44c3e88

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 04074b8eecba0d2434b0466bd027dd8a0a4c6e47c5baac05a0082485383e24ff
MD5 6309f574d761152903fe4a382b4d4b88
BLAKE2b-256 ac13e5059917f61534858e4213dd20fbef1f28789c33eb007f039408b365ba0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d769f24d8c158a202b60dbb6d97283aebd318d44a808baf6ad5c417a27437007
MD5 08406fbf5c5db2a923dade6978c4291d
BLAKE2b-256 6d816c28b85b24f4fc01dc25529ad3e63f6bcc83e0b6c060bc1f11a701a8c7af

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 77b6d42103dd859a102ce58adbf23f69176e0220e57d702a9de4b4dd2c3dca69
MD5 0e9687c90b6ae1a8b4da8ce1852f07e5
BLAKE2b-256 973c52160245c88fccbf4f898d106d424c62c6e75102af953dd60ce4010ff278

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d6758bbaa8c3501840fa7c9d76fb415d8f269f5aaece61965660d920d2ac0765
MD5 acd05bfe8170178e4e8c1a691d92e693
BLAKE2b-256 28aab1aa0bd1330afb2d60fb178cdb7163dae952bbe6043db516bec5c43cf2f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 067677effe851b2c0f05a627c7a77a78dbadd455d3021bc30e58e37ea081af39
MD5 8c5046bc29ae07fbf01f6c8b1adaa61e
BLAKE2b-256 4043cdb2f03e630dffc5bf13e1447187e672d0b4b0b608ff661f66296e820913

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3ffc64c0ccf05745bdaecc7cc072d5f5f27216041b3d6d3150c221c0e8db9c46
MD5 a26532feea9262227f9dc73afec6dba6
BLAKE2b-256 0bfce6441222b723dbdb578fc4088a7ca3876ee79049833d2e8c8e6df34b2fbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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.1-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for alkaid-0.7.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ad6b8c81b643809ea2de82b04da9babfd7a552ed45bbba6ab3baea9f4bd0550e
MD5 eca6796423307b52d35c796c615723cf
BLAKE2b-256 ae721a985b0ccb6aad6b0db234528d54b522704e4fa05420bb5dd65f830b1f96

See more details on using hashes here.

Provenance

The following attestation bundles were made for alkaid-0.7.1-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