IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Python class

BufferLayout

BufferLayout

class max.experimental.sharding.BufferLayout(dtype, shape, device)

source

Bases: TensorLayout

A buffer a compiled callable may store through.

An argument given this layout lowers to a BufferValue at every boundary it crosses, so a write to it reaches the caller. It is a TensorLayout in every other respect, which is why a sharding rule never has to know the difference; only the lowering does.

Parameters:

local_types

property local_types: Sequence[BufferType]

source

One BufferType per device, in mesh order.