diff --git a/docs/install/from_source.rst b/docs/install/from_source.rst index ee81f8477835..3008b53c3465 100644 --- a/docs/install/from_source.rst +++ b/docs/install/from_source.rst @@ -1,4 +1,4 @@ -.. Licensed to the Apache Software Foundation (ASF) under one +.. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file @@ -232,6 +232,24 @@ The following commands can be used to install the extra Python dependencies: 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`` +- Use a text editor that supports saving as UTF-8 without BOM. + +Path Conventions +................ +- Use forward slashes (``/``) in Python/CMake paths, not Windows backslashes +- Example: ``python cmake/config.cmake`` not ``python cmake\\config.cmake`` + Advanced Build Configuration ---------------------------- @@ -275,6 +293,21 @@ You can then run the following command to build cmake --build build --config Release -- /m +CUDA Configuration +.................. +For CUDA support on Windows: + +.. code-block:: batch + + set CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 + set PATH=%CUDA_PATH%\bin;%PATH% + cmake .. -DUSE_CUDA=ON + +CMake & Compiler Setup +...................... +- Specify generator: ``cmake -G "Visual Studio 16 2019" -A x64 ..`` +- Ensure Python is in PATH or specify: ``-DPython_EXECUTABLE=C:\Python39\python.exe`` + Building ROCm support ~~~~~~~~~~~~~~~~~~~~~