Fix compilation error on x86 (#6964)
Co-authored-by: Jiaming Yuan <jm.yuan@outlook.com>
This commit is contained in:
parent
f94f479358
commit
a4886c404a
@ -734,8 +734,9 @@ XGB_DLL int XGBoosterPredictFromCSR(BoosterHandle handle, char const *indptr,
|
|||||||
API_BEGIN();
|
API_BEGIN();
|
||||||
CHECK_HANDLE();
|
CHECK_HANDLE();
|
||||||
std::shared_ptr<xgboost::data::CSRArrayAdapter> x{
|
std::shared_ptr<xgboost::data::CSRArrayAdapter> x{
|
||||||
new xgboost::data::CSRArrayAdapter{
|
new xgboost::data::CSRArrayAdapter{StringView{indptr},
|
||||||
StringView{indptr}, StringView{indices}, StringView{data}, cols}};
|
StringView{indices}, StringView{data},
|
||||||
|
static_cast<size_t>(cols)}};
|
||||||
std::shared_ptr<DMatrix> p_m {nullptr};
|
std::shared_ptr<DMatrix> p_m {nullptr};
|
||||||
if (m) {
|
if (m) {
|
||||||
p_m = *static_cast<std::shared_ptr<DMatrix> *>(m);
|
p_m = *static_cast<std::shared_ptr<DMatrix> *>(m);
|
||||||
|
|||||||
@ -231,7 +231,7 @@ void GBTree::DoBoost(DMatrix* p_fmat,
|
|||||||
: in_gpair->DeviceIdx();
|
: in_gpair->DeviceIdx();
|
||||||
auto out = MatrixView<float>(
|
auto out = MatrixView<float>(
|
||||||
&predt->predictions,
|
&predt->predictions,
|
||||||
{p_fmat->Info().num_row_, static_cast<size_t>(ngroup)}, device);
|
{static_cast<size_t>(p_fmat->Info().num_row_), static_cast<size_t>(ngroup)}, device);
|
||||||
CHECK_NE(ngroup, 0);
|
CHECK_NE(ngroup, 0);
|
||||||
if (ngroup == 1) {
|
if (ngroup == 1) {
|
||||||
std::vector<std::unique_ptr<RegTree>> ret;
|
std::vector<std::unique_ptr<RegTree>> ret;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user