triton.language.flip

triton.language.flip(x, dim=None)

沿维度 dim 翻转张量 x

参数:
  • x (Block) – 第一个输入张量

  • dim (int) – 沿此维度翻转(目前仅支持最后一个维度)

此函数也可以作为 tensor 的成员函数调用,形式为 x.flip(...) 而非 flip(x, ...)