Skip to main content

ProofEvent

Enum ProofEvent 

Source
#[non_exhaustive]
pub enum ProofEvent {
Show 16 variants CircuitCompiled { total_layers: usize, input_shape: (usize, usize), output_shape: (usize, usize), nodes: Vec<CircuitNodeMeta>, has_simd: bool, simd_num_blocks: usize, }, LayerActivation { layer_idx: usize, node_id: usize, kind: LayerKind, output_shape: (usize, usize), output_sample: Vec<u32>, stats: ActivationStats, }, AttentionHeatmap { layer_idx: usize, head_idx: usize, num_heads: usize, seq_len: usize, scores: Vec<f32>, }, ProofStart { model_name: Option<String>, backend: String, num_layers: usize, input_shape: (usize, usize), output_shape: (usize, usize), }, LayerStart { layer_idx: usize, kind: LayerKind, input_shape: (usize, usize), output_shape: (usize, usize), trace_cost: usize, claim_value_approx: f32, gpu_device: Option<usize>, }, SumcheckRound { layer_idx: usize, round: usize, total_rounds: usize, poly_deg2: Option<RoundPolyViz>, poly_deg3: Option<RoundPolyDeg3Viz>, claim_value_approx: f32, }, LayerEnd { layer_idx: usize, kind: LayerProofKind, final_claim_value_approx: f32, duration_ms: u64, rounds_completed: usize, }, ProofComplete { duration_ms: u64, num_layer_proofs: usize, num_weight_openings: usize, weight_binding_mode: String, }, WeightOpeningStart { weight_node_id: usize, eval_point_len: usize, }, WeightOpeningEnd { weight_node_id: usize, duration_ms: u64, commitment_hex: String, }, AggregatedBindingStart { num_claims: usize, num_matrices: usize, }, AggregatedBindingEnd { duration_ms: u64, estimated_calldata_felts: usize, }, GpuStatus { devices: Vec<GpuSnapshot>, matmul_done: usize, matmul_total: usize, layers_done: usize, layers_total: usize, }, StarkProofStart { num_activation_layers: usize, num_add_layers: usize, num_layernorm_layers: usize, }, StarkProofEnd { duration_ms: u64, }, Log { level: LogLevel, message: String, },
}
Expand description

All events that can be emitted during a stwo-ml proof session.

Consumers (e.g. RerunSink) pattern-match this enum to route events to the appropriate Rerun entity paths.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

CircuitCompiled

Emitted once after the LayeredCircuit is compiled from the ComputationGraph.

Fields

§total_layers: usize
§input_shape: (usize, usize)
§output_shape: (usize, usize)
§has_simd: bool
§simd_num_blocks: usize
§

LayerActivation

Raw layer activation output sampled for visualization.

Fields

§layer_idx: usize
§node_id: usize
§output_shape: (usize, usize)
§output_sample: Vec<u32>

Up to max_sample elements from the output tensor (M31 raw values).

§

AttentionHeatmap

Attention score matrix for one head (sampled to ≤64×64).

Fields

§layer_idx: usize
§head_idx: usize
§num_heads: usize
§seq_len: usize
§scores: Vec<f32>

Row-major, length = min(seq_len,64)².

§

ProofStart

Start of the entire proof session.

Fields

§model_name: Option<String>
§backend: String
§num_layers: usize
§input_shape: (usize, usize)
§output_shape: (usize, usize)
§

LayerStart

Beginning of a single layer’s reduction.

Fields

§layer_idx: usize
§input_shape: (usize, usize)
§output_shape: (usize, usize)
§trace_cost: usize

Estimated trace cost for this layer.

§claim_value_approx: f32

Initial claim value (QM31.a normalized to f32).

§gpu_device: Option<usize>
§

SumcheckRound

One round of sumcheck within a layer.

Fields

§layer_idx: usize
§round: usize
§total_rounds: usize
§poly_deg2: Option<RoundPolyViz>

Degree-2 polynomial (MatMul / LogUp rounds).

§poly_deg3: Option<RoundPolyDeg3Viz>

Degree-3 polynomial (Mul layer rounds).

§claim_value_approx: f32

Reduced claim after this round.

§

LayerEnd

End of a single layer’s reduction.

Fields

§layer_idx: usize
§final_claim_value_approx: f32
§duration_ms: u64
§rounds_completed: usize
§

ProofComplete

The entire proof session completed.

Fields

§duration_ms: u64
§num_layer_proofs: usize
§num_weight_openings: usize
§weight_binding_mode: String
§

WeightOpeningStart

Fields

§weight_node_id: usize
§eval_point_len: usize
§

WeightOpeningEnd

Fields

§weight_node_id: usize
§duration_ms: u64
§commitment_hex: String

Hex-encoded commitment (first 8 bytes).

§

AggregatedBindingStart

Fields

§num_claims: usize
§num_matrices: usize
§

AggregatedBindingEnd

Fields

§duration_ms: u64
§estimated_calldata_felts: usize
§

GpuStatus

Fields

§devices: Vec<GpuSnapshot>
§matmul_done: usize
§matmul_total: usize
§layers_done: usize
§layers_total: usize
§

StarkProofStart

Fields

§num_activation_layers: usize
§num_add_layers: usize
§num_layernorm_layers: usize
§

StarkProofEnd

Fields

§duration_ms: u64
§

Log

Free-form log entry.

Fields

§level: LogLevel
§message: String

Trait Implementations§

Source§

impl Clone for ProofEvent

Source§

fn clone(&self) -> ProofEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProofEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProofEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ProofEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.