The GitHub Actions job "CI" on tvm-ffi.git/optimize-structural-map-engine has 
failed.
Run started by GitHub user tqchen (triggered by tqchen).

Head commit for run:
39fcf67bdce5f333634472507724e28f23ea6f1c / tqchen <[email protected]>
[REFACTOR][EXTRA] Optimize StructuralMap engine

This improves the StructuralMap engine by bringing lambda callback style to
direct calling style. We also internally used the raw TVMFFIAny ABI path so
engine overhead is minimized in the default path.

Main changes:

- Direct calling style. The callback chain was continuation-passing, a lambda
  nested per link. The mutator now owns its callbacks and tests them with a
  (... || ...) fold; selection, identity remap, descent, and invocation are one
  straight-line function.

- Raw TVMFFIAny on the ABI boundary. Hooks are C-ABI function pointers
  returning TVMFFIAny, a 16-byte POD that passes in registers, while
  Expected<Any> is classified MEMORY and forces the result to the stack.
  Descent through an unmatched node is that boundary, so it now stays raw end
  to end. Hook bodies are unchanged: TVM_FFI_S_MUTATE_ASSIGN_OR_RETURN still
  takes a typed Expected<Any> and moves out only on return.

- Split static and dynamic selection. StructuralMapMutatorObj (header) and
  StructuralMapDynMutatorObj (.cc) now share only the identity remap. This also
  removes a hazard: the dynamic form kept its selected Function in mutable
  state, where a post-order walk could descend into a matching child and
  overwrite the parent's selection.

- Error context is attached by the engine, not by hooks. The engine names a
  node where it dispatches into that node, giving one frame per node instead of
  two on some paths. Both MAYBE_EARLY_RETURN macros lose their node argument,
  and the visit engine no longer routes its own walk through the hook-facing
  macro.

- API. Removes TVM_FFI_S_MUTATE_ASSIGN_FROM, SMutateResultUnchanged,
  AssignOrReturnHelper, and MutateWithIdentityRemapExpected. Adds
  TVM_FFI_UNSAFE_S_MUTATE_ASSIGN_OR_RETURN_SKIP_CHECK for hooks that have
  measured the type check to matter; it is UB on a wrong-typed result and has
  no call sites here. Also fixes AnyUnsafe::CheckAnyStrict, which was missing
  the Any special case both of its siblings had.

- Behavior change. When descent hands back a node whose type no longer matches
  the link that selected it, the engine reports a TypeError instead of passing
  the node through. Default mutation must preserve a node's type, so this only
  fires when a hook has broken that invariant. Match-before-descent ordering,
  identity-remap entry and exit, and the pre-order in-place rules are
  unchanged.

Report URL: https://github.com/apache/tvm-ffi/actions/runs/33921227721

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to