Build the binary from a local copy on Windows
The system compiler must be compatible with CUDA Toolkit if GPU support is required. Refer to the Supported Host Compilers section of the NVIDIA CUDA Compiler Driver NVCC documentation for more details. The required steps to change the system compiler depend on the OS.
Training on GPU requires NVIDIA Driver of version 418.xx or higher.
To build the command-line package from a local copy of the CatBoost repository on Windows:
Clone the repository:
git clone https://github.com/catboost/catboost.git
(Optionally) Volta GPU users are advised to precisely set the required NVCC compile flags in the default_nvcc_flags.make.inc configuration file. Removing irrelevant flags speeds up the compilation.
CatBoost may work incorrectly with Independent Thread Scheduling introduced in Volta GPUs when the number of splits for features exceeds 32.
(Optionally) CUDA with compute capability 2.0 users must remove all lines starting with
-gencodefrom the default_nvcc_flags.make.inc configuration file and add the following line instead:
Install Visual Studio Community 2017.
- Choose the Windows Platform development and Desktop Development with C++ options in the workloads tab.
- Choose a suitable version of the MSVC compiler. The version of MSVC for CUDA Toolkit 9.0 and 9.1 should not be higher than 15.6 v14.11, while the version for CUDA Toolkit 9.2 should not be higher than 15.6 v14.13.
Visual Studio forcibly installs the latest version of the compiler upon each update. The latest MSVC compiler may not be suitable for compiling CatBoost, especially with CUDA. It is advised to install VC++ 2017 version 15.6 v14.13 for CUDA Toolkit 9.2 and 15.6 v14.11 for CUDA Toolkit 9.0 and 9.1.Identify the set version of the compiler
- Open the properties window for any
cppfile of the project.
- Ensure the absence of the
/nologooption in the compiler's command-line (for example, by adding the deprecated
/nologo-option in the Command Line/Additional Options box).
- Compile this source file (Ctrl + F7).
The set version of the compiler is printed to the Output window. CatBoost can not be compiled with 19.14.* versions.Change the version of the compiler
Use one of the following methods to set the recommended version of the compiler:
Enable the required version as described in the Visual C++ Team Blog.
Run the environment setter from the command line with the
vcvars_veroption (the path to the script depends on the installation settings):
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.13
Then open the solution:
catboost/catboost/appdirectory from the local copy of the CatBoost repository.
Run the following command:
../../ya make -r [optional parameters]
The path to CUDA. This parameter is required to support training on GPU.