Commit 0bb4a82
Initial GPU acceleration support for LightGBM (#368)
* add dummy gpu solver code
* initial GPU code
* fix crash bug
* first working version
* use asynchronous copy
* use a better kernel for root
* parallel read histogram
* sparse features now works, but no acceleration, compute on CPU
* compute sparse feature on CPU simultaneously
* fix big bug; add gpu selection; add kernel selection
* better debugging
* clean up
* add feature scatter
* Add sparse_threshold control
* fix a bug in feature scatter
* clean up debug
* temporarily add OpenCL kernels for k=64,256
* fix up CMakeList and definition USE_GPU
* add OpenCL kernels as string literals
* Add boost.compute as a submodule
* add boost dependency into CMakeList
* fix opencl pragma
* use pinned memory for histogram
* use pinned buffer for gradients and hessians
* better debugging message
* add double precision support on GPU
* fix boost version in CMakeList
* Add a README
* reconstruct GPU initialization code for ResetTrainingData
* move data to GPU in parallel
* fix a bug during feature copy
* update gpu kernels
* update gpu code
* initial port to LightGBM v2
* speedup GPU data loading process
* Add 4-bit bin support to GPU
* re-add sparse_threshold parameter
* remove kMaxNumWorkgroups and allows an unlimited number of features
* add feature mask support for skipping unused features
* enable kernel cache
* use GPU kernels withoug feature masks when all features are used
* REAdme.
* REAdme.
* update README
* fix typos (#349)
* change compile to gcc on Apple as default
* clean vscode related file
* refine api of constructing from sampling data.
* fix bug in the last commit.
* more efficient algorithm to sample k from n.
* fix bug in filter bin
* change to boost from average output.
* fix tests.
* only stop training when all classes are finshed in multi-class.
* limit the max tree output. change hessian in multi-class objective.
* robust tree model loading.
* fix test.
* convert the probabilities to raw score in boost_from_average of classification.
* fix the average label for binary classification.
* Add boost_from_average to docs (#354)
* don't use "ConvertToRawScore" for self-defined objective function.
* boost_from_average seems doesn't work well in binary classification. remove it.
* For a better jump link (#355)
* Update Python-API.md
* for a better jump in page
A space is needed between `#` and the headers content according to Github's markdown format [guideline](https://guides.github.com/features/mastering-markdown/)
After adding the spaces, we can jump to the exact position in page by click the link.
* fixed something mentioned by @wxchan
* Update Python-API.md
* add FitByExistingTree.
* adapt GPU tree learner for FitByExistingTree
* avoid NaN output.
* update boost.compute
* fix typos (#361)
* fix broken links (#359)
* update README
* disable GPU acceleration by default
* fix image url
* cleanup debug macro
* remove old README
* do not save sparse_threshold_ in FeatureGroup
* add details for new GPU settings
* ignore submodule when doing pep8 check
* allocate workspace for at least one thread during builing Feature4
* move sparse_threshold to class Dataset
* remove duplicated code in GPUTreeLearner::Split
* Remove duplicated code in FindBestThresholds and BeforeFindBestSplit
* do not rebuild ordered gradients and hessians for sparse features
* support feature groups in GPUTreeLearner
* Initial parallel learners with GPU support
* add option device, cleanup code
* clean up FindBestThresholds; add some omp parallel
* constant hessian optimization for GPU
* Fix GPUTreeLearner crash when there is zero feature
* use np.testing.assert_almost_equal() to compare lists of floats in tests
* travis for GPU1 parent db3d1f8 commit 0bb4a82
File tree
30 files changed
+4163
-246
lines changed- .travis
- include/LightGBM
- src
- boosting
- io
- treelearner
- ocl
- tests/python_package_test
30 files changed
+4163
-246
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
14 | 29 | | |
15 | 30 | | |
16 | 31 | | |
| 32 | + | |
17 | 33 | | |
| 34 | + | |
18 | 35 | | |
19 | 36 | | |
20 | | - | |
21 | 37 | | |
22 | 38 | | |
23 | 39 | | |
24 | 40 | | |
25 | 41 | | |
26 | 42 | | |
27 | | - | |
| 43 | + | |
28 | 44 | | |
29 | 45 | | |
30 | 46 | | |
31 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
32 | 56 | | |
33 | 57 | | |
34 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
37 | 47 | | |
38 | | - | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| |||
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
72 | 83 | | |
| 84 | + | |
73 | 85 | | |
74 | 86 | | |
75 | 87 | | |
| |||
105 | 117 | | |
106 | 118 | | |
107 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
108 | 125 | | |
109 | 126 | | |
110 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
258 | 257 | | |
259 | 258 | | |
260 | 259 | | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
389 | 390 | | |
390 | 391 | | |
391 | | - | |
| 392 | + | |
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
191 | 206 | | |
192 | 207 | | |
193 | 208 | | |
| |||
216 | 231 | | |
217 | 232 | | |
218 | 233 | | |
| 234 | + | |
219 | 235 | | |
220 | 236 | | |
221 | 237 | | |
222 | 238 | | |
223 | 239 | | |
| 240 | + | |
| 241 | + | |
224 | 242 | | |
225 | 243 | | |
226 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
| |||
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
424 | 431 | | |
425 | 432 | | |
426 | 433 | | |
427 | 434 | | |
428 | 435 | | |
429 | 436 | | |
430 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
431 | 447 | | |
432 | 448 | | |
433 | 449 | | |
434 | 450 | | |
435 | 451 | | |
436 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
437 | 457 | | |
438 | 458 | | |
439 | 459 | | |
| |||
461 | 481 | | |
462 | 482 | | |
463 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
464 | 487 | | |
465 | 488 | | |
466 | 489 | | |
| |||
516 | 539 | | |
517 | 540 | | |
518 | 541 | | |
| 542 | + | |
| 543 | + | |
519 | 544 | | |
520 | 545 | | |
521 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
0 commit comments