tvm_tirx.tirx.layout.Axis#
- class tvm_tirx.tirx.layout.Axis(*args, **kwargs)#
Bases:
EnumA named physical coordinate used by a layout.
Use
Axis.get(name)or a registered attribute such asAxis.m. Axis metadata identifies memory or thread coordinates and any owning backend;value @ axisattaches a stride or offset to that coordinate.Examples
from tvm_tirx.script import tirx as T memory = T.Axis.get("m") # Also available as T.Axis.m. layout = T.TileLayout(T.S[8 : 2 @ memory]) assert int(layout.apply(3)["m"]) == 6
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
- property name: str#
Return the canonical axis name.
- classmethod get(name)#
Get or create the axis singleton named name.
Unknown names are registered without thread or memory attributes.
- Parameters:
name (str)
- Return type:
- property backend: str | None#
Backend owning this axis, or None for a generic axis.
- get_scope()#
Get the scope of the axis.
- Return type:
ThreadScope | None
- get_subscope()#
Get the subscope of the axis.
- Return type:
ThreadScope | None