Skip to content

zorch.pcs.jagged.shard_open_bench

Benchmark the stacked jagged PCS (commit + open at a random point) on a real SP1 shard dump.

Reads a GPU-trace dump's per-chip .meta/.bin matrices, packs them column-major into the stacked dense buffer the commit expects, builds one committed StackedRound (RS-encode + SMCS Merkle commit), then opens (stacked_basefold_open, jit'd) at a random EF point. Reports cold (compile) + warm wall-time for commit and open separately.

The open's work (one batched FRI over the codeword: log_s fold rounds, num_queries openings, grind) is independent of the point/eval values, so a random z_final/dense_eval give representative timing.

Run

PYTHONPATH=. CUDA_VISIBLE_DEVICES=0 XLA_PYTHON_CLIENT_PREALLOCATE=false FRX_COMPILATION_CACHE_DIR=/tmp/jaxcc_polybench /tmp/sponge-venv/bin/python zorch/pcs/jagged/shard_open_bench.py --shard-dir=/data/sp1_dumps/rsp_21740136_sp1/shard0