triton.language.zeros(shape, dtype, builder=None)

Returns a block filled with the scalar value 0 for the given shape and dtype.

  • shape (tuple of ints) – Shape of the new array, e.g., (8, 16) or (8, )

  • dtype (DType) – Data-type of the new array, e.g., triton.float16

  • builder (, optional from within JIT'ed functions) – IR builder to generate code into