Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-1110] Add header files required by horovod #13062

Merged
merged 17 commits into from
Dec 5, 2018
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ci/build_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ def windows_package(args):
copy_tree('python', j(pkgdir, 'python'))
logging.info('packing headers')
copy_tree('include', j(pkgdir, 'include'))
copy_tree(j('3rdparty','dmlc-core','include'), j(pkgdir, 'include'))
copy_tree(j('3rdparty','mshadow', 'mshadow'), j(pkgdir, 'include', 'mshadow'))
copy_tree(j('3rdparty','tvm','nnvm', 'include'), j(pkgdir,'include', 'nnvm', 'include'))
#copy_tree(j('3rdparty','dmlc-core','include'), j(pkgdir, 'include'))
#copy_tree(j('3rdparty','mshadow', 'mshadow'), j(pkgdir, 'include', 'mshadow'))
#copy_tree(j('3rdparty','tvm','nnvm', 'include'), j(pkgdir,'include', 'nnvm', 'include'))
apeforest marked this conversation as resolved.
Show resolved Hide resolved
logging.info("Compressing package: %s", pkgfile)
check_call(['7z', 'a', pkgfile, pkgdir])

Expand Down
1 change: 1 addition & 0 deletions include/dlpack
1 change: 1 addition & 0 deletions include/dmlc
1 change: 1 addition & 0 deletions include/mshadow
1 change: 1 addition & 0 deletions include/nnvm
31 changes: 31 additions & 0 deletions python/mxnet/libinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,36 @@ def find_lib_path():
return lib_path


def find_include_path():
"""Find MXNet dynamic library files.

Returns
-------
incl_path : string
Path to the header files.
"""
incl_from_env = os.environ.get('MXNET_INCLUDE_PATH')
if incl_from_env:
if os.path.isfile(incl_from_env):
if not os.path.isabs(incl_from_env):
logging.warning("MXNET_INCLUDE_PATH should be an absolute path, instead of: %s",
incl_from_env)
else:
if os.name == 'nt':
os.environ['PATH'] = os.environ['PATH'] + ';' + os.path.dirname(incl_from_env)
return [incl_from_env]
else:
logging.warning("MXNET_INCLUDE_PATH '%s' doesn't exist", incl_from_env)

curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
incl_path = os.path.join(curr_path, '../../include/')
if len(incl_path) == 0:
apeforest marked this conversation as resolved.
Show resolved Hide resolved
raise RuntimeError('Cannot find the MXNet include path.\n')

if os.name == 'nt':
os.environ['PATH'] = os.environ['PATH'] + ';' + os.path.dirname(incl_path)
return incl_path


# current version
__version__ = "1.4.0"