Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
97bfb0a
Update specs/mixed-ring-dimension-per-level.md numbers and removed un…
omibo Aug 5, 2026
563af0d
feat(planner): add declarative adaptive ring dimensions
omibo Aug 6, 2026
d42c391
Merge main into refactor/mixed-dimension
omibo Aug 6, 2026
dfff6a8
fix(schedules): align generated catalog after main merge
omibo Aug 6, 2026
8c76d7a
feat(planner): restore adaptive ring dimension search
omibo Aug 6, 2026
8a102d2
feat(config): default fp128 onehot to adaptive dimensions
omibo Aug 6, 2026
582c068
Merge main into refactor/mixed-dimension
omibo Aug 6, 2026
985579c
refactor(schedules): remove fp128 d256 onehot catalog
omibo Aug 6, 2026
45169d9
refactor(config): canonicalize fp128 onehot naming
omibo Aug 6, 2026
f404c3a
refactor(config): remove fp128 d128 dense preset
omibo Aug 6, 2026
308ebc8
feat(config): add adaptive fp128 dense schedules
omibo Aug 6, 2026
6e0f28a
refactor(config): remove standalone fp128 d64 catalogs
omibo Aug 6, 2026
cdd6a0a
docs: remove PR description draft
omibo Aug 6, 2026
ebe43af
fix(schedules): align adaptive grouped profiles
omibo Aug 7, 2026
4d2ef73
Merge remote-tracking branch 'origin/main' into refactor/mixed-dimension
omibo Aug 7, 2026
0d34505
fix(ci): simplify benchmark workload labels
omibo Aug 7, 2026
43967be
fix(ci): use adaptive catalog for direct multi-group benchmark
omibo Aug 7, 2026
bbd5f9a
fix(planner): align adaptive search with review
omibo Aug 7, 2026
daff3a1
fix(tests): honor adaptive root dimensions
omibo Aug 7, 2026
95dfaf4
docs(spec): align mixed-D setup model
quangvdao Aug 7, 2026
8e243cb
fix(benches): restore adaptive catalog replay
quangvdao Aug 7, 2026
4454d3a
feat(schedules): support adaptive multi-chunk rings (#373)
omibo Aug 7, 2026
a86cea0
refactor(config): drop legacy fp128 D64 presets for adaptive OneHot/D…
omibo Aug 7, 2026
11e07d0
fix(config): complete adaptive fp128 preset migration
omibo Aug 7, 2026
c793937
refactor(planner): use uniform standalone precommits
omibo Aug 7, 2026
399ec49
Merge remote-tracking branch 'origin/main' into refactor/mixed-dimension
omibo Aug 7, 2026
9f9cab1
fix adaptive benchmark ring dimensions
omibo Aug 8, 2026
149cfac
refactor(planner): unify adaptive suffix search
omibo Aug 8, 2026
87b93b1
Merge remote-tracking branch 'origin/main' into refactor/mixed-dimension
omibo Aug 8, 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: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
- name: Schedule catalog wiring
run: |
cargo test --release -p akita-config --no-default-features --test schedule_catalog_feature_off
cargo test --release -p akita-config --features schedules-fp128-d64-onehot,schedules-fp128-d64-dense --test schedule_catalog_miswire
cargo test --release -p akita-config --features schedules-fp128-onehot,schedules-fp128-dense --test schedule_catalog_miswire

test-timing:
name: Test timing
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/profile-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ env:
# - Small prime fields (fp32/fp64): their D32/D64 schedules are non-securable
# under the reprice (they degrade to a cleartext root-direct proof), so the
# smallest secure ring degree is D128. Those cells use D128 one-hot.
# - fp128: D64 is the actual proof-size optimum for both dense and one-hot
# (~20% smaller than D128 while still folding through 8-9 secure levels;
# confirmed by `current_d64_onehot_schedule_stays_within_audited_sis_widths`
# and the `best_dense_schedule`/`best_onehot_schedule` selectors, which pick
# D64 over D128). The fp128 cells therefore track D64, not D128.
AKITA_BENCH_MODE: onehot_fp128_d64
# - fp128: `onehot_fp128` is the canonical direct one-hot profile. Explicit
# D64 rows remain in the matrix as uniform and recursive/distributed
# comparison profiles.
AKITA_BENCH_MODE: onehot_fp128
AKITA_BENCH_RUNS: "3"
# One warm-up run per case is discarded before the measured runs to
# prime caches and lazily-initialized statics; cache misses on the
Expand Down Expand Up @@ -64,21 +62,18 @@ jobs:
# is the largest validated size that both fits that budget and still folds
# through multiple recursive levels. The fp128 cells fold aggressively enough
# to stay at nv=32.
#
group:
- name: 1-fp128-dense
cases: |
dense_fp128_d64:24:1
dense_fp128:24:1
- name: 3-flat-onehot-suite
cases: |
onehot_fp32_d128:28:1
onehot_fp64_d128:28:1
onehot_fp128_d64:32:1
onehot_fp128_mixed_dim:32:1
onehot_fp128_d64:30:4
- name: 4-multi-group-recursive-direct
onehot_fp128:32:1
- name: 4-multi-group-direct
cases: |
onehot_fp128_d64_multi_group_recursive:32:4:direct
onehot_fp128_multi_group:32:4:direct
- name: 5-multi-group-recursive
cases: |
onehot_fp128_d64_multi_group_recursive:32:4:recursive
Expand Down
36 changes: 19 additions & 17 deletions book/src/usage/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,44 @@ traces, and the CI benchmark matrix.
## Canonical command

```bash
AKITA_MODE=onehot_fp128_d64 AKITA_NUM_VARS=32 \
AKITA_MODE=onehot_fp128 AKITA_NUM_VARS=32 \
cargo run --release --no-default-features \
--features parallel,profile-onehot-fp128-d64 --example profile
--features parallel,profile-onehot-fp128 --example profile
```

Run from `crates/akita-pcs/`. The harness refuses debug builds unless
`AKITA_ALLOW_DEBUG_PROFILE=1`.

This feature-pruned command measures the adaptive `onehot_fp128` catalog. With
the normal default feature set, omitting `AKITA_MODE` selects the same profile.

Always use the feature-pruned command above when profiling this path or
measuring its binary size/codegen time. An unpruned default-feature build of
the `profile` example retains every locally supported profile mode; it is a
multi-mode developer artifact, not a like-for-like onehot fp128/D64 binary.
multi-mode developer artifact, not a like-for-like fp128 one-hot binary.
Mixing the two build surfaces can roughly double the example binary and make a
normal release link look like a verifier regression.

## Presets and ring degrees

Under committed-fold A-role SIS pricing, **fp128** production is **D=64**
(signed-sparse; ~20% smaller than D128).
Shipped tables: `fp128_d64_onehot`, `fp128_d64_dense`, `fp128_d128_*`.
The default direct **fp128** one-hot preset is adaptive: generated tables choose
the first two fold levels and use D64 for the uniform suffix. Direct dense uses
the same adaptive policy. Recursive and multi-chunk companion presets
remain D64. Shipped direct tables are `fp128_onehot` and `fp128_dense`.
**fp128 D=32** is not a valid A-role fold degree (`d_a ≥ 64`); there is no
`D32OneHot` preset.
**fp32/fp64** D32/D64 are not securable; smallest secure choice is **D128
one-hot** (CI benches at `nv=28`).

Compare ring degrees with
`akita_config::proof_optimized::fp128::best_onehot_schedule` /
`best_dense_schedule`.
The direct configs are `akita_config::proof_optimized::fp128::OneHot` and
`akita_config::proof_optimized::fp128::Dense`.

## Environment knobs

| Variable | Default | Purpose |
|----------|---------|---------|
| `AKITA_MODE` | `onehot_fp128_d64` | Preset family and representation |
| `AKITA_NUM_VARS` | `25` in code (`32` in canonical command above) | Witness size |
| `AKITA_MODE` | `onehot_fp128` | Preset family and representation |
| `AKITA_NUM_VARS` | `32` | Witness size |
| `AKITA_NUM_POLYS` | `1` | Batched opening count |
| `AKITA_PROFILE_TRACE` | `1` | Chrome/Perfetto trace output |
| `AKITA_PROFILE_LOG` | `trace` | `tracing` filter |
Expand All @@ -55,9 +58,9 @@ Implementation: `crates/akita-pcs/examples/profile/main.rs`.
Disable parallel while retaining the same pruned workload:

```bash
AKITA_MODE=onehot_fp128_d64 AKITA_NUM_VARS=32 \
AKITA_MODE=onehot_fp128 AKITA_NUM_VARS=32 \
cargo run --release --no-default-features \
--features profile-onehot-fp128-d64 --example profile
--features profile-onehot-fp128 --example profile
```

## CI benchmark matrix
Expand All @@ -73,10 +76,9 @@ Committed-fold A-role pricing (every cell folds securely):
|------|----|----|------------|
| `onehot_fp32_d128` | 28 | 1 | `direct` |
| `onehot_fp64_d128` | 28 | 1 | `direct` |
| `dense_fp128_d64` | 24 | 1 | `direct` |
| `onehot_fp128_d64` | 32 | 1 | `direct` |
| `onehot_fp128_d64` | 30 | 4 | `direct` |
| `onehot_fp128_d64_multi_group_recursive` | 32 | 4 | `direct` |
| `dense_fp128` | 24 | 1 | `direct` |
| `onehot_fp128` | 32 | 1 | `direct` |
| `onehot_fp128_multi_group` | 32 | 4 | `direct` |
| `onehot_fp128_d64_multi_group_recursive` | 32 | 4 | `recursive` |
| `onehot_fp128_d64_multi_group_recursive_multi_chunk_w8r2` | 32 | 4 | `recursive` |
| `onehot_fp128_d64_multi_chunk_w2r2` | 32 | 1 | `direct` |
Expand Down
19 changes: 9 additions & 10 deletions book/src/usage/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,31 @@ a newcomer should reach for first.

- `crates/akita-pcs/tests/single_poly_e2e.rs` (smallest E2E template).
- `AGENTS.md` (Essential Commands); `crates/akita-pcs/examples/profile/main.rs`
(`AKITA_MODE=onehot_fp128_d64`, `AKITA_NUM_VARS=32`).
(`AKITA_MODE=onehot_fp128`, `AKITA_NUM_VARS=32`).

## Choosing a configuration

How the `fp32` / `fp64` / `fp128` preset families differ, when to choose one-hot
vs dense, and how ring dimension `D` trades proof size against prover time
and setup memory.

**Paper framing (§3.5 `sec:akita-params`).** Production uses **d=64** with the
signed-sparse challenge family. **d=128** remains a comparison / legacy profile;
**d=32** is not a valid A-role fold degree (`d_a ≥ 64`).
**Paper framing (§3.5 `sec:akita-params`).** The uniform production profile uses
**d=64** with the signed-sparse challenge family. The default direct fp128
one-hot preset now chooses dimensions per fold from generated adaptive tables;
**d=32** remains invalid for the A-role fold degree (`d_a ≥ 64`).

**Proof-size / CI reality (committed-fold A-role SIS pricing).**

| Field | Typical production choice | Notes |
|-------|---------------------------|--------|
| **fp128** | **D64 one-hot** (`onehot_fp128_d64`) | **Production default** (Paper §3.5 signed-sparse at d=64). Planner picks **D64 over D128** (~20% smaller proof); both fold securely. Shipped tables: D128 dense/onehot, D64 dense/onehot. Jolt recursion and profile defaults pin **`fp128::D64OneHot`**. |
| **fp128** | **One-hot** (`fp128::OneHot`) | **Default direct one-hot preset.** The generated schedule chooses dimensions for the first two fold levels and uses D64 afterward. Direct dense uses `fp128::Dense`; recursive/tensor/multi-chunk companions remain pinned to D64. |
| **fp32 / fp64** | **D128 one-hot** | D32/D64 are **not securable** under the reprice and unsupported schedules fail fast. CI benches at **nv=28** (eq-table memory budget). Shipped: fp32 D128/D256 onehot; fp64 D128 dense/onehot and D256 onehot. |

Use `akita_config::proof_optimized::fp128::best_onehot_schedule` /
`best_dense_schedule` to compare fp128 **D64 vs D128** for a lookup key. Every preset
falls back to the verifier-reachable DP on table miss.
Use `fp128::OneHot` for direct one-hot and `fp128::Dense` for direct dense.

**Test harness vs profile defaults.** `crates/akita-pcs/tests/common/mod.rs` uses
`fp128::D64OneHot` (one-hot) and `fp128::D64Dense` (dense tests); profile/CI
canonical dense is **`fp128::D64Dense`** at D64.
direct protocol tests should use `fp128::OneHot` and `fp128::Dense`; specialized
recursive, tensor, and multi-chunk tests use their dedicated D64 companions.

**Sources to fold in**

Expand Down
18 changes: 5 additions & 13 deletions crates/akita-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ readme = "../../README.md"
default = ["schedules-default"]
test-support = []
schedules-default = [
"schedules-fp128-d64-onehot",
"schedules-fp128-d64-dense",
"schedules-fp128-d128-onehot",
"schedules-fp128-d128-dense",
"schedules-fp128-d256-onehot",
"schedules-fp128-onehot",
"schedules-fp128-dense",
"schedules-fp32-d128-onehot",
"schedules-fp32-d256-onehot",
"schedules-fp64-d128-dense",
Expand All @@ -33,26 +30,21 @@ schedules-default = [
]
all-schedules = [
"schedules-default",
"schedules-fp128-mixed-dim-onehot",
"schedules-fp128-d64-onehot-recursive",
"schedules-fp128-d64-onehot-recursive-multi-chunk-w8r2",
"schedules-fp128-d64-onehot-multi-chunk",
"schedules-fp128-d64-onehot-multi-chunk-w2r2",
"schedules-fp128-d64-onehot-multi-chunk-w4r2",
"schedules-fp128-d64-dense-multi-chunk",
]
schedules-fp128-d64-onehot = ["akita-schedules/fp128-d64-onehot"]
schedules-fp128-mixed-dim-onehot = ["akita-schedules/fp128-mixed-dim-onehot"]
schedules-fp128-onehot = ["akita-schedules/fp128-onehot"]
schedules-fp128-dense = ["akita-schedules/fp128-dense"]
schedules-fp128-d64-onehot-recursive = [
"akita-schedules/fp128-d64-onehot-recursive",
]
schedules-fp128-d64-onehot-recursive-multi-chunk-w8r2 = [
"akita-schedules/fp128-d64-onehot-recursive-multi-chunk-w8r2",
]
schedules-fp128-d64-dense = ["akita-schedules/fp128-d64-dense"]
schedules-fp128-d128-onehot = ["akita-schedules/fp128-d128-onehot"]
schedules-fp128-d128-dense = ["akita-schedules/fp128-d128-dense"]
schedules-fp128-d256-onehot = ["akita-schedules/fp128-d256-onehot"]
schedules-fp128-d64-onehot-multi-chunk = [
"akita-schedules/fp128-d64-onehot-multi-chunk",
]
Expand Down Expand Up @@ -89,7 +81,7 @@ akita-planner = { version = "0.1.0", path = "../akita-planner", features = [
[[test]]
name = "schedule_catalog_miswire"
path = "tests/schedule_catalog_miswire.rs"
required-features = ["schedules-fp128-d64-onehot", "schedules-fp128-d64-dense"]
required-features = ["schedules-fp128-onehot", "schedules-fp128-dense"]

[[test]]
name = "generated_tables"
Expand Down
Loading
Loading