Skip to content

Commit

Permalink
Update CUDA treelearner according to changes introduced for linear tr…
Browse files Browse the repository at this point in the history
…ees (#3750)

* Update cuda_tree_learner.cpp

* Update cuda_tree_learner.h

* Update cuda.yml
  • Loading branch information
StrikerRUS committed Jan 15, 2021
1 parent f997a06 commit a15a370
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
export ROOT_DOCKER_FOLDER=/LightGBM
cat > docker.env <<EOF
TASK=cuda
METHOD=source
COMPILER=gcc
GITHUB_ACTIONS=true
OS_NAME=linux
Expand Down
4 changes: 2 additions & 2 deletions src/treelearner/cuda_tree_learner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ void CUDATreeLearner::InitGPU(int num_gpu) {
copyDenseFeature();
}

Tree* CUDATreeLearner::Train(const score_t* gradients, const score_t *hessians) {
Tree *ret = SerialTreeLearner::Train(gradients, hessians);
Tree* CUDATreeLearner::Train(const score_t* gradients, const score_t *hessians, bool is_first_tree) {
Tree *ret = SerialTreeLearner::Train(gradients, hessians, is_first_tree);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion src/treelearner/cuda_tree_learner.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CUDATreeLearner: public SerialTreeLearner {
~CUDATreeLearner();
void Init(const Dataset* train_data, bool is_constant_hessian) override;
void ResetTrainingDataInner(const Dataset* train_data, bool is_constant_hessian, bool reset_multi_val_bin) override;
Tree* Train(const score_t* gradients, const score_t *hessians);
Tree* Train(const score_t* gradients, const score_t *hessians, bool is_first_tree);
void SetBaggingData(const Dataset* subset, const data_size_t* used_indices, data_size_t num_data) override {
SerialTreeLearner::SetBaggingData(subset, used_indices, num_data);
if (subset == nullptr && used_indices != nullptr) {
Expand Down

0 comments on commit a15a370

Please sign in to comment.