Skip to main content

Python module

max.graph

APIs to build inference graphs for MAX.

Graph construction

GraphRepresents a single MAX graph.
KernelLibraryManages custom kernel libraries and operations for a graph.

Graph values

BufferValueRepresents a mutable semantic tensor within a Graph.
BufferValueLikeRepresent a PEP 604 union type
TensorValueRepresents a value semantic tensor within a Graph.
TensorValueLikeRepresent a PEP 604 union type
ValueRepresents a symbolic value within a Graph.

Type system

BufferTypeA symbolic buffer type.
TensorTypeA symbolic tensor type.
TypeThe type of any value in a MAX graph.

Shapes and dimensions

AlgebraicDimAn algebraic tensor dimension to enable expressions over symbolic dimensions.
DimA tensor dimension.
DimLikeRepresent a PEP 604 union type
ShapeA sequence of Dim values representing a tensor shape.
ShapeLikealias of Iterable[intstrDiminteger[Any]TypedAttr]
StaticDimA static tensor dimension.
SymbolicDimA symbolic tensor dimension.

Devices

DeviceKindA device type representation.
DeviceRefA symbolic device representation.

Weights

ShardingStrategySpecifies how a Weight should be sharded across multiple devices.
WeightRepresents a value in a Graph that can be loaded at a later time.

Submodules