Conversation
Primitive expressions need to be representable as typed views over general Expr nodes so Relax and TIRX can share call handling without duplicating runtime node types. This change moves primitive operators and literals onto ExprNode-backed typed refs, introduces a core ir.Call, and keeps Relax/TIRX wrapper APIs compatible for script printing, functors, and Python checks.
Keep known primitive-only nodes on the existing primitive expression node base while allowing PrimExpr to remain a typed view over any ExprNode with PrimType. Remove the root-level GetPrimType helper and use local PrimExpr typed-view casts at unified CallNode sites before reading primitive result types.
Use an unregistered PrimOnlyExprBase for nodes that intrinsically carry PrimType while keeping CallNode and VarNode directly on ExprNode. Use the tvm-ffi containment traits to preserve PrimExpr as a checked type view, simplify safe GetRef sites, and remove redundant namespace qualification.
Owner
Author
|
Superseded by private staging review https://github.com/tqchen/tvm-dev/pull/1 after exact branch and base migration. |
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.
Fork-local staging review before upstream submission.