Cudf support. (#4745)
* Initial support for cudf integration. * Add two C APIs for consuming data and metainfo. * Add CopyFrom for SimpleCSRSource as a generic function to consume the data. * Add FromDeviceColumnar for consuming device data. * Add new MetaInfo::SetInfo for consuming label, weight etc.
This commit is contained in:
committed by
Rory Mitchell
parent
ab357dd41c
commit
9700776597
@@ -10,17 +10,17 @@
|
||||
#include <dmlc/base.h>
|
||||
#include <dmlc/data.h>
|
||||
#include <rabit/rabit.h>
|
||||
#include <cstring>
|
||||
#include <xgboost/base.h>
|
||||
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include "./base.h"
|
||||
|
||||
#include "../../src/common/span.h"
|
||||
#include "../../src/common/group_data.h"
|
||||
|
||||
#include "../../src/common/host_device_vector.h"
|
||||
|
||||
namespace xgboost {
|
||||
@@ -121,6 +121,12 @@ class MetaInfo {
|
||||
* \param num Number of elements in the source array.
|
||||
*/
|
||||
void SetInfo(const char* key, const void* dptr, DataType dtype, size_t num);
|
||||
/*!
|
||||
* \brief Set information in the meta info with array interface.
|
||||
* \param key The key of the information.
|
||||
* \param interface_str String representation of json format array interface.
|
||||
*/
|
||||
void SetInfo(const char* key, std::string const& interface_str);
|
||||
|
||||
private:
|
||||
/*! \brief argsort of labels */
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#ifndef XGBOOST_JSON_H_
|
||||
#define XGBOOST_JSON_H_
|
||||
|
||||
#include <dmlc/io.h>
|
||||
|
||||
#include <xgboost/logging.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Copyright (c) 2015 by Contributors
|
||||
* Copyright (c) 2015-2019 by Contributors
|
||||
* \file logging.h
|
||||
* \brief defines console logging options for xgboost.
|
||||
* Use to enforce unified print behavior.
|
||||
@@ -11,12 +11,13 @@
|
||||
#include <dmlc/logging.h>
|
||||
#include <dmlc/parameter.h>
|
||||
#include <dmlc/thread_local.h>
|
||||
#include <xgboost/base.h>
|
||||
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include "./base.h"
|
||||
|
||||
namespace xgboost {
|
||||
|
||||
@@ -154,5 +155,14 @@ using LogCallbackRegistryStore = dmlc::ThreadLocalStore<LogCallbackRegistry>;
|
||||
::xgboost::ConsoleLogger::LogVerbosity::kIgnore)
|
||||
// Enable LOG(TRACKER) for print messages to tracker
|
||||
#define LOG_TRACKER ::xgboost::TrackerLogger()
|
||||
|
||||
#if defined(CHECK)
|
||||
#undef CHECK
|
||||
#define CHECK(cond) \
|
||||
if (XGBOOST_EXPECT(!(cond), false)) \
|
||||
dmlc::LogMessageFatal(__FILE__, __LINE__).stream() \
|
||||
<< "Check failed: " #cond << ": "
|
||||
#endif // defined(CHECK)
|
||||
|
||||
} // namespace xgboost.
|
||||
#endif // XGBOOST_LOGGING_H_
|
||||
|
||||
Reference in New Issue
Block a user