Skip to main content

Python module

shape

Library for graph shape types.

Shape

class max.graph.shape.Shape(dims=())

Parameters:

dims (ShapeLike )

from_mlir()

classmethod from_mlir(attr)

Parameters:

attr (TypedAttr )

Return type:

Shape

is_static()

static is_static(shape)

Return type:

TypeGuard[list[StaticDim]]

parameters

property parameters: Iterable[SymbolicDim]

Lists the symbolic dimension names on which this shape depends.

rank

property rank

static_dims

property static_dims: list[int]

Returns all static dims in the shape as a list of integers.

to_mlir()

to_mlir()

Return type:

ShapeAttr