triton.language.zeros

triton.language.zeros(shape, dtype)

返回一个填充了标量值 0 的张量,其形状为 shape,数据类型为 dtype

参数:
  • shape (整数元组) – 新数组的形状,例如 (8, 16) 或 (8, )

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