tvm_tirx.tirx.script.serial#
- tvm_tirx.tirx.script.serial(start, stop=None, *, annotations=None, step=None, unroll=None, dtype=None)#
The serial For statement.
- Parameters:
start (Expr) – The minimum value of iteration.
stop (Expr) – The maximum value of iteration.
annotations (Dict[str, Any]) – The optional annotations of the For statement.
step (Expr) – The optional step value of iteration.
unroll (bool or int, optional) – If True, adds
{"tirx.pragma_unroll": True}annotation, which asks CUDA codegen to emit#pragma unrollwhile preserving the loop as a C++for. If False, adds{"tirx.disable_unroll": True}annotation. If a positive integer, emits#pragma unroll N. Boolean values are handled separately from integers, soFalsekeeps disabling unrolling.dtype (str, optional) – The dtype of the loop variable, either
"int32"or"uint32". When omitted it is inferred from the bounds. Bounds that do not already have this dtype are converted (literals are retyped, other expressions get a Cast).
- Returns:
res (_shared_frame.ForFrame) – The ForFrame.
- Return type: