occlum/demos/xgboost/patch/xgboost-01.diff
yuanwu 66b64f8276 Update the xgboost to latest version
Intel has optimized the xgboost in latest version. Performance has
obvious acceleration in benchmark. In svm training with Yahoo LTR data,
latest version gets 7.8X acceleration in host, and 2X acceleration in occlum.

Signed-off-by: yuanwu <yuan.wu@intel.com>
2020-10-18 09:59:06 +08:00

22 lines
706 B
Diff

diff --git a/src/cli_main.cc b/src/cli_main.cc
index 5c602f37..d18a77c2 100644
--- a/src/cli_main.cc
+++ b/src/cli_main.cc
@@ -444,6 +444,16 @@ class CLI {
this->PrintHelp();
exit(1);
}
+
+ // FIXME:workaroud for local distributed machine learning on Occlum
+ for (int i = 2; i < argc; ++i) {
+ char name[128], val[128];
+ if (sscanf(argv[i], "%[^=]=%s", name, val) == 2) {
+ //LOG(CONSOLE) << "setenv: " << std::string(name) << " = " << std::string(val);
+ setenv(std::string(name).c_str(), std::string(val).c_str(), 1);
+ }
+ }
+
for (int i = 0; i < argc; ++i) {
std::string str {argv[i]};
if (str == "-h" || str == "--help") {