triton.language.zeros

triton.language.zeros(shape, dtype)

返回一个张量,其值用标量 0 填充,形状由给定的 shapedtype 决定。

参数:
  • shape (tuple of ints) – 新数组的形状,例如 (8, 16) 或 (8, )

  • dtype (DType) – 新数组的数据类型,例如 tl.float16