triton.language.zeros

triton.language.zeros(shape, dtype)

返回一个用标量值0填充的张量,根据给定的shapedtype

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

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