tvm_tirx.tirx.structural.StructuralVisitorWithConstraintContext#
- class tvm_tirx.tirx.structural.StructuralVisitorWithConstraintContext#
Bases:
StructuralVisitorVisits values using their structural visit behavior while maintaining the constraint context relevant to each callback.
Construct an instance for default traversal, or use the visitor supplied to a
structural_visit_with_constraint_context()callback to control recursion.- Variables:
constraints (tvm_tirx.sym.ConstraintContext) – Effective symbolic facts active at the current value. Read them in ancestor-first order by iterating this context. Do not append during traversal.
- default_visit(value)#
Visit a value’s children with the applicable symbolic facts.
In a traversal callback, use this method to continue through all children without calling the callback again on
valueitself. Child callbacks still receive this visitor and its active facts. Intermediate sequence and lazy-call argument arrays receive no callback.- Parameters:
value (Any) – Value whose children should be visited.
- Returns:
result (tvm_ffi.VisitInterrupt or None) – The first interrupt returned by a child, or
Nonewhen traversal completes. Propagate an interrupt to stop the enclosing traversal.
- property constraints#