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