Skip to content

[REFACTOR][IR] Unify Call construction and TVMScript printing - #20578

Merged
tqchen merged 1 commit into
apache:mainfrom
tqchen:unify-script-result-type
Oct 8, 2026
Merged

tqchen merged 1 commit into
apache:mainfrom
tqchen:unify-script-result-type

Conversation

@tqchen

@tqchen tqchen commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Move best-effort result inference into the core Call constructor. Omitted or None ty uses available inference, explicit types are preserved, and Call.validate() checks the operator contract separately. I.Call directly 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.Call reconstruction 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.

@tqchen tqchen changed the title [REFACTOR][TIRx] Unify TVMScript result type syntax [REFACTOR][TIRx] Consolidate Call printing and result type syntax Oct 7, 2026
@tqchen
tqchen force-pushed the unify-script-result-type branch 2 times, most recently from ae0f14e to 4b29174 Compare October 7, 2026 18:51
@tqchen tqchen changed the title [REFACTOR][TIRx] Consolidate Call printing and result type syntax [REFACTOR][IR] Unify Call construction and TVMScript printing Oct 7, 2026
@tqchen
tqchen force-pushed the unify-script-result-type branch from 24fcb98 to ff90fba Compare October 8, 2026 00:27
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
tqchen force-pushed the unify-script-result-type branch from ff90fba to 9672013 Compare October 8, 2026 04:03
@tqchen
tqchen merged commit 3c2c6ee into apache:main Oct 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants