Skip to content

[Docs] Add code generation architecture documentation#19396

Merged
MasterJH5574 merged 3 commits intoapache:mainfrom
tlopex:doc222
Apr 13, 2026
Merged

[Docs] Add code generation architecture documentation#19396
MasterJH5574 merged 3 commits intoapache:mainfrom
tlopex:doc222

Conversation

@tlopex
Copy link
Copy Markdown
Member

@tlopex tlopex commented Apr 12, 2026

This pr adds an architecture document explaining how PrimFuncs are compiled to executable code. Covers the codegen's position in the tvm.compile() pipeline, the target dispatch mechanism (target.build.<kind> FFI lookup), the two codegen families

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new architectural document, docs/arch/codegen.rst, which provides a comprehensive overview of the TVM code generation pipeline, including target dispatch mechanisms, the LLVM and Source codegen families, and the runtime module system. The documentation is also integrated into the main architecture index. The review feedback identifies several areas for improvement: correcting the C++ code snippet to use standard TVM runtime APIs instead of internal FFI types, fixing an incorrect file path for the CUDA build flow, and adding a missing entry for WebGPU in the source code map to ensure completeness.

tlopex and others added 2 commits April 12, 2026 14:50
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@MasterJH5574 MasterJH5574 merged commit 87fdeaf into apache:main Apr 13, 2026
9 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