[EM] Enable prediction cache for GPU. (#10707)

- Use `UpdatePosition` for all nodes and skip `FinalizePosition` when external memory is used.
- Create `encode/decode` for node position, this is just as a refactor.
- Reuse code between update position and finalization.
This commit is contained in:
Jiaming Yuan
2024-08-15 21:41:59 +08:00
committed by GitHub
parent 0def8e0bae
commit 582ea104b5
20 changed files with 378 additions and 327 deletions

View File

@@ -1,10 +1,11 @@
/**
* Copyright 2023, XGBoost Contributors
* Copyright 2023-2024, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <xgboost/json.h> // for Json
#include <xgboost/tree_model.h> // for RegTree
#include "../../../../src/common/categorical.h" // for CatBitField
#include "../../../../src/tree/hist/expand_entry.h"
namespace xgboost::tree {