Fix failures on R hub and Win builder. (#7763)

* Update date.
* Workaround amalgamation build with clang. (SimpleDMatrix instantiation)
* Workaround compiler error with driver push.
* Revert autoconf requirement.
* Fix model IO on 32-bit environment. (i386)
* Clarify the function name.
This commit is contained in:
Jiaming Yuan 2022-03-30 07:14:33 +08:00 committed by GitHub
parent a50b84244e
commit d4796482b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 629 additions and 1188 deletions

View File

@ -2,7 +2,7 @@ Package: xgboost
Type: Package
Title: Extreme Gradient Boosting
Version: 1.6.0.1
Date: 2021-09-25
Date: 2022-03-29
Authors@R: c(
person("Tianqi", "Chen", role = c("aut"),
email = "tianqi.tchen@gmail.com"),

1795
R-package/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
### configure.ac -*- Autoconf -*-
AC_PREREQ(2.71)
AC_PREREQ(2.69)
AC_INIT([xgboost],[1.6-0],[],[xgboost],[])

View File

@ -33,8 +33,8 @@
#include "../src/gbm/gblinear_model.cc"
// data
#include "../src/data/data.cc"
#include "../src/data/simple_dmatrix.cc"
#include "../src/data/data.cc"
#include "../src/data/sparse_page_raw_format.cc"
#include "../src/data/ellpack_page.cc"
#include "../src/data/gradient_index.cc"

View File

@ -182,12 +182,12 @@ T BuiltinBSwap(T v) {
#endif // defined(__GLIBC__)
template <typename T, std::enable_if_t<sizeof(T) == 1>* = nullptr>
inline T ByteSwap(T v) {
inline T ToBigEndian(T v) {
return v;
}
template <typename T, std::enable_if_t<sizeof(T) != 1>* = nullptr>
inline T ByteSwap(T v) {
inline T ToBigEndian(T v) {
static_assert(std::is_pod<T>::value, "Only pod is supported.");
#if DMLC_LITTLE_ENDIAN
auto constexpr kS = sizeof(T);
@ -217,7 +217,7 @@ class UBJReader : public JsonReader {
template <typename T>
T ReadPrimitive() {
auto v = ReadStream<T>();
v = ByteSwap(v);
v = ToBigEndian(v);
return v;
}

View File

@ -864,7 +864,7 @@ Json UBJReader::Parse() {
namespace {
template <typename T>
void WritePrimitive(T v, std::vector<char>* stream) {
v = ByteSwap(v);
v = ToBigEndian(v);
auto s = stream->size();
stream->resize(s + sizeof(v));
auto ptr = stream->data() + s;
@ -918,13 +918,13 @@ void WriteTypedArray(JsonTypedArray<T, kind> const* arr, std::vector<char>* stre
stream->push_back('#');
stream->push_back('L');
auto n = arr->Size();
int64_t n = arr->Size();
WritePrimitive(n, stream);
auto s = stream->size();
stream->resize(s + arr->Size() * sizeof(T));
auto const& vec = arr->GetArray();
for (size_t i = 0; i < n; ++i) {
auto v = ByteSwap(vec[i]);
auto v = ToBigEndian(vec[i]);
std::memcpy(stream->data() + s, &v, sizeof(v));
s += sizeof(v);
}

View File

@ -49,9 +49,7 @@ class Driver {
void Push(const std::vector<ExpandEntryT> &entries) {
this->Push(entries.begin(), entries.end());
}
void Push(const ExpandEntryT e) {
queue_.push(e);
}
void Push(ExpandEntryT const& e) { queue_.push(e); }
bool IsEmpty() {
return queue_.empty();