[REFACTOR][IR] Migrate include/tvm/node into include/tvm/ir#19463
Merged
Conversation
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
Member
Author
|
@tvm-bot rerun |
The node/ directory was a legacy artifact from when runtime "node" infrastructure was separate from IR-level concerns. All remaining public headers have direct IR semantics and belong under tvm/ir/. Moves (header + include-guard rename): - include/tvm/node/functor.h → include/tvm/ir/node_functor.h - include/tvm/node/cast.h → include/tvm/ir/cast.h - include/tvm/node/repr.h → include/tvm/ir/repr.h - include/tvm/node/script_printer.h→ include/tvm/ir/script_printer.h - include/tvm/node/attr_registry_map.h → include/tvm/ir/attr_registry_map.h Source moves: - src/node/repr.cc → src/ir/repr.cc - src/node/script_printer.cc→ src/ir/script_printer.cc Deletes (dead shims / empty stubs): - include/tvm/node/repr_printer.h (shim → tvm/node/repr.h) - include/tvm/node/structural_equal.h (shim → tvm/ffi/extra/structural_equal.h) - include/tvm/node/structural_hash.h (shim → tvm/ffi/extra/structural_hash.h) - src/node/repr_printer.cc (empty stub) - src/node/container_printing.cc (empty stub) All ~35 in-tree consumers updated to use the new paths. CMakeLists.txt: drop the now-empty src/node/*.cc glob.
b9daeee to
2535d69
Compare
Contributor
|
Failed to re-run CI in https://github.com/apache/tvm/actions/runs/25059010729 Detailswith response |
spectrometerHBH
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
include/tvm/node/is a leftover separation from when "node" was a distinct concept from "ir". Today everything ininclude/tvm/node/is just lower-level IR plumbing routinely included fromir/. This PR collapses the two by moving surviving headers intoir/, deleting dead ones, and redirecting the rest to tvm-ffi where the machinery already lives.Main changes:
include/tvm/node/{functor,cast,script_printer,attr_registry_map,repr}.h→include/tvm/ir/(functor renamed tonode_functor.hto preserve type-name connection)repr_printer.h,structural_equal.h,structural_hash.h(post-[REFACTOR][NODE] Migrate ReprPrinter to tvm-ffi __ffi_repr__ mechanism #19461 shims and forwarding stubs; redirect 3 cpptest consumers totvm/ffi/extra/structural_equal.h)AccessStep/AccessPathoperator<<definitions (existing__ffi_repr__registrations already cover these; migrate to generic ObjectRef streaming via kRepr)src/node/{repr,script_printer}.cc→src/ir/src/node/and emptyinclude/tvm/node/directories entirely (no shims)