Skip to main content

Python class

BufferType

BufferType

class max.graph.BufferType(dtype, shape, device)

source

Bases: _TensorTypeBase[BufferType]

A symbolic buffer type.

This is a reference to a tensor that can be mutated in place.

Parameters:

as_tensor()

as_tensor()

source

Returns the analogous tensor type.

Return type:

TensorType

from_mlir()

classmethod from_mlir(type)

source

Constructs a buffer type from an MLIR type.

Parameters:

type (BufferType) – The MLIR Type to parse into a buffer type.

Returns:

The buffer type represented by the MLIR Type value.

Return type:

BufferType

to_mlir()

to_mlir()

source

Converts to an mlir.Type instance.

Returns:

An mlir.Type in the specified Context.

Return type:

BufferType