Skip to content

[REFACTOR][RELAX] Rename Relax base type to AnyType - #19889

Merged
tlopex merged 1 commit into
apache:mainfrom
tqchen:new-task-tvm-rename-relax-base-type-to-be-anytype-instead-of-objecttype
Jun 25, 2026
Merged

[REFACTOR][RELAX] Rename Relax base type to AnyType#19889
tlopex merged 1 commit into
apache:mainfrom
tqchen:new-task-tvm-rename-relax-base-type-to-be-anytype-instead-of-objecttype

Conversation

@tqchen

@tqchen tqchen commented Jun 25, 2026

Copy link
Copy Markdown
Member

This PR introduces Relax AnyType as the primary top/base type spelling, replacing the previous ObjectType naming for the type that represents any Relax value.

Changes:

  • Add AnyType/AnyTypeNode with relax.AnyType registration and keep ObjectType/R.Object compatibility aliases.
  • Update Relax type analysis, type visitors, opaque function defaults, and script printer/parser handling to use AnyType/R.Any.
  • Migrate affected Python/C++ call sites, docs, and focused tests to the new spelling.

Validation:

  • cmake --build build --parallel 16
  • Focused Relax/TVMScript pytest: 704 passed, 1 xfailed
  • pre_commit run --files

@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 renames ObjectType and ObjectTypeNode to AnyType and AnyTypeNode within TVM's Relax compiler, and introduces R.Any in TVM Script to replace R.Object. It also adds compatibility aliases for both C++ and Python to ensure backward compatibility with existing codebases. These changes are consistently propagated across type definitions, parser/printer components, transformation passes, and a large suite of tests. There are no review comments provided, so I have no additional feedback to offer.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@tlopex
tlopex merged commit f3f5a3e into apache:main Jun 25, 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