IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

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