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_shapeblock_typedtype类型