triton.zeros

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

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

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

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

  • builder (triton.ir.builder) – IR builder to generate code into, optional from within @triton.jit functions