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)
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:
-
- dtype (DType)
- shape (Shape)
- device (Device | DeviceRef | DeviceMesh | DeviceMapping)
local_types
property local_types: Sequence[BufferType]
One BufferType per device, in mesh order.