-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from elucideye/pr.cereal.only
remove boost serialization
- Loading branch information
Showing
16 changed files
with
97 additions
and
272 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 |
---|---|---|
|
@@ -42,4 +42,4 @@ may need to run: | |
|
||
``` | ||
git submodule update --init --recursive --quiet | ||
``` | ||
``` |
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 |
---|---|---|
@@ -1,16 +1,20 @@ | ||
#!/bin/bash | ||
|
||
TOOLCHAIN=android-ndk-r10e-api-19-armeabi-v7a-neon-hid-sections | ||
TOOLCHAIN=android-ndk-r10e-api-19-armeabi-v7a-neon-hid-sections-lto | ||
|
||
CONFIG=MinSizeRel | ||
|
||
INSTALL="--strip" | ||
|
||
ARGS=( | ||
--verbose | ||
--config Release | ||
--fwd ANDROID=TRUE | ||
HUNTER_CONFIGURATION_TYPES=Release | ||
XGBOOSTER_SERIALIZE_WITH_BOOST=OFF | ||
--config ${CONFIG} | ||
--fwd | ||
ANDROID=TRUE | ||
HUNTER_CONFIGURATION_TYPES=${CONFIG} | ||
XGBOOSTER_SERIALIZE_WITH_CEREAL=ON | ||
XGBOOSTER_ADD_TO_STRING=ON | ||
XGBOOSTER_DO_LEAN=${XGBOOSTER_DO_LEAN} | ||
) | ||
|
||
export HUNTER_ROOT=${HOME}/devel/ruslo/hunter | ||
build.py --toolchain ${TOOLCHAIN} ${ARGS[@]} --clear | ||
polly.py --toolchain ${TOOLCHAIN} ${ARGS[@]} ${INSTALL} --clear |
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 |
---|---|---|
@@ -1,5 +1,20 @@ | ||
#!/bin/bash | ||
|
||
build.py --toolchain libcxx --verbose --fwd HUNTER_CONFIGURATION_TYPES=Release --jobs 8 --clear --strip | ||
CONFIG=MinSizeRel | ||
TOOLCHAIN=osx-10-12-lto | ||
INSTALL=--install | ||
|
||
ARGS=( | ||
--verbose | ||
--config ${CONFIG} | ||
--fwd | ||
HUNTER_CONFIGURATION_TYPES=${CONFIG} | ||
XGBOOSTER_SERIALIZE_WITH_CEREAL=ON | ||
XGBOOSTER_ADD_TO_STRING=ON | ||
) | ||
|
||
polly.py --toolchain ${TOOLCHAIN} ${ARGS[@]} --jobs 8 ${INSTALL} --reconfig # --test | ||
|
||
|
||
|
||
|
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
#!/bin/bash | ||
|
||
TOOLCHAIN=xcode | ||
|
||
CONFIG=MinSizeRel | ||
|
||
ARGS=( | ||
--verbose | ||
--config Release | ||
--fwd HUNTER_CONFIGURATION_TYPES=Release | ||
XGBOOSTER_SERIALIZE_WITH_BOOST=OFF | ||
--config ${CONFIG} | ||
--fwd HUNTER_CONFIGURATION_TYPES=${CONFIG} | ||
XGBOOSTER_SERIALIZE_WITH_CEREAL=ON | ||
--jobs 8 | ||
) | ||
|
||
export HUNTER_ROOT=${HOME}/devel/ruslo/hunter | ||
build.py --toolchain xcode ${ARGS[@]} --reconfig --install --open --test | ||
|
||
build.py --toolchain ${TOOLCHAIN} ${ARGS[@]} --reconfig --install --open --test |
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 |
---|---|---|
@@ -1,15 +1,11 @@ | ||
set(XGBOOST_CMAKE_ARGS | ||
XGBOOST_USE_HALF=ON | ||
XGBOOST_USE_BOOST=ON | ||
XGBOOST_DO_LEAN=ON | ||
XGBOOST_ADD_TO_STRING=${XGBOOSTER_ADD_TO_STRING} | ||
XGBOOST_USE_BOOST=${XGBOOSTER_SERIALIZE_WITH_BOOST} | ||
XGBOOST_DO_LEAN=${XGBOOSTER_DO_LEAN} | ||
XGBOOST_USE_CEREAL=${XGBOOSTER_SERIALIZE_WITH_CEREAL} | ||
) | ||
|
||
if(ANDROID) | ||
list(APPEND XGBOOST_CMAKE_ARGS XGBOOST_ADD_TO_STRING=ON) | ||
endif() | ||
|
||
hunter_config(Boost VERSION ${HUNTER_Boost_VERSION} CMAKE_ARGS IOSTREAMS_NO_BZIP2=1) | ||
hunter_config(xgboost VERSION ${HUNTER_xgboost_VERSION} CMAKE_ARGS ${XGBOOST_CMAKE_ARGS}) | ||
hunter_config(xgboost GIT_SUBMODULE "src/3rdparty/xgboost" CMAKE_ARGS ${XGBOOST_CMAKE_ARGS}) |
Submodule xgboost
updated
12 files
+3 −17 | CMakeLists.txt | |
+1 −15 | src/CMakeLists.txt | |
+12 −32 | src/gbm/gblinear-inl.hpp | |
+5 −20 | src/gbm/gbm.h | |
+24 −48 | src/gbm/gbtree-inl.hpp | |
+3 −2 | src/io/io.cpp | |
+42 −59 | src/learner/learner-inl.hpp | |
+15 −108 | src/learner/objective-inl.hpp | |
+1 −1 | src/learner/objective.h | |
+12 −26 | src/tree/model.h | |
+2 −1 | src/tree/updater.cpp | |
+4 −46 | src/utils/io.h |
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 |
---|---|---|
@@ -1,33 +1,24 @@ | ||
## Customize linker flags | ||
include(CheckCCompilerFlag) | ||
if(NOT MSVC) | ||
check_c_compiler_flag("-Wl,-dead_strip" FLAG_dead_strip) | ||
if(NOT FLAG_dead_strip) | ||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections") | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections,--icf=safe") | ||
else() | ||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-dead_strip") | ||
set(CMAKE_EXE_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-dead_strip") | ||
endif() | ||
endif() | ||
|
||
############### | ||
### xgboost ### | ||
############### | ||
|
||
option(DRISHTI_USE_LOCAL_XGBOOST "Use local xgboost" ON) | ||
if(DRISHTI_USE_LOCAL_XGBOOST) | ||
option(SKIP_INSTALL "Avoid installation of submodule libraries" OFF) | ||
hunter_add_package(xgboost) | ||
find_package(xgboost CONFIG REQUIRED) | ||
|
||
option(SKIP_INSTALL "Skip the package install" OFF) | ||
option(XGBOOST_USE_BOOST "Use boost serialization" ${XGBOOSTER_SERIALIZE_WITH_BOOST}) | ||
option(XGBOOST_USE_CEREAL "Use cereal serialization" ${XGBOOSTER_SERIALIZE_WITH_CEREAL}) | ||
option(XGBOOST_ADD_TO_STRING "Add standard library std::to_string()" ${XGBOOSTER_ADD_TO_STRING}) | ||
option(XGBOOST_USE_HALF "Support half precision floating point storage" ON) | ||
option(XGBOOST_DO_LEAN "Build lean library for evaluation only" OFF) | ||
|
||
add_subdirectory(3rdparty/xgboost) | ||
unset(SKIP_INSTALL CACHE) | ||
add_library(xgboost::xgboost ALIAS xgboost) | ||
set_property(TARGET xgboost PROPERTY FOLDER "libs/3rdparty") | ||
target_include_directories(xgboost PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/3rdparty>") | ||
|
||
else() | ||
hunter_add_package(xgboost) | ||
find_package(xgboost CONFIG REQUIRED) | ||
endif() | ||
add_subdirectory(lib) | ||
add_subdirectory(test) | ||
|
||
message("XGBOOST_USE_BOOST = ${XGBOOST_USE_BOOST}") | ||
message("XGBOOST_USE_CEREAL = ${XGBOOST_USE_CEREAL}") | ||
message("XGBOOSTER_SERIALIZE_WITH_BOOST = ${XGBOOSTER_SERIALIZE_WITH_BOOST}") | ||
message("XGBOOSTER_SERIALIZE_WITH_CEREAL = ${XGBOOSTER_SERIALIZE_WITH_CEREAL}") | ||
|
||
add_subdirectory(lib) | ||
add_subdirectory(test) |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.