aitune.records.shapes
Frontend-neutral tensor contracts and tuning metadata.
Module Contents
Classes
API
Describe one tensor in an executable interface.
Integer dimensions are fixed, strings are symbolic dimensions, and None
is an unnamed dynamic dimension. The specification contains only information
declared by the executable; concrete bounds belong to :class:TunedTensorSpec.
Parameters:
Tensor name used by the executable.
Tensor element type.
Static and dynamic dimensions declared by the executable.
Validate the tensor name and declared dimensions.
Bases: TensorSpec
Describe one tensor over the shape range AITune selected for an artifact.
batch_axis is None when tuning did not identify a logical request
batch axis.
Parameters:
Tensor name used by the executable.
Tensor element type.
Static and dynamic dimensions declared by the executable.
Smallest shape AITune selected for the artifact.
Largest shape AITune selected for the artifact.
Logical batch-axis index, or None when unknown.
Return the largest batch size AITune selected, if known.
Return the smallest batch size AITune selected, if known.
Validate concrete bounds against the static specification.
Add tuning results to an existing tensor specification.
Parameters:
Static tensor specification.
Smallest shape AITune selected for the artifact.
Largest shape AITune selected for the artifact.
Logical batch-axis index, or None when unknown.
Returns: TunedTensorSpec
A tuned tensor specification.