Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
33c58ee
Initial commit of major changes. Using dynamic dispatch for cell func…
alexredd99 Apr 5, 2025
728c425
Adding more process cells
alexredd99 Apr 7, 2025
751e121
Adding more cells. Need to do significant cleaning
alexredd99 Apr 11, 2025
c8d0fec
Using dynamic enum dispatch and fixed pickling for multiprocessing
alexredd99 Apr 15, 2025
c9df1b5
Fixed saving and loading from Python
alexredd99 Apr 15, 2025
7f23603
Updated dependencies
alexredd99 Apr 15, 2025
f677b94
Added temp systolic array experiment submodule
alexredd99 Apr 16, 2025
7319e9b
Changed submodule URL from SSH to HTTPS
alexredd99 Apr 16, 2025
f425279
Initial MNIST experiment code
alexredd99 Apr 18, 2025
bec2c3e
Runtime performance improvements
alexredd99 Apr 19, 2025
11d56d1
Fixed input quantization for MNIST model
alexredd99 Apr 19, 2025
529914c
Updated training notebook
alexredd99 Apr 19, 2025
484fefb
Added minifloat support to MNIST example
alexredd99 May 7, 2025
03b66b8
Ran ruff linter+formatter
alexredd99 May 7, 2025
473e957
Updated cargo packages and added release profile
alexredd99 May 7, 2025
dea2653
Ran clippy
alexredd99 May 7, 2025
9638e23
Updated and ran pre-commit
alexredd99 May 8, 2025
2a034ff
Improving minifloat support
alexredd99 May 26, 2025
dfe5275
Fixed overflow errors and added experimental fault crate
alexredd99 May 29, 2025
a814cc8
Updated fault crate
alexredd99 May 29, 2025
9493498
Added progress bar
alexredd99 May 29, 2025
c312f0f
Massive updates to modular cells and yosys handling
alexredd99 Aug 18, 2025
24b2489
Updated axis systolic array submodule
alexredd99 Aug 18, 2025
fb3a5b9
Added new cells. Need to add more tests
alexredd99 Aug 19, 2025
4a35d70
Fixed over/underflow issues
alexredd99 Aug 28, 2025
0db26fa
fixed fault runner
alexredd99 Aug 29, 2025
1289174
Initial commit for CIFAR10
alexredd99 Aug 30, 2025
de2e22c
Fixed set_net bug
alexredd99 Sep 15, 2025
6948f20
Merge pull request #1 from KastnerRG/feature/custom-cells
alexredd99 Oct 2, 2025
efa07c0
Forgot to remove old benchmarking stuff
alexredd99 Oct 22, 2025
56e900f
Large graph revamp
alexredd99 Nov 26, 2025
cd9c724
Improving nested submodule and netlist graph
alexredd99 Dec 5, 2025
0937197
Switched to RTLID representation and going back to yosys topological …
alexredd99 Dec 18, 2025
e40e71c
Moved to uv and rust-only bindings with pyi stub
alexredd99 Dec 22, 2025
3ff714c
Added support for dynamically registering cells
alexredd99 Jan 7, 2026
b33593e
Fixing some new cell issues
alexredd99 Jan 7, 2026
e9ee0ed
Adding more cells
alexredd99 Jan 7, 2026
3be4180
Adding more cells (x2)
alexredd99 Jan 7, 2026
58bc4ba
Adding more cells (x3)
alexredd99 Jan 7, 2026
74de3ba
Adding more cells (x4)
alexredd99 Jan 7, 2026
7c28046
Adding more cells (x5)
alexredd99 Jan 7, 2026
8f7001e
Adding more cells (x6)
alexredd99 Jan 7, 2026
f1fcf9a
Adding more cells (x6)
alexredd99 Jan 7, 2026
d147c20
Temp hardcoding Asap&
alexredd99 Jan 8, 2026
bf674ae
Fix for buffers with no output
alexredd99 Jan 8, 2026
3785e6d
Fixed bug in tie low cell
alexredd99 Jan 9, 2026
01fa6f5
Improved toggle count reporting
alexredd99 Jan 10, 2026
2dfde12
Fixed toggle count interface
alexredd99 Jan 10, 2026
2b8e927
Fixed cell
alexredd99 Jan 15, 2026
f3c081b
Improved optional hierarchy separation
alexredd99 Feb 5, 2026
866200e
Added netlist graph output
alexredd99 Feb 19, 2026
7aa367c
Initial support for additional registers
alexredd99 Mar 11, 2026
90fcebe
Merge pull request #2 from KastnerRG/fix/module-scope
alexredd99 Mar 11, 2026
8d61152
Updated license
alexredd99 Mar 11, 2026
a163698
Update authors
alexredd99 Mar 11, 2026
d96850b
Improving metadata and building
alexredd99 Mar 11, 2026
8663478
Improving metadata
alexredd99 Mar 11, 2026
805fe5a
Improved python source package and added python tests
alexredd99 Mar 11, 2026
6477421
Downgrade required Python version for compatibility
alexredd99 Mar 11, 2026
823e6c5
Initial commit of PyPI build/publish action
alexredd99 Mar 11, 2026
963d9e3
Added more classifiers
alexredd99 Mar 11, 2026
15bc150
Removing experiments
alexredd99 Mar 11, 2026
7ea43fe
Make sure examples don't get bundled with sdist
alexredd99 Mar 11, 2026
3bf3c21
Removed old gitmodules and updated gitignore
alexredd99 Mar 11, 2026
ae02370
Ignoring F403
alexredd99 Mar 11, 2026
53c3b47
Merge pull request #4 from KastnerRG/prepare-pypi
alexredd99 Mar 12, 2026
97231c8
Set environment for PyPI publish
alexredd99 Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = ["-Ctarget-cpu=native"]
185 changes: 185 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# This file is autogenerated by maturin v1.12.6
# To update, run
#
# maturin generate-ci github
#
name: Release

