Python class
BufferValue
BufferValue
class max.graph.BufferValue(value)
Bases: Value
[BufferType
]
Represents a mutable semantic tensor within a Graph.
Initializes a BufferValue
from another value.
-
Parameters:
-
value (
Value
|
\_Value
[
mo.BufferType
]
) – The value to wrap, either an MLIR value of buffer type or anotherBufferValue
.
device
property device: DeviceRef
Returns the device of the BufferValue.
dtype
property dtype: DType
Returns the tensor data type.
from_mlir()
classmethod from_mlir(value)
Creates a BufferValue
from an MLIR buffer value.
-
Parameters:
-
value (
Value
[
BufferType
]
) – The MLIR buffer value to wrap. -
Return type:
print()
print(label='debug_buffer')
Prints detailed information about the buffer.
-
Parameters:
-
label (
str
)
rank
property rank: int
Returns the rank (number of dims) of the buffer.
shape
property shape: Shape
Returns the shape of the BufferValue.
type
property type: BufferType
Returns the type of the BufferValue
as a BufferType
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!