FixtureDType
PythonIO tensor element types a fixture can declare.
FixtureDType()What a run is built for and captured under: the typed fixture that pins a model’s input bytes and declares its outputs, the tensors’ element types and quantization, how the run is timed, the prepared runtime a build links, the board guard a capture answers to, the model analysis that lists a model’s inputs and outputs, and the targets and IO types this heliaPROFILER builds.
Every name on this page is imported from helia_profiler.
API tier: experimental
Generated from the src/helia_profiler tree f38e378c801d34438affb680257217e0b58d2cd1.
FixtureDTypeclassIO tensor element types a fixture can declare.FixtureFileclassA file pinned by its SHA-256; :meth:read refuses bytes that no longer match.FixtureTimingScopeclassWhat the timed span covers.analyze_run_modelfunctionRead a LiteRT model's public inputs and outputs without selecting an engine.FixtureStatePolicyclassInternal state behavior; input restoration is independent of this policy.FixtureRoleclassRole of one fixture tensor; outputs are always SIGNAL.PerTensorQuantizationclassAPI tier: experimentalFixtureMethodclassSelect input-restoration timing and, optionally, the internal-state policy.PerAxisQuantizationclassAPI tier: experimentalanalyze_run_model_for_enginefunctionRead a model's public inputs and outputs as engine's fixture integration admits them.FixtureTensorclassOne named model input or output with its dtype, shape and quantization.FixtureIOclassOne model input with its fixed bytes, or one output with its expected bytes.FixtureOutputclassOne complete output declaration, without a reference answer.TypedFixtureModelAnalysisclassA model's public inputs and outputs in model order, with its graph facts.TypedFixtureclassFixed input bytes and complete ordered outputs for a model.IO tensor element types a fixture can declare.
FixtureDType()A file pinned by its SHA-256; :meth:read refuses bytes that no longer match.
FixtureFile(path: Path, sha256: str) -> NoneWhat the timed span covers.
FixtureTimingScope()What the timed span covers.
INVOKE_ONLY brackets each invocation; RESTORE_AND_INVOKE brackets
the timed loop, so restoring the fixed inputs before each invocation is
inside the span.
API tier: experimental
INVOKE_ONLY = 'invoke_only'RESTORE_AND_INVOKE = 'restore_and_invoke'Read a LiteRT model's public inputs and outputs without selecting an engine.
analyze_run_model(path: str | Path) -> TypedFixtureModelAnalysisRead a LiteRT model’s public inputs and outputs without selecting an engine.
API tier: experimental
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | Path | Required | The ``.tflite`` model. |
Returns
| Type | Description |
|---|---|
TypedFixtureModelAnalysis | The input and output tensors in model order, with their dtype, shape |
TypedFixtureModelAnalysis | and quantization, and the model's graph facts. |
Raises
| Type | Description |
|---|---|
ConfigError | The model is unreadable, or a run cannot pin inputs for it, for example because an input or output shape is dynamic. |
Internal state behavior; input restoration is independent of this policy.
FixtureStatePolicy()Internal state behavior; input restoration is independent of this policy.
API tier: experimental
CARRY = 'carry'Role of one fixture tensor; outputs are always SIGNAL.
FixtureRole()API tier: experimental
PerTensorQuantization(scale: float, zero_point: int) -> Nonedataclass
API tier: experimental
scale: floatzero_point: intSelect input-restoration timing and, optionally, the internal-state policy.
FixtureMethod( timing_scope: FixtureTimingScope, state_policy: FixtureStatePolicy | None = None, power_sync: FixturePowerSync | None = None,) -> Nonedataclass
Select input-restoration timing and, optionally, the internal-state policy.
Carry initializes the engine once, then retains internal state through warmups and measurements. It is how fixtures always run, so a build of a model with internal state records it when no policy is given. Fixed external inputs are still restored each invocation; no internal reset or source-initializer equivalence is implied.
API tier: experimental
timing_scope: FixtureTimingScopestate_policy: FixtureStatePolicy | None = Nonepower_sync: FixturePowerSync | None = NoneAPI tier: experimental
PerAxisQuantization(axis: int, scales: tuple[float, ...], zero_points: tuple[int, ...]) -> Nonedataclass
API tier: experimental
axis: intscales: tuple[float, ...]zero_points: tuple[int, ...]Read a model's public inputs and outputs as engine's fixture integration admits them.
analyze_run_model_for_engine(path: str | Path, engine: EngineType | str) -> TypedFixtureModelAnalysisRead a model’s public inputs and outputs as engine’s fixture integration admits them.
API tier: experimental
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | Path | Required | The ``.tflite`` model. |
engine | EngineType | str | Required | The engine the run builds with. |
Returns
| Type | Description |
|---|---|
TypedFixtureModelAnalysis | The same analysis as :func:`analyze_run_model`, after the engine has |
TypedFixtureModelAnalysis | admitted the model. |
Raises
| Type | Description |
|---|---|
ConfigError | *engine* is not an engine name, the model is unreadable, or the engine does not admit the model. |
One named model input or output with its dtype, shape and quantization.
FixtureTensor( name: str, index: int, dtype: str, shape: tuple[int, ...], quantization: PerTensorQuantization | PerAxisQuantization | None,) -> Nonedataclass
One named model input or output with its dtype, shape and quantization.
API tier: experimental
name: strindex: intdtype: strshape: tuple[int, ...]quantization: PerTensorQuantization | PerAxisQuantization | Nonesize_bytes: intOne model input with its fixed bytes, or one output with its expected bytes.
FixtureIO(tensor: FixtureTensor, data: FixtureFile, role: FixtureRole = FixtureRole.SIGNAL) -> NoneOne complete output declaration, without a reference answer.
FixtureOutput(tensor: FixtureTensor) -> Nonedataclass
One complete output declaration, without a reference answer.
API tier: experimental
tensor: FixtureTensorA model's public inputs and outputs in model order, with its graph facts.
TypedFixtureModelAnalysis( inputs: tuple[FixtureTensor, ...], outputs: tuple[FixtureTensor, ...], has_float16: bool, analysis: ModelAnalysis, resolver: ResolverPlan, has_internal_state: bool = False, has_initializer: bool = False, subgraph_count: int = 1, resource_variable_count: int = 0,) -> Nonedataclass
A model’s public inputs and outputs in model order, with its graph facts.
API tier: experimental
inputs: tuple[FixtureTensor, ...]outputs: tuple[FixtureTensor, ...]has_float16: boolanalysis: ModelAnalysisresolver: ResolverPlanhas_internal_state: bool = Falsehas_initializer: bool = Falsesubgraph_count: int = 1resource_variable_count: int = 0input_bytes: intoutput_bytes: intFixed input bytes and complete ordered outputs for a model.
TypedFixture( model: FixtureFile, inputs: tuple[FixtureIO, ...], outputs: tuple[FixtureIO, ...] | tuple[FixtureOutput, ...],) -> Nonedataclass
Fixed input bytes and complete ordered outputs for a model.
Outputs are descriptors, or legacy FixtureIO references. Reference
bytes are not needed for measurement; legacy identities remain unchanged.
API tier: experimental
model: FixtureFileinputs: tuple[FixtureIO, ...]outputs: tuple[FixtureIO, ...] | tuple[FixtureOutput, ...]expected: FixtureFile | Noneidentity: strverify() -> NoneMachine-readable: run_inputs.json · run_inputs.md, complete and lossless.