Skip to content

Conversation

@junrushao
Copy link
Member

@junrushao junrushao commented Dec 19, 2025

This PR includes change in a few fronts:

  • Revamp Python packaging guide
  • Reorganize the existing docs into a new structure
  • Fix C++/Doxygen doc formatting
  • Add a intersphinx sites: data-api, scikit_build_core

New Doc Structure

## Get Started
   get_started/quickstart.rst
   get_started/stable_c_abi.rst

## Guides
   guides/kernel_library_guide.rst
   guides/compiler_integration.md
   guides/cubin_launcher.rst
   guides/python_lang_guide.md
   guides/cpp_lang_guide.md
   guides/rust_lang_guide.md

## Concepts
   concepts/abi_overview.md
   (TODO) concepts/any_anyview.md
   (TODO) concepts/tensors.md

## Packaging
   packaging/python_packaging.rst
   (TODO) packaging/cmake_integration.md
   packaging/cpp_packaging.md

## Reference
   reference/python/index.rst
   reference/cpp/index.rst
   reference/rust/index.rst

## Developer Manual
   dev/build_from_source.md
   (TODO) dev/configure_linters.md
   (TODO) dev/release_process.md

@junrushao junrushao marked this pull request as draft December 19, 2025 03:19
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @junrushao, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing and restructuring the project's documentation. It standardizes external links, reorganizes guide content into a more logical reference structure, and updates the Python packaging guide to reflect current best practices for library loading. Additionally, it includes minor C++ Doxygen syntax fixes and improvements to the Python stub generation tool.

Highlights

  • Documentation Restructuring: The documentation structure has been significantly reorganized. Language-specific guides (C++, Python, Rust) have been moved from the guides/ directory to a new reference/ section, now named lang_guide.md within their respective language subdirectories. New 'Packaging' and 'Reference' sections have been introduced in the main index.rst to reflect this change.
  • Standardized DLPack Protocol Linking: External links to the DLPack protocol documentation have been standardized across several .rst files. This is achieved by introducing a new external+data-api:doc Sphinx role, which is configured in docs/conf.py with a new intersphinx mapping to data-apis.org and added to docs/.rstcheck.cfg's ignore_roles.
  • Python Packaging Guide Refinement: The docs/guides/python_packaging.md guide has been updated to reflect a more streamlined approach for library loading and FFI API registration in Python. This includes using tvm_ffi.libinfo.load_lib_module and tvm_ffi.registry.init_ffi_api, along with revised code examples and package structure descriptions.
  • C++ Doxygen Code Block Syntax: Numerous C++ header files have been updated to use \code{.cpp} instead of \code within Doxygen comments. This ensures proper syntax highlighting and interpretation of C++ code examples in the generated documentation.
  • Python Stub Generator Enhancements: Improvements have been made to the Python stub generation CLI (stubgen). The logic for filtering prefixes and identifying the root _ffi_api.py file for library loading has been refined, ensuring more accurate stub generation, and a new test case was added to verify this functionality.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 significant documentation update and refactoring. Key changes include reorganizing the documentation structure, updating links, and improving Doxygen comments in C++ headers for better clarity. The Python packaging guide has been simplified, and several unused headers have been removed from C++ files. Additionally, the Python stub generator is enhanced to filter stubs by prefix, a change that is well-tested. Overall, these are high-quality improvements to the project's documentation and tooling. I have not found any issues of medium or higher severity.

@junrushao junrushao force-pushed the 2025-12-18/doc branch 9 times, most recently from 8df5f66 to dc43d06 Compare December 21, 2025 00:10
@junrushao junrushao changed the title [wip] doc: update doc: Revamp Python Packaging Dec 21, 2025
@junrushao junrushao force-pushed the 2025-12-18/doc branch 3 times, most recently from dbf8023 to ca70fd9 Compare December 21, 2025 00:37
@junrushao junrushao marked this pull request as ready for review December 21, 2025 00:37
@junrushao junrushao force-pushed the 2025-12-18/doc branch 2 times, most recently from df9ac08 to 6fa4fbc Compare December 22, 2025 03:00
@junrushao junrushao merged commit 19da7e8 into apache:main Dec 22, 2025
7 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