Class WalkResult#

Inheritance Relationships#

Base Type#

Class Documentation#

class WalkResult : public tvm::ffi::Variant<VisitInterrupt, int32_t>#

Per-node control signal returned by structural walk callbacks.

Walk control result with one of three actions:

Public Types

using Storage = Variant<VisitInterrupt, int32_t>#

The underlying Variant used as storage.

Public Static Functions

static inline WalkResult Advance()#

Continue traversal and visit this node’s children.

static inline WalkResult Skip()#

Continue traversal but skip this node’s children.

static inline WalkResult Interrupt(VisitInterrupt signal = VisitInterrupt())#

Halt the walk and propagate an interrupt.

Parameters:

signal – The interrupt to propagate. Defaults to an interrupt with FFI None payload.

Public Static Attributes

static constexpr int32_t kAdvanceTag = 0#

Internal tag value carried by WalkResult::Advance().

static constexpr int32_t kSkipTag = 1#

Internal tag value carried by WalkResult::Skip().