Fix several GPU bugs (#2916)

* Fix #2905

* Fix gpu_exact test failures

* Fix bug in GPU prediction where multiple calls to batch prediction can produce incorrect results

* Fix GPU documentation formatting
This commit is contained in:
Rory Mitchell
2017-12-04 08:27:49 +13:00
committed by GitHub
parent 1e3aabbadc
commit 1b77903eeb
7 changed files with 109 additions and 46 deletions

View File

@@ -12,13 +12,13 @@ Specify the 'tree_method' parameter as one of the following algorithms.
### Algorithms
```eval_rst
+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tree_method | Description |
+==============+=================================================================================================================================================================================================================+
| gpu_exact | The standard XGBoost tree construction algorithm. Performs exact search for splits. Slower and uses considerably more memory than 'gpu_hist' |
+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| gpu_hist | Equivalent to the XGBoost fast histogram algorithm. Much faster and uses considerably less memory. NOTE: Will run very slowly on GPUs older than Pascal architecture. |
+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tree_method | Description |
+==============+=======================================================================================================================================================================+
| gpu_exact | The standard XGBoost tree construction algorithm. Performs exact search for splits. Slower and uses considerably more memory than 'gpu_hist' |
+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| gpu_hist | Equivalent to the XGBoost fast histogram algorithm. Much faster and uses considerably less memory. NOTE: Will run very slowly on GPUs older than Pascal architecture. |
+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```
### Supported parameters
@@ -27,28 +27,27 @@ Specify the 'tree_method' parameter as one of the following algorithms.
.. |tick| unicode:: U+2714
.. |cross| unicode:: U+2718
+--------------------+------------+-----------+
| parameter | gpu_exact | gpu_hist |
+====================+============+===========+
| subsample | |cross| | |tick| |
+--------------------+------------+-----------+
| colsample_bytree | |cross| | |tick| |
+--------------------+------------+-----------+
| colsample_bylevel | |cross| | |tick| |
+--------------------+------------+-----------+
| max_bin | |cross| | |tick| |
+--------------------+------------+-----------+
| gpu_id | |tick| | |tick| |
+--------------------+------------+-----------+
| n_gpus | |cross| | |tick| |
+--------------------+------------+-----------+
| predictor | |tick| | |tick| |
+--------------------+------------+-----------+
| grow_policy | |cross| | |tick| |
+--------------------+------------+-----------+
| monotone_constraints | |cross| | |tick| |
+--------------------+------------+-----------+
+----------------------+------------+-----------+
| parameter | gpu_exact | gpu_hist |
+======================+============+===========+
| subsample | |cross| | |tick| |
+----------------------+------------+-----------+
| colsample_bytree | |cross| | |tick| |
+----------------------+------------+-----------+
| colsample_bylevel | |cross| | |tick| |
+----------------------+------------+-----------+
| max_bin | |cross| | |tick| |
+----------------------+------------+-----------+
| gpu_id | |tick| | |tick| |
+----------------------+------------+-----------+
| n_gpus | |cross| | |tick| |
+----------------------+------------+-----------+
| predictor | |tick| | |tick| |
+----------------------+------------+-----------+
| grow_policy | |cross| | |tick| |
+----------------------+------------+-----------+
| monotone_constraints | |cross| | |tick| |
+----------------------+------------+-----------+
```
GPU accelerated prediction is enabled by default for the above mentioned 'tree_method' parameters but can be switched to CPU prediction by setting 'predictor':'cpu_predictor'. This could be useful if you want to conserve GPU memory. Likewise when using CPU algorithms, GPU accelerated prediction can be enabled by setting 'predictor':'gpu_predictor'.