on:
push:
tags: ["v*"]
workflow_dispatch:
# TODO: Dry run when changing version in arbolta_pyo3/Cargo.toml
pull_request:

permissions:
contents: read

jobs:
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
- runner: ubuntu-22.04
target: s390x
- runner: ubuntu-22.04
target: ppc64le
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-22.04
target: armv7
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
python_arch: x64
- runner: windows-latest
target: x86
python_arch: x86
- runner: windows-11-arm
target: aarch64
python_arch: arm64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.13
architecture: ${{ matrix.platform.python_arch }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist

macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-15-intel
target: x86_64
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v6
with:
name: wheels-sdist
path: dist

release:
name: Publish to PyPI
environment:
name: pypi
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v7
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v3
with:
subject-path: 'wheels-*/*'
- name: Install uv
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: astral-sh/setup-uv@v7
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: uv publish 'wheels-*/*'
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Python ###
uv.lock
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -157,4 +158,4 @@ Cargo.lock

### Generated ###
examples/notebooks/*/output
synth_output
*.ruff_cache
40 changes: 21 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
exclude: '(examples/pre_synthesized_demo/i8bxi8bx16_vector_mac.json)'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand All @@ -14,26 +12,30 @@ repos:
- id: check-json
- id: check-added-large-files
- id: requirements-txt-fixer
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
- repo: local
hooks:
- id: fmt
name: fmt (rust)
- id: clippy
name: clippy (rust)
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --all -- --check
language: system
types: [rust]
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --workspace --all-targets -- -Dclippy::all
pass_filenames: false
language: system
types: [rust]
- id: cargo-check
name: cargo-check (rust)
- repo: https://github.com/pycqa/isort
rev: 5.13.2
name: cargo check
entry: cargo check --workspace --all-targets
pass_filenames: false
language: system
types: [rust]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.8
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/google/yapf
rev: v0.43.0
hooks:
- id: yapf
name: yapf (python)
args: ["-i"]
- id: ruff
- id: ruff-format
- repo: https://github.com/srstevenson/nb-clean
rev: 4.0.1
hooks:
Expand Down
File renamed without changes.
31 changes: 30 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
[workspace]
members = ["crates/*"]
resolver = "2"
resolver = "3"

[workspace.package]
edition = "2024"
repository = "https://github.com/KastnerRG/arbolta"
homepage = "https://github.com/KastnerRG/arbolta"
authors = ["Alexander Redding <alredding@ucsd.edu>"]
license = "MIT"

[workspace.dependencies]
anyhow = "1"
arbolta = { path = "crates/arbolta" }
derive_more = { version = "2", features = ["full"] }
enum_dispatch = "0.3"
indexmap = "2.12"
ndarray = "0.16.1"
num-traits = "0.2"
once_cell = "1.21"
petgraph = { version = "0.8.3", features = ["serde-1"] }
postcard = "1"
rstest = "0.26"
serde = { version = "1", features = ["derive"] }
thiserror = "2.0"
yosys-netlist-json = { git = "https://github.com/alexredd99/yosys-netlist-json.git" }

[profile.release]
lto = true
codegen-units = 1
opt-level = 3
debug = false
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2024 - 2025 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2024 - 2025 Advanced Micro Devices, Inc.
Copyright (c) 2026 Alexander Redding

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 26 additions & 10 deletions crates/arbolta/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
[package]
name = "arbolta"
version = "0.1.0"
authors = ["AMD Research & Advanced Development"]
edition = "2021"
authors = { workspace = true }
edition = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
description = "Core Arbolta hardware simulator"
exclude = [
"tests/*"
]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
ndarray = "0.16.1"
num-traits = "0.2"
once_cell = "1.19.0"
rstest = "0.23.0"
flexbuffers = "2.0.0"
yosys-netlist-json = { git = "https://github.com/alexredd99/yosys-netlist-json.git" }
thiserror = "2.0.3"
anyhow = { workspace = true }
derive-new = "0.7"
derive_more = { workspace = true }
enum_dispatch = { workspace = true }
indexmap = { workspace = true }
inventory = "0.3.21"
ndarray = { workspace = true }
num-traits = { workspace = true }
once_cell = { workspace = true }
paste = "1.0.15"
petgraph = { workspace = true }
postcard = { workspace = true }
rstest = { workspace = true }
serde = { workspace = true }
serde_json = "1.0.145"
thiserror = { workspace = true }
yosys-netlist-json = { workspace = true }
Loading