Граф коммитов

139 Коммитов

Автор SHA1 Сообщение Дата
James Lamb 525f8b4b80
[c++] remove HDFS support (fixes #6436) (#6534) 2024-07-12 09:31:34 -07:00
Philip Hyunsu Cho 00d6edd2c2
[CMake] Use CMAKE_MSVC_RUNTIME_LIBRARY to apply /MT (#6484) 2024-07-03 22:41:25 -05:00
yadda yadda yadda 83df24d23c
cmake: add missing lib_lightgbm_swig.so to lightgbmlib.jar on linux (#6515) 2024-07-03 20:18:11 -05:00
James Lamb ad1237d908
[ci] [python-package] add arm64 macOS wheels (#6391) 2024-06-13 20:03:42 -05:00
James Lamb c07694bac3
[cmake] always target Windows SDK v10.x when using Visual Studio generators (fixes #6448) (#6451) 2024-05-29 21:36:01 -05:00
Marco Vela 3e9ab53c7d
[cmake] switch to FindCUDAToolkit (#6457) 2024-05-16 22:29:52 -05:00
James Lamb 88cec4776e
deprecate HDFS support (#6443) 2024-05-07 12:36:59 -05:00
James Lamb 6e78e697f8
[c++] remove uses of '..' in headers (#6409) 2024-05-03 22:37:27 -05:00
James Lamb da9bb5fd72
[R-package] always name the shared library 'lightgbm', not 'lib_lightgbm' (#6432) 2024-05-01 12:55:33 -05:00
James Lamb c906cfde85
[cmake] [c++] use .dylib extension unconditionally on macOS (#6418) 2024-04-22 23:15:32 -05:00
Dmitry Ulyanov ef2a49cd3b
[CUDA] Add arch=8.9 to CUDA_ARCHS for RTX 40XX (#6272) 2024-01-12 10:25:51 -06:00
Samuel Johnson 2e3543c04c
[cmake] [CUDA] ignore CUDA-specific source files in non-CUDA builds (fixes #6267) (#6268) 2024-01-11 21:41:18 -06:00
James Lamb ec97d36cf2
[cmake] [c++] require CMake 3.18+ (#6260) 2024-01-08 22:49:18 -06:00
James Lamb c5ad987e26
[cmake] [swig] use CMake's built-in file-copying mechanisms instead of 'cp' (#6259) 2024-01-08 21:22:10 -06:00
James Lamb b74528f3f7
[ci] upgrade to GoogleTest v1.14.0 (fixes #5976) (#5981) 2023-12-28 09:27:42 -06:00
June Liu 074b3e8855
Add msvc conformance check (#6234) 2023-12-18 21:20:17 -06:00
James Lamb 1548b42bac
[R-package] [c++] add tighter multithreading control, avoid global OpenMP side effects (fixes #4705, fixes #5102) (#6226) 2023-12-07 17:03:16 -06:00
James Lamb 3c7e38be27
[ci] [R-package] test against R 4.3 on Windows (#6061) 2023-10-06 08:21:32 -05:00
James Lamb 63a882b740
[CUDA] drop CUDA 10 support, start supporting CUDA 12 (fixes #5789) (#6099) 2023-09-30 08:34:50 -05:00
James Lamb 921479b99f
update to fmt 10.1.1, fast_double_parser 0.7.0 (#6074) 2023-09-12 13:40:41 -05:00
James Lamb 30942a32e3
[python-package] [ci] switch to PEP 517 / 518 builds (remove `setup.py`) (fixes #5061) (#5759) 2023-06-15 11:30:34 -05:00
James Lamb 4536f4357b
add CMakeLists options to disable building CLI, installing headers (#5880) 2023-05-27 13:27:26 +02:00
Marco Vela 90786966ae
[ci] use lowercase library names in linker flags (#5870) 2023-05-06 18:27:06 -05:00
James Lamb 4f47547c88
[CUDA] consolidate CUDA versions (#5677)
* [ci] speed up if-else, swig, and lint conda setup

* add 'source activate'

* python constraint

* start removing cuda v1

* comment out CI

* remove more references

* revert some unnecessaary changes

* revert a few more mistakes

* revert another change that ignored params

* sigh

* remove CUDATreeLearner

* fix tests, docs

* fix quoting in setup.py

* restore all CI

* Apply suggestions from code review

Co-authored-by: shiyu1994 <shiyu_k1994@qq.com>

* Apply suggestions from code review

* completely remove cuda_exp, update docs

---------

Co-authored-by: shiyu1994 <shiyu_k1994@qq.com>
2023-02-01 11:27:52 +08:00
shiyu1994 f0cfbff63f
[CUDA] Add rmse metric for new CUDA version (#5611)
* add rmse metric for new cuda version

* add Init for CUDAMetricInterface

* fix lint errors
2022-12-02 12:50:48 +08:00
Jonathan Giannuzzi 38a1f5821a
[ci] Build integrated OpenCL Linux wheels (#5252)
* Add integrated OpenCL build on Linux

* Build integrated OpenCL Linux wheel in CI

* Fix test_dual.py on Linux arm64

* Enable integrated OpenCL Linux wheel arm64 testing in CI

* Update documentation

* Add comment about gpu_use_dp

* add missing fi dropped in merge conflict resolution

* install opencl-headers on bdist task

* use new CI image for x86_64

* update check_dynamic_dependencies script

* use main CI image

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2022-12-02 11:10:31 +08:00
Shogo Hida 8f9133b6f6
[swig] switch to SWIG_ADD_LIBRARY() in CMakeLists.txt (fixes #5586) (#5603) 2022-11-26 19:39:53 -06:00
James Lamb d8a6b8871b
[ci] fix R-package CI jobs and compatibility with OpenMP 15+ (fixes #5549, #5562) (#5563) 2022-11-02 16:38:52 -05:00
shiyu1994 2b8fe8b4bd
[CUDA] Add binary objective for cuda_exp (#5425)
* add binary objective for cuda_exp

* include <string> and <vector>

* exchange include ordering

* fix length of score to copy in evaluation

* fix EvalOneMetric

* fix cuda binary objective and prediction when boosting on gpu

* Add white space

* fix BoostFromScore for CUDABinaryLogloss

update log in test_register_logger

* include <algorithm>

* simplify shared memory buffer
2022-08-31 09:33:17 +08:00
Scott Votaw 0a5c5838eb
feature: Add true streaming APIs to reduce client-side memory usage (#5299)
* Extract streaming to own PR

* small merge fixes and cleanup

* linting fixes

* fix cast warning

* Fix accidental deletion during branch transfer

* responded to initial triage comments

* Added more tests to use create-from-samples APIs

* added mutex and adjusted nclasses logic

* Fix thread-safety for pushing data to sparse bins through Push APIs

* lint and doc fixes

* Small SWIG fix

* nit fix

* Responded to StrikerRUS comments

* fix breaking change after merge with master

* Extract streaming to own PR

* small merge fixes and cleanup

* Fix accidental deletion during branch transfer

* responded to initial triage comments

* Added more tests to use create-from-samples APIs

* Fix rstcheck call in ci

* remove TODOs

* Extract streaming to own PR

* small merge fixes and cleanup

* Fix accidental deletion during branch transfer

* responded to initial triage comments

* Added more tests to use create-from-samples APIs

* Small SWIG fix

* remove ci change

* responded to shiyu1994 comments

* responded to StrikerRUS comments

* Fixes from StrikerRUS comments
2022-08-10 16:31:32 +08:00
Belinda Trotta 44d37184d1
Use double precision in threaded calculation of linear tree coefficients (fixes #5226) (#5368) 2022-07-29 11:09:08 -05:00
shiyu1994 e0af160ad4
[CUDA] Initial work for boosting and evaluation with CUDA (#5279)
* initial work for boosting and evaluation with CUDA

* fix compatibility with CPU code

* fix creating objective without USE_CUDA_EXP

* fix static analysis errors

* fix static analysis errors
2022-07-29 14:23:14 +08:00
shiyu1994 17bfe1a177
Check existence of inet_pton for win32 in CMakeLists.txt (fixes #5019) (#5159)
* check existence of inet_pton for win32 in CMakeLists.txt (fix #5019)

* remove extra spaces

* add check for inet_pton in configure.win

* Update CMakeLists.txt

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update src/network/socket_wrapper.hpp

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update src/network/socket_wrapper.hpp

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update CMakeLists.txt

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update R-package/configure.win

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update CMakeLists.txt

Co-authored-by: James Lamb <jaylamb20@gmail.com>

* fix comments in CMakeLists.txt

* include check for WIN64

* remove WIN64 flag checks

* fix #ifdef

* Update R-package/configure.win

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
2022-05-24 01:09:22 +03:00
shiyu1994 6b56a90cd1
[CUDA] New CUDA version Part 1 (#4630)
* new cuda framework

* add histogram construction kernel

* before removing multi-gpu

* new cuda framework

* tree learner cuda kernels

* single tree framework ready

* single tree training framework

* remove comments

* boosting with cuda

* optimize for best split find

* data split

* move boosting into cuda

* parallel synchronize best split point

* merge split data kernels

* before code refactor

* use tasks instead of features as units for split finding

* refactor cuda best split finder

* fix configuration error with small leaves in data split

* skip histogram construction of too small leaf

* skip split finding of invalid leaves

stop when no leaf to split

* support row wise with CUDA

* copy data for split by column

* copy data from host to CPU by column for data partition

* add synchronize best splits for one leaf from multiple blocks

* partition dense row data

* fix sync best split from task blocks

* add support for sparse row wise for CUDA

* remove useless code

* add l2 regression objective

* sparse multi value bin enabled for CUDA

* fix cuda ranking objective

* support for number of items <= 2048 per query

* speedup histogram construction by interleaving global memory access

* split optimization

* add cuda tree predictor

* remove comma

* refactor objective and score updater

* before use struct

* use structure for split information

* use structure for leaf splits

* return CUDASplitInfo directly after finding best split

* split with CUDATree directly

* use cuda row data in cuda histogram constructor

* clean src/treelearner/cuda

* gather shared cuda device functions

* put shared CUDA functions into header file

* change smaller leaf from <= back to < for consistent result with CPU

* add tree predictor

* remove useless cuda_tree_predictor

* predict on CUDA with pipeline

* add global sort algorithms

* add global argsort for queries with many items in ranking tasks

* remove limitation of maximum number of items per query in ranking

* add cuda metrics

* fix CUDA AUC

* remove debug code

* add regression metrics

* remove useless file

* don't use mask in shuffle reduce

* add more regression objectives

* fix cuda mape loss

add cuda xentropy loss

* use template for different versions of BitonicArgSortDevice

* add multiclass metrics

* add ndcg metric

* fix cross entropy objectives and metrics

* fix cross entropy and ndcg metrics

* add support for customized objective in CUDA

* complete multiclass ova for CUDA

* separate cuda tree learner

* use shuffle based prefix sum

* clean up cuda_algorithms.hpp

* add copy subset on CUDA

* add bagging for CUDA

* clean up code

* copy gradients from host to device

* support bagging without using subset

* add support of bagging with subset for CUDAColumnData

* add support of bagging with subset for dense CUDARowData

* refactor copy sparse subrow

* use copy subset for column subset

* add reset train data and reset config for CUDA tree learner

add deconstructors for cuda tree learner

* add USE_CUDA ifdef to cuda tree learner files

* check that dataset doesn't contain CUDA tree learner

* remove printf debug information

* use full new cuda tree learner only when using single GPU

* disable all CUDA code when using CPU version

* recover main.cpp

* add cpp files for multi value bins

* update LightGBM.vcxproj

* update LightGBM.vcxproj

fix lint errors

* fix lint errors

* fix lint errors

* update Makevars

fix lint errors

* fix the case with 0 feature and 0 bin

fix split finding for invalid leaves

create cuda column data when loaded from bin file

* fix lint errors

hide GetRowWiseData when cuda is not used

* recover default device type to cpu

* fix na_as_missing case

fix cuda feature meta information

* fix UpdateDataIndexToLeafIndexKernel

* create CUDA trees when needed in CUDADataPartition::UpdateTrainScore

* add refit by tree for cuda tree learner

* fix test_refit in test_engine.py

* create set of large bin partitions in CUDARowData

* add histogram construction for columns with a large number of bins

* add find best split for categorical features on CUDA

* add bitvectors for categorical split

* cuda data partition split for categorical features

* fix split tree with categorical feature

* fix categorical feature splits

* refactor cuda_data_partition.cu with multi-level templates

* refactor CUDABestSplitFinder by grouping task information into struct

* pre-allocate space for vector split_find_tasks_ in CUDABestSplitFinder

* fix misuse of reference

* remove useless changes

* add support for path smoothing

* virtual destructor for LightGBM::Tree

* fix overlapped cat threshold in best split infos

* reset histogram pointers in data partition and spllit finder in ResetConfig

* comment useless parameter

* fix reverse case when na is missing and default bin is zero

* fix mfb_is_na and mfb_is_zero and is_single_feature_column

* remove debug log

* fix cat_l2 when one-hot

fix gradient copy when data subset is used

* switch shared histogram size according to CUDA version

* gpu_use_dp=true when cuda test

* revert modification in config.h

* fix setting of gpu_use_dp=true in .ci/test.sh

* fix linter errors

* fix linter error

remove useless change

* recover main.cpp

* separate cuda_exp and cuda

* fix ci bash scripts

add description for cuda_exp

* add USE_CUDA_EXP flag

* switch off USE_CUDA_EXP

* revert changes in python-packages

* more careful separation for USE_CUDA_EXP

* fix CUDARowData::DivideCUDAFeatureGroups

fix set fields for cuda metadata

* revert config.h

* fix test settings for cuda experimental version

* skip some tests due to unsupported features or differences in implementation details for CUDA Experimental version

* fix lint issue by adding a blank line

* fix lint errors by resorting imports

* fix lint errors by resorting imports

* fix lint errors by resorting imports

* merge cuda.yml and cuda_exp.yml

* update python version in cuda.yml

* remove cuda_exp.yml

* remove unrelated changes

* fix compilation warnings

fix cuda exp ci task name

* recover task

* use multi-level template in histogram construction

check split only in debug mode

* ignore NVCC related lines in parameter_generator.py

* update job name for CUDA tests

* apply review suggestions

* Update .github/workflows/cuda.yml

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Update .github/workflows/cuda.yml

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* update header

* remove useless TODOs

* remove [TODO(shiyu1994): constrain the split with min_data_in_group] and record in #5062

* #include <LightGBM/utils/log.h> for USE_CUDA_EXP only

* fix include order

* fix include order

* remove extra space

* address review comments

* add warning when cuda_exp is used together with deterministic

* add comment about gpu_use_dp in .ci/test.sh

* revert changing order of included headers

Co-authored-by: Yu Shi <shiyu1994@qq.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2022-03-23 10:39:23 +08:00
Nikita Titov 144036f2df
[ci] fix CMakeLint errors related to function naming case (#4794)
* Update CMakeLists.txt

* Update CMakeLists.txt

* Update static_analysis.yml

* Update CMakeLists.txt

* Update test.sh

* Update CMakeLists.txt

* Update static_analysis.yml
2021-11-13 19:38:28 -06:00
Nikita Titov 968c60c5a4
[ci] simplify processing of `CMAKE_CUDA_FLAGS` variable in `CMakeLists.txt` (#4799)
* Update CMakeLists.txt

* Update cuda.yml

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update cuda.yml
2021-11-14 03:10:29 +03:00
Nikita Titov 5b587333da
[ci] fix CMakeLint `linelength` errors (#4796)
* Update Sanitizer.cmake

* Update FindLibR.cmake

* Update IntegratedOpenCL.cmake

* Update FindLibR.cmake

* Update CMakeLists.txt

* Update FindLibR.cmake

* Update static_analysis.yml

* Update CMakeLists.txt

* Update FindLibR.cmake

* Update IntegratedOpenCL.cmake

* Update static_analysis.yml
2021-11-13 16:38:31 -06:00
Nikita Titov c3ff187163
[ci] use pure `endif()` and `endfunction()` without expression inside in `CMakeLists.txt` (#4798)
* Update CMakeLists.txt

* Update FindLibR.cmake
2021-11-13 12:55:22 -06:00
Chen Yufei 15a63696c0
cmake: use object library to avoid duplicate compilation. (#4489)
* cmake: use object library to avoid duplicate compilation.

* debug: verbose make log for building r package.

* Include /usr/local/include for AppleClang.

* Revert "debug: verbose make log for building r package."

* update cmake comment and fix indentation

* debug cmake USE_DEBUG.

* Revert "debug cmake USt E_DEBUG."

* Add -fPIC for building shared library.

* Always set -fPIC for non MSVC compiler.

* debug: print exception in setup.py

* debug: print cmake output for vs build.

* debug: set opencl related target_xxx on lightgbm_objs.

* Define compile definitions, link libraries on lightgbm_objs.

* Add PUBLIC to target_link_libraries to expose library dependency.

* Use target_link_libraries on object library.

This should propagate usage requirements.

* Fix CUDA linking.

Linking object library (lightgbm_objs) to object library (histograms)
does not linked objects.

* Use PUBLIC link for lightgbm lib.

* Set cuda related properties on final targets.

* Remove debugging changes.

Revert "debug: print exception in setup.py"
Revert "debug: print cmake output for vs build."
etc.

* Remove -D_lightgbm_EXPORTS.

* Revert to add -fPIC only for NOT USE_DEBUG.

* Enable PIC for shared lib.

* Fix enable PIC.

* Use -fPIC for shared lib.

* testlightgbm depends only on object files.

* tweak build for R.

* Try to remove OpenMP related include dir settings.

* link with openmp for capi object library.

* Use PUBLIC for _lightgbm target_link_libraries.

* Try removing exports definition.

* fix typo

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* fix typo

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

* Add some comments for cmake code.

* Try to fix cmake warnings CUDA.

* revert accidentally commited R-package path change.

* Try to fix cmake CUDA warnings, set for _lightgbm target.

* Try to fix cmake CUDA warnings, set for lightgbm target.

* empty commit to trigger ci

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-11-10 09:45:21 +08:00
Nikita Titov d7ab735395
[ci] Bump Google Test version from `1.10.0` to `1.11.0` (#4683) 2021-10-16 03:33:38 +03:00
Nikita Titov 2543c8edcc
remove duplicated debug printing in `CMakeLists.txt` for MPI (#4644) 2021-10-05 10:45:11 +08:00
Nikita Titov c3b60c289b
[ci] Run cmakelint at CI and fix some errors (#4617) 2021-09-21 19:46:13 -05:00
James Lamb d411bced3a
prefer spaces to tabs in `CMakeLists.txt` (#4593)
Co-authored-by: Nikita Titov <nekit94-12@hotmail.com>
2021-09-09 18:09:58 +03:00
Nikita Titov f3f6545d4c
[ci] add support for 8.0 and 8.6 CUDA archs (#4454) 2021-07-10 15:54:50 +03:00
Nikita Titov 558e4a4009
[tests][ci] run cpp tests with sanitizers on Linux and macOS (#4330)
* run cpp tests with sanitizers

* re-trigger CI

* continue

* small cleanup

* restore cpp test
2021-06-26 15:26:07 +03:00
Robin Dong d6fc12b3e1
[CUDA] Add CUDA_ARCHITECTURES to fix CMake warnings (#3754) (#4268) 2021-05-16 21:06:31 +03:00
James Lamb db2e976ed7
[R-package] suppress Wcast-function-type warning in CMake-based gcc and MinGW builds (fixes #4273) (#4274)
* [R-package] suppress Wcast-function-type warning in CMake-based gcc and MinGW builds (fixes #4273)

* suppress warning from CMake side
2021-05-14 21:31:12 -05:00
Nikita Titov 211ef7878f
[ci] run cpp tests at CI (#4166)
* run cpp tests at CI

* Update docs/Installation-Guide.rst

Co-authored-by: James Lamb <jaylamb20@gmail.com>

Co-authored-by: James Lamb <jaylamb20@gmail.com>
2021-04-16 16:22:46 +03:00
Nikita Titov a9d9b1199c
store all CMake files in one place (#4087) 2021-03-21 16:36:03 +03:00
Philip Hyunsu Cho bcf443b568
Add CMake option to enable sanitizers and build gtest (#3555)
* Add CMake option to enable sanitizer

* Set up gtest

* Address reviewer's feedback

* Address reviewer's feedback

* Update CMakeLists.txt

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>

Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
2021-03-13 00:53:08 +03:00