Skip to main content

Module runtime_checks

Module runtime_checks 

Source
Expand description

Runtime shape checks for tensors bound to a graph with static or dynamic dimensions.

RuntimeShapeState validates that bound tensors match the graph’s descriptors: same rank, static dimensions equal, dynamic dimensions within max_size, and dimensions that share a name agree across all inputs and outputs. Used by MLContext::dispatch and the *_checked executor functions.

Structs§

RuntimeShapeState
Tracks the values bound to named dynamic dimensions during one validation pass.

Enums§

TensorKind
Whether a binding is a graph input or output; selects the error wording.

Functions§

validate_shape_data_length
Check that data_len elements match the element count of shape.