triton.language.flip

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

沿维度 dim 翻转张量 x

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

  • dim (int) – 要沿着翻转的维度

此函数也可以作为成员函数在 tensor 上调用,即 x.flip(...) 而不是 flip(x, ...)