发布

  • [Arith] Make Analyzer a tvm-ffi Object (#19675)

    frostbyte_neo 发布于 2026-06-08 14:13:56 +00:00

    This PR makes arith::Analyzer a first-class tvm-ffi object.

    The implementation splits the previous concrete Analyzer class into:

    • AnalyzerObj, the mutable object node that owns analyzer state,
      sub-analyzers, caches, and bindings
    • Analyzer, a reference-counted ObjectRef handle that can be passed
      across the tvm-ffi boundary

    This allows Python and C++ to share the same analyzer instance, so
    bindings, constraints, and cached facts can persist across FFI calls.

    Public APIs that accept an analyzer now use const arith::Analyzer&,
    while internal helper APIs that only borrow the object continue to use
    AnalyzerObj*.


    Co-authored-by: Ubospica ubospica@gmail.com

    下载附件