Skip to content

Commit 8666a29

Browse files
committed
added cuda explanation
1 parent bbbbe36 commit 8666a29

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

docs/quickstart.rst

+23-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Install GBRL via pip:
77
88
pip install gbrl
99
10-
CPU only version is installed with the following command:
10+
CPU only version despite having a valid CUDA installation by setting `CUDA_ONLY=1` as an environment variable:
1111

1212
.. code-block:: console
13-
14-
CPU_ONLY=1 pip install gbrl
13+
export CPU_ONLY=1
14+
pip install gbrl
1515
1616
Dependencies
1717
============
@@ -42,15 +42,31 @@ Once installed make sure that the appropriate environment variables are set:
4242
CUDA
4343
~~~~
4444

45+
Make sure that ``CUDA_HOME`` is set.
46+
For integration with Microsoft Visual Studio make sure to copy the following files:
47+
48+
.. code-block:: console
49+
CUDA <cuda_version>.props
50+
CUDA <cuda_version>.targets
51+
CUDA <cuda_version>.xml
52+
Nvda.Build.CudaTasks.v<cuda_version>.dll
53+
cudart.lib
54+
55+
56+
into ``<visual studio path>\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations``.
57+
58+
Once GBRL is installed, verify that CUDA is enabled by running
59+
4560
.. code-block:: python
4661
# Verify that GPU is visible by running
4762
import gbrl
4863
4964
print(gbrl.cuda_available())
5065
5166
52-
Graphviz
53-
~~~~~~~~
67+
Graphviz (optional)
68+
~~~~~~~~~~~~~~~~~~~
69+
For tree visualization make sure graphviz is installed before compilation.
70+
5471

55-
*OPTIONAL*
56-
For tree visualization make sure graphviz is installed before compilation.
72+

gbrl/gbt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def print_tree(self, tree_idx: int) -> None:
281281
self._model.print_tree(tree_idx)
282282

283283
def plot_tree(self, tree_idx: int, filename: str) -> None:
284-
"""Plots tree using graphviz
284+
"""Plots tree using (only works if GBRL was compiled with graphviz)
285285
286286
Args:
287287
tree_idx (int): tree index to plot

0 commit comments

Comments
 (0)