tqchen opened a new pull request, #20004: URL: https://github.com/apache/tvm/pull/20004
This PR consolidates canonical Var unification into two reviewed foundation commits followed by focused append-only corrections. ### Design - Use one canonical `Var` identity across IR, Relax, and TIRx, with a checked typed primitive view rather than competing object identities. - Preserve the narrow Relax semantic boundaries required by that identity: dependent-type traversal, conservative shape-only canonicalization, and marker-free primitive binding syntax. - Use the public Python `.name` contract consistently while retaining the internal C++ `name_hint` field. - Make VM shape lowering use-driven: binding definition roots do not create demand, `slot_map_` is the rewrite/capture oracle, and exact signed-int64 compound use roots are captured without restoring a def-side classifier. ### Commit structure 1. `87fca83a2a7e9bc19e78178274308fd1db5f929d` — use one canonical Var identity across IR, Relax, and TIRx. 2. `539ce1809b112f26835c8e2eb19cbadd952bc12e` — preserve the minimal Relax semantic boundaries required by that identity. The remaining commits are focused corrections for typed primitive containers, dependent substitution, conservative canonicalization, parser/printer behavior, canonical Python naming, and use-driven VM shape demand. ### Validation - Shape lowering plus lazy parameter transformation: 30/30 passed. - All 30 changed Python test files: 845 passed, 134 skipped, 7 xfailed. - CTest: 122/122 passed. - Complete Python suite: 8,873 passed, 6,863 skipped, 56 xfailed, 5 xpassed, and 147 established environment/upstream failures. An exact pre-correction `c1679641` source/library rerun reproduced the identical 147-node set with no final-only failure. - Independent shape probes preserved every unchanged-demand serialization, expected scalar-demand deltas, scheduling order, dead-root exclusion, and type/DataflowVar/MatchCast/If boundaries. Direct `return n + 1` now lowers and builds successfully. - Exact history, changed-range naming, compiler build, diff, and touched-line formatting audits pass. No new shape or review-only test case was added. -- 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]
