enable msvc win32 project
This commit is contained in:
parent
5e63b5d469
commit
6c83a94204
@ -4,6 +4,7 @@ How to Build Windows Version
|
|||||||
=====
|
=====
|
||||||
* Open the solution file with Visual Studio
|
* Open the solution file with Visual Studio
|
||||||
* Select x64 and Release in build
|
* Select x64 and Release in build
|
||||||
|
- For 32bit windows or python, try win32 and Release (not fully tested)
|
||||||
* Rebuild all
|
* Rebuild all
|
||||||
|
|
||||||
This should give you xgboost.exe for CLI version and xgboost_wrapper.dll for python
|
This should give you xgboost.exe for CLI version and xgboost_wrapper.dll for python
|
||||||
|
|||||||
@ -93,11 +93,14 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<OpenMPSupport>true</OpenMPSupport>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<AdditionalDependencies>$(OutDir)\rabit.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
|||||||
@ -95,11 +95,13 @@
|
|||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<OpenMPSupport>true</OpenMPSupport>
|
<OpenMPSupport>true</OpenMPSupport>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<AdditionalDependencies>$(OutDir)\rabit.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,10 @@ curr_dir = os.path.dirname(os.path.abspath(__file__))
|
|||||||
dll_path = [curr_dir]
|
dll_path = [curr_dir]
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
dll_path.append(os.path.join(curr_dir, '../windows/x64/Release/'))
|
if platform.architecture()[0] == '64bit':
|
||||||
|
dll_path.append(os.path.join(curr_dir, '../windows/Release/'))
|
||||||
|
else:
|
||||||
|
dll_path.append(os.path.join(curr_dir, '../windows/x64/Release/'))
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
dll_path = [os.path.join(p, 'xgboost_wrapper.dll') for p in dll_path]
|
dll_path = [os.path.join(p, 'xgboost_wrapper.dll') for p in dll_path]
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
import ctypes
|
import ctypes
|
||||||
|
import platform
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -40,7 +41,11 @@ else:
|
|||||||
def load_xglib():
|
def load_xglib():
|
||||||
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
|
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
|
||||||
dll_path = [curr_path]
|
dll_path = [curr_path]
|
||||||
dll_path.append(os.path.join(curr_path, '../windows/x64/Release/'))
|
if os.name == 'nt':
|
||||||
|
if platform.architecture()[0] == '64bit':
|
||||||
|
dll_path.append(os.path.join(curr_dir, '../windows/Release/'))
|
||||||
|
else:
|
||||||
|
dll_path.append(os.path.join(curr_dir, '../windows/x64/Release/'))
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
dll_path = [os.path.join(p, 'xgboost_wrapper.dll') for p in dll_path]
|
dll_path = [os.path.join(p, 'xgboost_wrapper.dll') for p in dll_path]
|
||||||
|
|||||||
@ -266,7 +266,7 @@ extern "C"{
|
|||||||
pmat->info.group_ptr.resize(len + 1);
|
pmat->info.group_ptr.resize(len + 1);
|
||||||
pmat->info.group_ptr[0] = 0;
|
pmat->info.group_ptr[0] = 0;
|
||||||
for (uint64_t i = 0; i < len; ++i) {
|
for (uint64_t i = 0; i < len; ++i) {
|
||||||
pmat->info.group_ptr[i+1] = pmat->info.group_ptr[i]+group[i];
|
pmat->info.group_ptr[i+1] = pmat->info.group_ptr[i] + group[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const float* XGDMatrixGetFloatInfo(const void *handle, const char *field, bst_ulong* len) {
|
const float* XGDMatrixGetFloatInfo(const void *handle, const char *field, bst_ulong* len) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user