-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [backport] Fix GPU L1 error. (#8749) * Fix backport.
- Loading branch information
1 parent
df984f9
commit 60303db
Showing
5 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Copyright 2023 by XGBoost contributors | ||
*/ | ||
#include <gtest/gtest.h> | ||
#include <xgboost/task.h> | ||
#include <xgboost/tree_updater.h> | ||
|
||
namespace xgboost { | ||
TEST(Updater, HasNodePosition) { | ||
Context ctx; | ||
ObjInfo task{ObjInfo::kRegression, true, true}; | ||
std::unique_ptr<TreeUpdater> up{TreeUpdater::Create("grow_histmaker", &ctx, task)}; | ||
ASSERT_TRUE(up->HasNodePosition()); | ||
|
||
up.reset(TreeUpdater::Create("grow_quantile_histmaker", &ctx, task)); | ||
ASSERT_TRUE(up->HasNodePosition()); | ||
|
||
#if defined(XGBOOST_USE_CUDA) | ||
ctx.gpu_id = 0; | ||
up.reset(TreeUpdater::Create("grow_gpu_hist", &ctx, task)); | ||
ASSERT_TRUE(up->HasNodePosition()); | ||
#endif // defined(XGBOOST_USE_CUDA) | ||
} | ||
} // namespace xgboost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters