tilelang.language.fill_op¶

Fill operations exposed on the TileLang language surface.

Functions¶

fill(buffer, value[, annotations])

Fill a buffer or buffer region with a specified value.

clear(buffer[, annotations])

Clear a buffer by filling it with zeros.

Module Contents¶

tilelang.language.fill_op.fill(buffer, value, annotations=None)¶

Fill a buffer or buffer region with a specified value.

Parameters:
  • buffer (tilelang._typing.BufferLikeType) – Either a TVM buffer or buffer region to be filled

  • value (tvm.tirx.PrimExpr) – The value to fill the buffer with

  • annotations (dict | None) – Optional annotations to attach to the fill call

Returns:

A TVM intrinsic call that performs the fill operation

Return type:

tvm.tirx.PrimExpr

tilelang.language.fill_op.clear(buffer, annotations=None)¶

Clear a buffer by filling it with zeros.

Parameters:
  • buffer (tilelang._typing.BufferLikeType) – Either a TVM buffer or a variable that contains a buffer region

  • annotations (dict | None) – Optional annotations forwarded to the underlying fill

Returns:

A fill operation that sets the buffer contents to zero

Raises:

ValueError – If the buffer variable contains an invalid buffer region

Return type:

tvm.tirx.PrimExpr