Skip to content
data

OpInfo

OpInfo(name: str, count: int, sample_shape: tuple[int, ...] | None, sample_dtype: str | None)

Per-op-name summary inside a DiagnosisReport.

A single OpInfo aggregates all nodes in the trace with the same op name into one record (count is the number of occurrences; sample_shape / sample_dtype are taken from the first occurrence's primary output, useful when reporting a coverage gap).

Attributes

namestr
The trace op name (e.g. "linear", "var", "argmax").
countint
Number of times the op appears in the captured trace.
sample_shapetuple[int, ...] | None
Shape of the first occurrence's primary output, or None if the op produces no outputs (rare; defensive fallback).
sample_dtypestr | None
Dtype name of the first occurrence's primary output ("float32" / "int64" / ...) — uses lucid._C.engine.Dtype.name.

Used by 1