Skip to content

[REFACTOR][IR] Move IntImm and FloatImm to prim - #20383

Closed
tqchen wants to merge 2 commits into
apache:mainfrom
tqchen:refactor-prim-immediates
Closed

tqchen wants to merge 2 commits into
apache:mainfrom
tqchen:refactor-prim-immediates

Conversation

@tqchen

@tqchen tqchen commented Sep 18, 2026

Copy link
Copy Markdown
Member

Move the canonical C++ definitions, constructors, reflection registrations, and FFI conversion traits for IntImm and FloatImm into the shared primitive IR layer. Update C++ consumers and headers to use tvm::prim, and route the existing Python primitive classes through the prim.IntImm and prim.FloatImm constructors and type keys.

Preserve numeric construction and BigInt semantics, structural operations, and the existing Python tirx aliases. Reflection examples and serialization expectations now use the canonical prim names.

Make the shared primitive layer own immediate node definitions, numeric constructors, reflection registrations, and FFI conversion traits. Update C++ consumers to use the primitive namespace and route Python constructors and type keys through prim while retaining tirx aliases.
Keep IRBuilder constant-construction methods and their member calls in the builder class while referring to shared immediate node types through prim.
@tqchen tqchen closed this Sep 18, 2026
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