入门指南
Python API
gather()
Triton MLIR方言
编程指南
沿给定维度从张量中收集数据。
src (Tensor) – 源张量
index (Tensor) – 索引张量
axis (int) – 要沿其聚集的维度
该函数也可以作为成员函数在tensor上调用, 使用x.gather(...)而不是 gather(x, ...)。
tensor
x.gather(...)
gather(x, ...)