tilelang.ascend.language.loop¶

Ascend dialect of the loop constructs: the common ops plus Ascend knobs.

Functions¶

unroll(start[, stop, step, explicit, unroll_factor, ...])

The unrolled For statement, with the Ascend unroll-factor pragma.

Module Contents¶

tilelang.ascend.language.loop.unroll(start, stop=None, step=None, *, explicit=False, unroll_factor=None, annotations=None)¶

The unrolled For statement, with the Ascend unroll-factor pragma.

Same semantics as the common tilelang.language.loop.unroll(). unroll_factor is lowered as the "pragma_unroll_factor" annotation, which the Ascend codegen emits as #pragma unroll N.

Parameters:
  • start (PrimExpr) – Iteration range.

  • stop (PrimExpr) – Iteration range.

  • step (PrimExpr) – Iteration range.

  • explicit (bool) – Whether to explicitly unroll the loop at compile time.

  • unroll_factor (Optional[int]) – Partial unroll factor, lowered as the "pragma_unroll_factor" annotation.

  • annotations (Optional[Dict[str, Any]]) – Additional loop annotations; values in it take precedence.

Return type:

tvm.tirx.script.builder.frame.ForFrame