Skip to content

Conversation

@junrushao
Copy link
Member

Depends on #363.

Existing order being

  • Export C++ to Python;
  • Build a Python wheel;
  • Generate Python package stubs.

follows a natural bottom-up order. However, as a Python packaging tutorial, it would be more desirable to empahsis the "Python Packaging" part. Therefore, we reorder it to:

  • Build a Python wheel;
  • Export C++ to Python;
  • Generate Python package stubs.

@junrushao junrushao requested a review from tqchen December 31, 2025 19:02
@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 improving the documentation for TVM-FFI, particularly concerning Python packaging and tensor handling. It reorders the Python packaging tutorial to better guide users through the wheel building process and significantly expands on the practical steps involved. Additionally, a new, detailed guide on TVM-FFI's tensor types and their interaction with DLPack and the stable C ABI has been introduced, providing essential information for developers working with tensors. The PR also includes various minor textual refinements across existing documentation to improve overall clarity.

Highlights

  • Documentation Reordering: The 'Python Packaging' tutorial sections have been reordered to emphasize wheel building first, followed by C++ export and stub generation, providing a more logical flow for users.
  • Expanded Python Packaging Guide: The 'Build Python Wheel' section in the Python packaging documentation has been substantially expanded to include detailed instructions on CMake targets, Python build backend configuration (pyproject.toml), and wheel auditing tools (pip, uv, cibuildwheel, auditwheel).
  • New Tensor and DLPack Documentation: A comprehensive new documentation page (docs/concepts/tensor.rst) has been added, explaining TVM-FFI tensor classes, conversion mechanisms with TVMFFIAny, and C++/Python APIs for tensor manipulation, allocation, and stream handling.
  • Wording and Clarity Improvements: Numerous minor grammatical and clarity improvements have been applied across several documentation files (quickstart.rst, stable_c_abi.rst, python_packaging.rst) to enhance readability and conciseness.

🧠 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 primarily refactors the Python packaging documentation by reordering sections to prioritize the "Build a Python wheel" part, making it more intuitive for users focused on packaging. It also introduces a new comprehensive document, tensor.rst, which details tensor and DLPack concepts within TVM-FFI. Additionally, numerous stylistic and wording improvements have been made across several documentation files to enhance clarity and readability. My review focuses on the correctness and clarity of these documentation changes. I've found one minor inconsistency in a code snippet in the new tensor.rst file and have provided a suggestion to improve it.

@junrushao junrushao force-pushed the 2025-12-31/switch-sections branch 4 times, most recently from 356d9fc to fdb6aa4 Compare January 5, 2026 00:05
@junrushao junrushao force-pushed the 2025-12-31/switch-sections branch from fdb6aa4 to 1142298 Compare January 5, 2026 00:32
@junrushao junrushao merged commit ad195eb into apache:main Jan 5, 2026
4 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