gemini-code-assist[bot] commented on code in PR #18705:
URL: https://github.com/apache/tvm/pull/18705#discussion_r2754057208


##########
docs/install/from_source.rst:
##########
@@ -230,6 +230,71 @@ The following commands can be used to install the extra 
Python dependencies:
 .. code:: bash
 
     pip3 install tornado psutil 'xgboost>=1.1.0' cloudpickle
+    
+
+.. _windows-build-notes:
+
+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
+~~~~~~~~~~~~~~~~

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   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:
   ```rst
   Windows-Specific Build Notes
   ----------------------------
   
   ...
   
   Common Windows Build Issues
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
   ...
   ```



##########
docs/install/from_source.rst:
##########
@@ -230,6 +230,71 @@ The following commands can be used to install the extra 
Python dependencies:
 .. code:: bash
 
     pip3 install tornado psutil 'xgboost>=1.1.0' cloudpickle
+    
+
+.. _windows-build-notes:
+
+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

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   This command is incorrect. `config.cmake` is a CMake configuration file, not 
a Python script, so it cannot be executed with `python`. To enable CUDA, you 
should edit the `config.cmake` file in your build directory and set `USE_CUDA` 
to `ON`. Please update the instructions to reflect the correct procedure.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to