Skip to content

Commit

Permalink
[docs] updated the part about Boost in installation guide (#2082)
Browse files Browse the repository at this point in the history
* updated installation guide

* updated Python installation guide

* added note about opencl path to Windows section

* added space before path in message

* minor correction for option description in Python installation guide
  • Loading branch information
StrikerRUS authored and huanzhang12 committed Apr 30, 2019
1 parent 57ed879 commit 5ece53b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -93,7 +93,7 @@ if(USE_GPU)
include_directories(${BOOST_COMPUTE_HEADER_DIR})
find_package(OpenCL REQUIRED)
include_directories(${OpenCL_INCLUDE_DIRS})
MESSAGE(STATUS "OpenCL include directory:" ${OpenCL_INCLUDE_DIRS})
MESSAGE(STATUS "OpenCL include directory: " ${OpenCL_INCLUDE_DIRS})
if (WIN32)
set(Boost_USE_STATIC_LIBS ON)
endif()
Expand Down
8 changes: 4 additions & 4 deletions docs/Installation-Guide.rst
Expand Up @@ -563,16 +563,16 @@ Following procedure is for the **MSVC** (Microsoft Visual C++) build.

.. code::
Set BOOST_ROOT=C:\local\boost_1_63_0\
Set BOOST_LIBRARYDIR=C:\local\boost_1_63_0\lib64-msvc-14.0
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM
mkdir build
cd build
cmake -A x64 -DUSE_GPU=1 ..
cmake -A x64 -DUSE_GPU=1 -DBOOST_ROOT=C:/local/boost_1_63_0 -DBOOST_LIBRARYDIR=C:/local/boost_1_63_0/lib64-msvc-14.0 ..
# if you have installed NVIDIA CUDA to a customized location, you should specify paths to OpenCL headers and library like the following:
# cmake -A x64 -DUSE_GPU=1 -DBOOST_ROOT=C:/local/boost_1_63_0 -DBOOST_LIBRARYDIR=C:/local/boost_1_63_0/lib64-msvc-14.0 -DOpenCL_LIBRARY="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/lib/x64/OpenCL.lib" -DOpenCL_INCLUDE_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/include" ..
cmake --build . --target ALL_BUILD --config Release
**Note**: ``C:\local\boost_1_63_0\`` and ``C:\local\boost_1_63_0\lib64-msvc-14.0`` are locations of your **Boost** binaries (assuming you've downloaded 1.63.0 version). You also can set them to the environment variable to avoid ``Set ...`` commands when build.
**Note**: ``C:/local/boost_1_63_0`` and ``C:/local/boost_1_63_0/lib64-msvc-14.0`` are locations of your **Boost** binaries (assuming you've downloaded 1.63.0 version for Visual Studio 2015).

Docker
^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion python-package/README.rst
Expand Up @@ -92,7 +92,7 @@ All remarks from `Build from Sources section <#build-from-sources>`__ are actual

For **Windows** users, `CMake`_ (version 3.8 or higher) is strongly required.

**Boost** and **OpenCL** are needed: details for installation can be found in `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version>`__. You need to add ``OpenCL_INCLUDE_DIR`` to the environmental variable **'PATH'** and export ``BOOST_ROOT`` before installation. Alternatively, you may pass options to **CMake** via ``pip`` options, like
**Boost** and **OpenCL** are needed: details for installation can be found in `Installation Guide <https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version>`__. Almost always you also need to pass ``OpenCL_INCLUDE_DIR``, ``OpenCL_LIBRARY`` options for **Linux** and ``BOOST_ROOT``, ``BOOST_LIBRARYDIR`` options for **Windows** to **CMake** via ``pip`` options, like

.. code:: sh
Expand Down

0 comments on commit 5ece53b

Please sign in to comment.