tqchen opened a new pull request, #19944:
URL: https://github.com/apache/tvm/pull/19944

   ## Rationale
   
   TIRx variables use inherited `ExprNode::ty` as their single semantic type. 
Retaining a primitive handle surrogate erases the distinction between scalar 
values, typed pointers, and true opaque pointers, then forces later passes and 
code generators to reconstruct information that the IR already owns.
   
   ## Changes
   
   - Remove the duplicate reflected `Var::type_annotation` state and preserve 
exact `PrimType` or `PointerType` through construction, visitors, transforms, 
specialization, builders, printers, and code generation.
   - Keep scalar-only boundaries explicit through `PrimExpr`, `PrimVar`, and 
`PrimType`; pointer-capable values remain general `Expr` or `Var`.
   - Keep helper boundaries no broader than their contracts: TE tensor variable 
indices use `PrimVar`, while expression deep equality recurses through general 
`Expr` only where pointer-bearing `Call` arguments require it and does not 
generalize private arithmetic subclasses.
   - Keep core statement reflection typed as `Expr`, name general reinterpret 
targets as `target_ty`, and preserve exact pointer calls in the general 
vectorization path with explicit scalarization behavior.
   - Delete `PrimType::Handle()` and `PrimType::IsHandle()`. True opaque 
pointers use `PointerType::VoidPointerTy()`; TVMScript renders the canonical 
global type as `T.handle`, standalone values as `T.handle()`, and scoped void 
pointers with a keyword-only storage scope.
   - Make `CodeGenSourceBase::SSAGetID` a single `Type` boundary across source 
backends, without a separate primitive-type or runtime-dtype variant.
   - Keep WebGPU semantic argument classification type-aware: storage buffers 
are identified from `PointerType`, POD arguments from `PrimType`, and only the 
final `FunctionInfo` launch ABI is serialized to `DLDataType`.
   - Preserve exact pointer semantics at runtime boundaries, including access 
pointers, packed calls and returns, external calls, storage rewrites, and 
target-specific lowering.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to