Commit 7cd95aba authored by rusty1s's avatar rusty1s
Browse files

potential fix

parent 29410266
...@@ -56,25 +56,48 @@ jobs: ...@@ -56,25 +56,48 @@ jobs:
# language: shell # language: shell
# env: # env:
# - TORCH=${TORCH_VERSION} # - TORCH=${TORCH_VERSION}
# - EXTRA_COMPILE_ARGS="-IC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\include"
- name: windows/cpu - name: windows/cpu
os: windows os: windows
language: shell # `language: python` is an error on Travis CI Windows language: shell
env: env:
- TORCH=${TORCH_VERSION}+cpu - TORCH=${TORCH_VERSION}+cpu
- PATH=/c/Python37:/c/Python37/Scripts:$PATH - PATH=/c/Python37:/c/Python37/Scripts:$PATH
# - EXTRA_COMPILE_ARGS="-IC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\include"
before_install: before_install:
- choco install python --version 3.7.6 - choco install python --version 3.7.6
- name: windows/cu101 - name: windows/cu92
os: windows os: windows
language: shell # `language: python` is an error on Travis CI Windows language: shell
env: env:
- FORCE_CUDA=1 - FORCE_CUDA=1
- CUDA_SHORT=9.2
- CUDA=9.2.148
- TORCH=${TORCH_VERSION} - TORCH=${TORCH_VERSION}
- PATH=/c/Python37:/c/Python37/Scripts:$PATH - PATH=/c/Python37:/c/Python37/Scripts:$PATH
# - EXTRA_COMPILE_ARGS="-IC:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\include"
before_install: before_install:
- choco install python --version 3.7.6 - choco install python --version 3.7.6
# - name: windows/cu100
# os: windows
# language: shell
# env:
# - FORCE_CUDA=1
# - CUDA_SHORT=10.1
# - CUDA=10.0.130_411.31
# - TORCH=${TORCH_VERSION}
# - PATH=/c/Python37:/c/Python37/Scripts:$PATH
# before_install:
# - choco install python --version 3.7.6
# - name: windows/cu101
# os: windows
# language: shell
# env:
# - FORCE_CUDA=1
# - CUDA_SHORT=10.1
# - CUDA=10.1.105_418.96
# - TORCH=${TORCH_VERSION}
# - PATH=/c/Python37:/c/Python37/Scripts:$PATH
# before_install:
# - choco install python --version 3.7.6
install: install:
- pip3 install --upgrade --user pip - pip3 install --upgrade --user pip
......
...@@ -16,6 +16,6 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${FORCE_CUDA}" == "1" ]; then ...@@ -16,6 +16,6 @@ if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${FORCE_CUDA}" == "1" ]; then
fi fi
if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${FORCE_CUDA}" == "1" ]; then if [ "${TRAVIS_OS_NAME}" = "windows" ] && [ "${FORCE_CUDA}" == "1" ]; then
wget -q http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe wget -q "http://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}/Prod/local_installers/cuda_${CUDA}_win10.exe"
./cuda_10.1.243_426.00_win10.exe ./cuda_${CUDA}_win10.exe
fi fi
...@@ -22,9 +22,11 @@ def get_extensions(): ...@@ -22,9 +22,11 @@ def get_extensions():
define_macros = [] define_macros = []
extra_compile_args = {'cxx': [], 'nvcc': []} extra_compile_args = {'cxx': [], 'nvcc': []}
flags = os.getenv('EXTRA_COMPILE_ARGS', '') # flags = os.getenv('EXTRA_COMPILE_ARGS', '')
extra_compile_args['cxx'] += [] if flags == '' else flags.split(' ') # extra_compile_args['cxx'] += [] if flags == '' else flags.split(' ')
extra_compile_args['nvcc'] += [] if flags == '' else flags.split(' ') # extra_compile_args['nvcc'] += [] if flags == '' else flags.split(' ')
libraries = []
# Windows users: Make sure that your VS path is included, i.e.: # Windows users: Make sure that your VS path is included, i.e.:
# extra_compile_args['cxx'] += ['-I{VISUAL_STUDIO_DIR}\\include'] # extra_compile_args['cxx'] += ['-I{VISUAL_STUDIO_DIR}\\include']
...@@ -40,7 +42,8 @@ def get_extensions(): ...@@ -40,7 +42,8 @@ def get_extensions():
extra_compile_args['nvcc'] += nvcc_flags extra_compile_args['nvcc'] += nvcc_flags
if sys.platform == 'win32': if sys.platform == 'win32':
extra_compile_args['cxx'] += ['/MP'] # extra_compile_args['cxx'] += ['/MP']
libraries = ['ATen', '_C']
extensions_dir = osp.join(osp.dirname(osp.abspath(__file__)), 'csrc') extensions_dir = osp.join(osp.dirname(osp.abspath(__file__)), 'csrc')
main_files = glob.glob(osp.join(extensions_dir, '*.cpp')) main_files = glob.glob(osp.join(extensions_dir, '*.cpp'))
...@@ -58,6 +61,7 @@ def get_extensions(): ...@@ -58,6 +61,7 @@ def get_extensions():
include_dirs=[extensions_dir], include_dirs=[extensions_dir],
define_macros=define_macros, define_macros=define_macros,
extra_compile_args=extra_compile_args, extra_compile_args=extra_compile_args,
libraries=libraries,
) )
extensions += [extension] extensions += [extension]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment