Skip to content

[IR] Rename Call annotations to attrs#19618

Merged
tqchen merged 2 commits into
apache:mainfrom
tlopex:fix228-call-attrs
May 27, 2026
Merged

[IR] Rename Call annotations to attrs#19618
tqchen merged 2 commits into
apache:mainfrom
tlopex:fix228-call-attrs

Conversation

@tlopex

@tlopex tlopex commented May 27, 2026

Copy link
Copy Markdown
Member

This PR renames tirx::CallNode::annotations to attrs, matching the existing Relax CallNode::attrs convention.
Previously, TIRX Call metadata was stored in a Map<String, Any> field named annotations. This PR makes it a first-class Attrs field instead, so call-level metadata follows the same representation and naming style as Relax calls.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the tirx.Call expression by replacing the annotations field with attrs (of type Attrs) across both C++ and Python APIs. This change updates the AST nodes, serialization, printers, various transformations, and associated unit tests. The reviewer suggested updating the type annotation of attrs in the Python Call class to ir.Attrs | None to correctly handle cases where no attributes are provided and prevent static type checking issues.

Comment thread python/tvm/tirx/expr.py Outdated
@tqchen tqchen merged commit de89da6 into apache:main May 27, 2026
10 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