Skip to content

Commit 0333c5e

Browse files
author
Montana Low
committed
document lightgbm gpu support
1 parent 6d2fcf7 commit 0333c5e

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

pgml-docs/docs/user_guides/setup/gpu_support.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,33 @@
11
# GPU Support
22

3-
PostgresML is capable of leveraging GPUs when the underlying libraries and hardware are properly configured on the database.
3+
PostgresML is capable of leveraging GPUs when the underlying libraries and hardware are properly configured on the database server.
4+
5+
!!! tip
6+
Models trained on GPU will also require GPU support to make predictions.
47

58
## XGBoost
6-
XGBoost is currently the only integrated library that provides GPU accellaration. GPU setup for this library is covered in the [xgboost documentation](https://xgboost.readthedocs.io/en/stable/gpu/index.html). Additionally, you'll need to pass `pgml.train('GPU project', hyperparams => '{tree_method: "gpu_hist"}')` to take advantage during training.
9+
GPU setup for XGBoost is covered in the [xgboost documentation](https://xgboost.readthedocs.io/en/stable/gpu/index.html).
10+
11+
!!! example
12+
```sql linenums="1"
13+
pgml.train(
14+
'GPU project',
15+
algorithm => 'xgboost',
16+
hyperparams => '{"tree_method" : "gpu_hist"}'
17+
);
18+
```
19+
20+
## LightGBM
21+
GPU setup for LightGBM is covered in the [lightgbm documentation](https://lightgbm.readthedocs.io/en/latest/GPU-Tutorial.html).
722

8-
!!! warning
9-
XGBoost models trained on GPU will also require GPU support to make predictions.
23+
!!! example
24+
```sql linenums="1"
25+
pgml.train(
26+
'GPU project',
27+
algorithm => 'lightgbm',
28+
hyperparams => '{"device" : "gpu"}'
29+
);
30+
```
1031

1132
## Scikit-learn
1233
None of the scikit-learn algorithms natively support GPU devices. There are a few projects to improve scikit performance with additional parralellism, although we currently have not integrated these with PostgresML:

0 commit comments

Comments
 (0)