Repository navigation
[REFACTOR][IR] Unify Call construction and TVMScript printing - #20578
Merged
Merged
Conversation
tlopex
approved these changes
Oct 7, 2026
tqchen
force-pushed
the
unify-script-result-type
branch
2 times, most recently
from
October 7, 2026 18:51
ae0f14e to
4b29174
Compare
tqchen
force-pushed
the
unify-script-result-type
branch
from
October 8, 2026 00:27
24fcb98 to
ff90fba
Compare
Move best-effort result inference into the core Call constructor, preserving explicit types and separating operator validation from construction. Share canonical named-call formatting with exact raw reconstruction and concrete hooks for representation-changing syntax. Preserve operator helper definitions and normalization while keeping parameters specific to their semantics. Standardize assertion operands and take-backward attributes, reflect literal defaults, and preserve contextual, native-call and pointer inference.
tqchen
force-pushed
the
unify-script-result-type
branch
from
October 8, 2026 04:03
ff90fba to
9672013
Compare
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.
Move best-effort result inference into the core Call constructor. Omitted or None
tyuses available inference, explicit types are preserved, andCall.validate()checks the operator contract separately.I.Calldirectly exposes this constructor and preserves provisional IR without a separate unchecked path.Use one shared printer for canonical named operations with operands, semantic attributes, type arguments and result types. Remove standard-call markers and dialect-wide registration helpers. Retain concrete hooks for representation-changing syntax, including LLVM names, PTX operands and Relax call_tir sugar; use exact raw
I.Callreconstruction when named syntax cannot preserve the stored fields.Preserve existing Python operator definitions, documentation and operand normalization, keeping helper parameters specific to their semantics and generating only missing exposures. Give assertions the stored condition/format/variadic-values contract and take-backward dedicated axis attributes, removing their special printer paths. Preserve contextual, native-call and pointer inference, reflect literal attribute defaults, and give the five legacy CUDA helpers explicit result-type parameters.