triton.language.tensor_descriptor¶
- class triton.language.tensor_descriptor(self, handle, shape: List[tensor], strides: List[tensor], block_type: block_type)¶
一个表示全局内存中张量的描述符。
- __init__(self, handle, shape: List[tensor], strides: List[tensor], block_type: block_type)¶
不由用户代码调用。
方法
__init__
(self, handle, shape, strides, ...)不由用户代码调用。
atomic_add
(self, offsets, value[, _semantic])atomic_and
(self, offsets, value[, _semantic])atomic_max
(self, offsets, value[, _semantic])atomic_min
(self, offsets, value[, _semantic])atomic_or
(self, offsets, value[, _semantic])atomic_xor
(self, offsets, value[, _semantic])gather
(self, *args[, _semantic])收集多个描述符的数据
load
(self, offsets[, _semantic])从描述符中加载一个块,起始于给定的元素偏移量。
scatter
(self, value, *args[, _semantic])分散多个描述符的数据
store
(self, offsets, value[, _semantic])将一个块存储到描述符中,起始于给定的元素偏移量。
属性
block_shape
block_type
dtype
type