Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-scatter
Commits
1c8a0898
Commit
1c8a0898
authored
Feb 13, 2020
by
rusty1s
Browse files
fix windows
parent
feb2a136
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
script/cuda.sh
script/cuda.sh
+15
-2
setup.py
setup.py
+1
-1
No files found.
script/cuda.sh
View file @
1c8a0898
...
@@ -64,6 +64,14 @@ else
...
@@ -64,6 +64,14 @@ else
export
FORCE_CUDA
=
1
export
FORCE_CUDA
=
1
fi
fi
if
[
"
${
IDX
}
"
==
"cu100"
]
||
[
"
${
IDX
}
"
==
"cu101"
]
;
then
export
NVCC_FLAGS
=
"-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_50,code=compute_50"
fi
if
[
"
${
IDX
}
"
==
"cu92"
]
;
then
export
NVCC_FLAGS
=
"-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_50,code=compute_50"
fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"linux"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
INSTALLER
=
cuda-repo-
${
UBUNTU_VERSION
}
_
${
CUDA
}
_amd64.deb
INSTALLER
=
cuda-repo-
${
UBUNTU_VERSION
}
_
${
CUDA
}
_amd64.deb
wget
-nv
"http://developer.download.nvidia.com/compute/cuda/repos/
${
UBUNTU_VERSION
}
/x86_64/
${
INSTALLER
}
"
wget
-nv
"http://developer.download.nvidia.com/compute/cuda/repos/
${
UBUNTU_VERSION
}
/x86_64/
${
INSTALLER
}
"
...
@@ -82,10 +90,15 @@ fi
...
@@ -82,10 +90,15 @@ fi
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
!=
"cpu"
]
;
then
wget
-nv
"
${
CUDA_URL
}
/
${
CUDA_FILE
}
"
wget
-nv
"
${
CUDA_URL
}
/
${
CUDA_FILE
}
"
PowerShell
-Command
"Start-Process -FilePath
\"
${
CUDA_FILE
}
\"
-ArgumentList
\"
-s nvcc_
${
CUDA_SHORT
}
cublas_dev_
${
CUDA_SHORT
}
cusparse_dev_
${
CUDA_SHORT
}
\"
-Wait -NoNewWindow"
PowerShell
-Command
"Start-Process -FilePath
\"
${
CUDA_FILE
}
\"
-ArgumentList
\"
-s nvcc_
${
CUDA_SHORT
}
cublas_dev_
${
CUDA_SHORT
}
cusparse_dev_
${
CUDA_SHORT
}
\"
-Wait -NoNewWindow"
ls
/c/Program
\
Files
\ \(
x86
\)
/Microsoft
\
Visual
\
Studio/2017/BuildTools/VC/Tools/MSVC
CUDA_HOME
=
/c/Program
\
Files/NVIDIA
\
GPU
\
Computing
\
Toolkit/CUDA/v
${
CUDA_SHORT
}
CUDA_HOME
=
/c/Program
\
Files/NVIDIA
\
GPU
\
Computing
\
Toolkit/CUDA/v
${
CUDA_SHORT
}
PATH
=
${
CUDA_HOME
}
/bin:
$PATH
PATH
=
${
CUDA_HOME
}
/bin:
$PATH
PATH
=
/c/Program
\
Files
\ \(
x86
\)
/Microsoft
\
Visual
\
Studio/2017/BuildTools/MSBuild/15.0/Bin:
$PATH
PATH
=
/c/Program
\
Files
\ \(
x86
\)
/Microsoft
\
Visual
\
Studio/2017/BuildTools/MSBuild/15.0/Bin:
$PATH
nvcc
--version
nvcc
--version
cat
-n
/c/Program
\
Files/NVIDIA
\
GPU
\
Computing
\
Toolkit/CUDA/v
${
CUDA_SHORT
}
/include/crt/host_config.h
fi
# Fix Cuda9.2 on Windows: https://github.com/pytorch/pytorch/issues/6109
if
[
"
${
TRAVIS_OS_NAME
}
"
=
"windows"
]
&&
[
"
${
IDX
}
"
=
"cu92"
]
;
then
cat
-n
"
${
CUDA_PATH
}
/include/crt/host_config.h"
sed
-i
.bak
-e
'129,141d'
"
${
CUDA_PATH
}
/include/crt/host_config.h"
cat
-n
"
${
CUDA_PATH
}
/include/crt/host_config.h"
fi
fi
setup.py
View file @
1c8a0898
...
@@ -26,7 +26,7 @@ def get_extensions():
...
@@ -26,7 +26,7 @@ def get_extensions():
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
define_macros
+=
[(
'WITH_CUDA'
,
None
)]
nvcc_flags
=
os
.
getenv
(
'NVCC_FLAGS'
,
''
)
nvcc_flags
=
os
.
getenv
(
'NVCC_FLAGS'
,
''
)
nvcc_flags
=
[]
if
nvcc_flags
==
''
else
nvcc_flags
.
split
(
' '
)
nvcc_flags
=
[]
if
nvcc_flags
==
''
else
nvcc_flags
.
split
(
' '
)
nvcc_flags
+=
[
'-arch=sm_35'
,
'--expt-relaxed-constexpr'
]
nvcc_flags
+=
[
'--expt-relaxed-constexpr'
]
extra_compile_args
[
'nvcc'
]
=
nvcc_flags
extra_compile_args
[
'nvcc'
]
=
nvcc_flags
extensions_dir
=
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'csrc'
)
extensions_dir
=
osp
.
join
(
osp
.
dirname
(
osp
.
abspath
(
__file__
)),
'csrc'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment