[cuda] fix discretized dense histogram global-memory offset
CUDAConstructDiscretizedHistogramDenseKernel_GlobalMemory mis-based its
shared_hist_packed pointer on partition_column_start (column-index space)
where partition_hist_start (bin space) is required. The two coincide only
when every column has exactly one bin, which never holds in real
histogram-based training. The three analogous kernels in the same file
(non-discretized dense at line 156, non-discretized sparse at line 215,
discretized sparse at line 472) all use partition_hist_start.
Affects only the dense + use_quantized_grad + USE_GLOBAL_MEM_BUFFER
dispatch path (line 615).
Flips the regression test added in the previous commit from FAIL to PASS.
Co-authored-by: shiyu1994 <shiyu_k1994@qq.com>
* [ROCm] re-add support for ROCm builds
Previously #6086 added ROCm support but after numerous rebases it lost
critical changes. This PR restores the ROCm build.
There are many source file changes but most were automated using the
following:
```bash
for f in `grep -rl '#ifdef USE_CUDA'`
do
sed -i 's@#ifdef USE_CUDA@#if defined(USE_CUDA) || defined(USE_ROCM)@g' $f
done
for f in `grep -rl '#endif // USE_CUDA'`
do
sed -i 's@#endif // USE_CUDA@#endif // USE_CUDA || USE_ROCM@g' $f
done
```
* Fix error in cpp_tests/test_arrow.cpp.
error: explicit specialization in non-namespace scope ‘class ArrowChunkedArrayTest’
* update for ROCm 7 BC-breaking change to warpSize
* lint
* Revert "Fix error in cpp_tests/test_arrow.cpp."
This reverts commit e461e868de85a6b7ef8aceeaaf95cf39d7420ab3.
* partial revert of 61ec4f1aa215ca3381e7b79e98f002dc0c021d77
Instead of replacing all #ifdef USE_CUDA, just add USE_CUDA define to ROCm build.
* add --use-rocm option to build-python.sh
* fix cuda build missing CUDASUCCESS_OR_FATAL in vector_cudahost.h
* add rocm docs
* fix doc using pre-commit
* apply reviewer suggestions
* fix build-python.sh doc
* fix build for rocm 7.0
---------
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: shiyu1994 <shiyu_k1994@qq.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* initialize nccl
* change year in header
* add implementation of nccl gbdt
* add nccl topology
* clean up
* clean up
* set nccl info
* support quantized training with categorical features on cpu
* remove white spaces
* add tests for quantized training with categorical features
* skip tests for cuda version
* fix cases when only 1 data block in row-wise quantized histogram construction with 8 inner bits
* remove useless capture
* fix inconsistency of gpu devices
* fix creating boosting object from file
* change num_gpu to num_gpus in test case
* fix objective initialization
fix lint errors
* fix c++ compilation warning
* fix lint errors
* fix compilation warnings
* change num_gpu to num_gpus in R test case
* add nccl synchronization in tree training
* fix global num data update
* fix ruff-format issues
* use global num data in split finder
* explicit initialization of NCCLInfo members
* fix compilation
* use CUDAVector
* use CUDAVector
* merge master
* use CUDAVector
* use CUDAVector for cuda tree and column data
* update gbdt
* changes for cuda tree
* use CUDAVector for cuda column data
* disable cuda by default
* fix single machine gbdt
* clean up
* fix typo
* fix lint issues
* use num_gpu instead of num_gpus
* fix compilation error
* fix cpp lint errors
* fix reset config for cuda data partition
* fix subrow copy in cuda column data
* fix cmakelint errors
* Update include/LightGBM/config.h
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* Update include/LightGBM/config.h
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* Update include/LightGBM/cuda/cuda_nccl_topology.hpp
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* Update include/LightGBM/config.h
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* Update src/treelearner/cuda/cuda_data_partition.cu
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* Update src/treelearner/cuda/cuda_data_partition.cu
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* Update src/treelearner/cuda/cuda_leaf_splits.cu
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* remove WARPSIZE before #6086 is merged
* Update src/treelearner/cuda/cuda_leaf_splits.cu
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* update docs
* Update src/treelearner/cuda/cuda_leaf_splits.cu
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* update documentation to indicate supporting of multi-node multi-gpu training of CUDA version
* add header guard
* update document for parameters
* fix lint errors
* fix header ordering
* update Nccl to NCCL
---------
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
* [python-package] fix plot_importance() crash when model has 0 splits
* address review: use load_breast_cancer + min_data_in_bin
---------
Co-authored-by: Juan Flores <juanf-0gravity@users.noreply.github.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
The test was skipping the [use_missing=True, zero_as_missing=True] combination
instead of properly testing it. When both flags are True, zeros and NaN are both
treated as missing and reach the same leaf. The assertion now correctly checks
for same leaf (when zero_as_missing=True) vs different leaves (when False).
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: Nikita Titov <nekit94-08@mail.ru>