Skip to main content

Crate proofman_exps_codegen

Crate proofman_exps_codegen 

Source
Expand description

Per-AIR expression -> straight-line CUDA kernel codegen.

Two kernel families are emitted into each AIR’s self-contained <base>.exps.so (placed next to that AIR’s .bin):

  • the Q (cExp) kernel – register-bounded, chunk size autotuned to zero register spill;
  • one small trace-domain kernel per other covered expression (hint fields, im columns, …), dispatched by expId via exps_expr_covered / exps_launch_expr (see emit_exprs_tu).

The prover dlopens the library by convention and falls back to the bytecode interpreter for anything absent: missing .so, missing symbol, or an uncovered expression.

Two entry points:

Structs§

GenConfig
Codegen configuration. Defaults: CAP=40000, autotune on, arch=auto.
GenSummary
Outcome of a codegen run.
GeneratedAir
One AIR whose kernel was generated.

Functions§

generate_air
Generate the .exps.so for a single AIR directory (the dir containing its *.starkinfo.json + *.expressionsinfo.json). Returns the .so path, or an error if the AIR was skipped (unhandled operand, over CAP, or spills).
generate_all
Generate every AIR’s .exps.so under proving_key. Returns a summary of what was generated, skipped, and placed.