You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds end-to-end sparse-packing CKKS bootstrap. The user opts into a sparse
configuration with CkksBtpParam.create_sparse_param(log_slots) (or
.create_toy_sparse_param for N=8192 dev runs), and the existing bootstrap()
op in the DAG goes through:
- CPU: lattigo's native sparse path (LogSlots < LogN-1) via the new
SetCkksParameterLogSlots SDK export. The ABI bridge encodes/decodes at
the param's LogSlots, so sparse plaintexts pack/unpack correctly.
- GPU: HEonGPU's existing regular_bootstrapping_v2 once context.set_slot_count
puts the encoder in gap_>1 mode. mega_ag_runners/gpu/gpu_wrapper.cu uses
the static prime-chain helper ckks_sparse_bootstrap_chain_n16 (semi-public
in HEonGPU; included explicitly here) to translate the frontend's dense
CkksBtpParam into the sparse Q + level_starts that BootstrappingConfigV2's
4-arg ctor expects. This is a translator, not a duplicate code path -- once
the frontend learns to emit sparse-correct values directly, the branch
collapses into the dense path.
Tests: test_sparse_bootstrap (CPU lattigo path) demonstrates the 1.32-1.59x
speedup at log_slots in [8, 14] vs the dense LogSlots=LogN-1 baseline.
test_gpu_ckks/cpu_ckks add CKKS smoke coverage. The example/
ckks_sparse_bootstrap_cpu/ shows the C++ and Python entry points for users.
Carries submodule pointers: HEonGPU 6675bee (sparse-packing CKKS bootstrap),
lattigo bb1b0bb (SetCkksParameterLogSlots + decoupled encode/decode).
0 commit comments