Skip to content

[REFACTOR][TVMScript] Simplify annotation capture and transpiler contexts - #20447

Merged
tqchen merged 12 commits into
apache:mainfrom
tqchen:script/transpiler-context
Sep 25, 2026
Merged

tqchen merged 12 commits into
apache:mainfrom
tqchen:script/transpiler-context

Conversation

@tqchen

@tqchen tqchen commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Simplify annotation construction around explicit function-header generics and concrete I.dynamic / T.dynamic values. Remove captured runtime typing.TypeVar adaptation, per-read annotation guards, and their obsolete bookkeeping while preserving definition-site scope, shadowing, and symbol identity.

Clarify shared transpiler inputs and generated body metadata, and capture definition values through original-name helper defaults while preserving lazy annotations, declaration timing, globals, and closures.

Resolve function construction through qualified definition-site decorators and preserve already-evaluated root options. Name fixed JIT arguments const_args, keep parameter construction helpers private to the transpiler, and document context consumers and helper contracts.

Name shared translation inputs and generated helpers by their roles. Capture definition values through original-name helper defaults while preserving lazy annotation reads and source body scopes.

Resolve construction through qualified definition-site decorators and retain evaluated root options. Document public capture and JIT helper contracts.
Retain registered function and macro namespaces for deferred source reconstruction without retaining owners of unrelated Python decorators. Document construction syntax and source-inspection errors.
Use const_args for the fixed parameter map and its generated binding while preserving scoped JIT selection and specialization caching. Keep constexpr argument validation beside the transpiler parameter construction that consumes it.
Place constexpr argument checks and optional annotation unwrapping beside generated parameter construction. Keep scoped fixed-argument transport in jit_support and document both private runtime helper contracts.
Parse indented definitions inside a temporary AST suite so continuation lines and multiline literals retain their original whitespace. Remove the synthetic suite and restore source line coordinates for both parsed nodes and syntax errors.
@tqchen
tqchen force-pushed the script/transpiler-context branch from b2a4720 to 1ccc335 Compare September 25, 2026 11:38
@tqchen tqchen changed the title [REFACTOR][TVMScript] Simplify transpiler contexts and definition-site capture [REFACTOR][TVMScript] Simplify annotation capture and transpiler contexts Sep 25, 2026
@tqchen
tqchen merged commit c607484 into apache:main Sep 25, 2026
8 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