The GitHub Actions job "CI" on tvm-ffi.git/2026-02-27/repr-print-dataclass has 
failed.
Run started by GitHub user junrushao (triggered by junrushao).

Head commit for run:
ddb59b89cda8e7b4747da2ade534929a4a40dbce / Junru Shao <[email protected]>
refactor\!: consolidate repr_print and deep_copy into unified dataclass.cc with 
recursive hash/compare APIs

Architecture:
- Merge deep_copy.cc and repr_print.cc into a single dataclass.cc that shares
  an iterative ObjectGraphDFS traversal engine (CRTP-based).  Each operation
  (DeepCopy, ReprPrint, RecursiveHash, RecursiveEq/Lt/Le/Gt/Ge) is a thin
  policy class over the shared DFS machinery, eliminating duplicated graph
  walking logic and keeping cycle / DAG handling in one place.
- New include/tvm/ffi/extra/dataclass.h public header exposes the C++ API
  surface: DeepCopy, ReprPrint, RecursiveHash, RecursiveEq/Lt/Le/Gt/Ge.
- New include/tvm/ffi/reflection/init.h provides MakeInit / RegisterAutoInit
  for auto-generating packed __ffi_init__ constructors from reflection metadata,
  replacing per-type boilerplate.
- ObjectDef destructor now auto-registers __ffi_init__ when no explicit
  refl::init<Args...> was supplied, using the type's creator + field metadata.
- include/tvm/ffi/extra/deep_copy.h → src/ffi/object_internal.h (internal).
- Two new sentinel objects (ffi.GetInvalidObject, ffi.GetKwargsObject) 
registered
  as global functions for KWARGS calling convention support.

Public Interfaces:
- C ABI: 4 new field flag bits in TVMFFIFieldFlagBitMask enum:
  kTVMFFIFieldFlagBitMaskCompareOff (1<<7), kTVMFFIFieldFlagBitMaskHashOff 
(1<<8),
  kTVMFFIFieldFlagBitMaskInitOff (1<<9), kTVMFFIFieldFlagBitMaskKwOnly (1<<10).
- C++ reflection traits (namespace tvm::ffi::reflection):
  - New: compare, hash, kw_only, init(bool), default_, default_factory
  - Renamed: Repr → repr (lowercase, mirrors Python naming)
  - init<> zero-arg specialization now doubles as InfoTrait (init(false) 
excludes
    field from auto-init; init(false) in ObjectDef ctor suppresses auto-init).
  - type_attr: new kHash, kEq, kCompare constants for custom hooks.
- C++ public API: DeepCopy, ReprPrint, RecursiveHash, RecursiveEq/Lt/Le/Gt/Ge
  in tvm::ffi namespace (via dataclass.h).
- Python: test_repr.py → test_dataclass_repr.py.

UI/UX:
- none

Behavioral Changes:
- repr output unchanged for existing types; new repr(false) / compare(false) /
  hash(false) traits allow per-field opt-out of repr, comparison, and hashing.
- Auto-generated __ffi_init__ respects positional ordering (required before
  optional) and keyword-only fields via kw_only trait.
- RecursiveHash/Eq/Compare operations traverse the object graph iteratively
  with cycle detection (consistent with ReprPrint).

Docs:
- No doc-site changes in this PR; Doxygen comments cover all new APIs.

Tests:
- Executed: not run in this session (requires full build)
- C++ tests: test_reflection.cc expanded with new reflection trait tests
- Python tests: test_dataclass_repr.py comprehensive coverage of repr, cycles,
  DAGs, addresses, special chars, containers, nested dataclasses

Untested Edge Cases:
- Concurrent access to auto-init registration from multiple threads (single
  registration is guarded by static init, but ObjectDef destructor timing
  across TUs is load-order dependent).
- RecursiveHash/Compare on very deep non-cyclic graphs near 
kMaxTraversalStackDepth.

BREAKING CHANGE: Repr class renamed to repr (lowercase). deep_copy.h public
header removed (internalized). test_repr.py renamed to test_dataclass_repr.py.
Downstream code using `refl::Repr(false)` must change to `refl::repr(false)`.

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

With regards,
GitHub Actions via GitBox


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

Reply via email to