tvm_ffi.StructuralVisitor#
- class tvm_ffi.StructuralVisitor[source]#
Bases:
ObjectLow-level structural traversal visitor.
This class exposes the low-level visitor object used by structural traversal hooks.
Methods
__ffi_init__(*args, **kwargs)__init__()Create a default structural visitor.
__init_handle_by_constructor__(fconstructor, ...)Defined in
Objectas method__init_handle_by_constructor__().__move_handle_from__(other)Defined in
Objectas method__move_handle_from__()._move()Low-level API to return the currently active structural def-region kind.
is_(other)Defined in
Objectas methodis_().same_as(other)visit(value)Low-level API to visit
valueusing this visitor's dispatch behavior.with_def_region_kind(kind, callback)Low-level API to run
callbackwith a temporarily active def-region kind.Attributes
id_Defined in
Objectas attributeid_.- visit(value)[source]#
Low-level API to visit
valueusing this visitor’s dispatch behavior.- Parameters:
value (
Any) – Value to visit.- Return type:
- Returns:
result –
Noneif traversal should continue, otherwise aVisitInterruptcarrying the early-exit payload.
- def_region_kind()[source]#
Low-level API to return the currently active structural def-region kind.
- Return type:
DefRegionKind- Returns:
kind – The active
DefRegionKind.