-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add Windows-specific build notes to installation guide #18705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @AshwiniBokka, 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 significantly enhances the TVM installation documentation by introducing a dedicated section for Windows-specific build considerations. It aims to streamline the setup process for Windows contributors by providing clear guidance on common platform-specific issues and their resolutions, thereby reducing friction and improving the overall developer experience on this operating system. Highlights
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this 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 adds valuable Windows-specific build notes to the installation guide, which will be a great help for developers on that platform. The content is well-structured and covers common pain points. I have two main suggestions to enhance this contribution. Firstly, the command provided for enabling CUDA is incorrect and will not work as intended; it needs to be revised to instruct users to edit the config.cmake file. Secondly, the heading levels in the new section are inconsistent with the rest of the document's structure, which could lead to rendering issues. I've provided recommendations to adjust the heading hierarchy for consistency.
docs/install/from_source.rst
Outdated
|
|
||
| set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 | ||
| set PATH=%CUDA_PATH%\bin;%PATH% | ||
| python cmake/config.cmake --use-cuda=ON |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done! thank you
| Windows-Specific Build Notes | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| If you're building TVM on Windows, note these platform-specific considerations: | ||
|
|
||
| File Encoding | ||
| ............. | ||
| - Ensure Python files are saved as **UTF-8 without BOM** (Byte Order Mark) | ||
| - BOM characters cause ``SyntaxError: invalid non-printable character U+FEFF`` | ||
| - In VS Code: Bottom-right encoding → "Save with Encoding" → "UTF-8" | ||
|
|
||
| Path Conventions | ||
| ................ | ||
| - Use forward slashes (``/``) in Python/CMake paths, not Windows backslashes | ||
| - Example: ``python cmake/config.cmake`` not ``python cmake\\config.cmake`` | ||
|
|
||
| Common Windows Build Issues | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| CUDA Configuration | ||
| .................. | ||
| For CUDA support: | ||
|
|
||
| .. code-block:: batch | ||
|
|
||
| set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 | ||
| set PATH=%CUDA_PATH%\bin;%PATH% | ||
| python cmake/config.cmake --use-cuda=ON | ||
|
|
||
| CMake & Compiler Setup | ||
| ...................... | ||
| - Use CMake GUI or specify generator: ``cmake -G "Visual Studio 16 2019" -A x64 ..`` | ||
| - Ensure Python is in PATH or specify: ``-DPython_EXECUTABLE=C:\Python39\python.exe`` | ||
|
|
||
| Development Environment Tips | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Git Configuration | ||
| ................. | ||
| .. code-block:: bash | ||
|
|
||
| git config --global core.autocrlf input | ||
|
|
||
| VS Code Settings | ||
| ................ | ||
| Add to ``settings.json``: | ||
|
|
||
| .. code-block:: json | ||
|
|
||
| { | ||
| "files.encoding": "utf8", | ||
| "files.autoGuessEncoding": false, | ||
| "[python]": { "files.encoding": "utf8" } | ||
| } | ||
|
|
||
| WSL2 Alternative | ||
| ~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heading structure in this new section is inconsistent with the rest of the document. Currently, Windows-Specific Build Notes, Common Windows Build Issues, Development Environment Tips, and WSL2 Alternative are all defined with ~, making them sibling sections at the same level.
For a correct document hierarchy, Windows-Specific Build Notes should be a level-2 heading (using - underline), and the others should be level-3 headings (using ~ underline) nested under it. This will ensure correct rendering and table of contents generation.
Example of correct structure:
Windows-Specific Build Notes
----------------------------
...
Common Windows Build Issues
~~~~~~~~~~~~~~~~~~~~~~~~~~~
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it. Thank you!
16fd900 to
5829cc8
Compare
Adds 'Windows-Specific Build Notes' section after Step 5 in from_source.rst covering: 1. File encoding (UTF-8 without BOM) 2. Path conventions (forward vs backslashes) 3. CUDA configuration on Windows 4. CMake and compiler setup 5. Common Windows build issues 6. Development environment tips (Git, VS Code) 7. WSL2 alternative Based on contributor experience with Windows development environment.
5829cc8 to
2bfd31e
Compare
Summary
Adds Windows-specific build notes to the TVM installation documentation (
docs/install/from_source.rst).Changes
Content Includes:
SyntaxError: invalid non-printable character U+FEFFin CI)Motivation
As a Windows contributor to TVM, I encountered several platform-specific issues that could be prevented with better documentation. These notes will help future Windows users:
Testing
Related