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
torchani
Commits
d1a63639
Unverified
Commit
d1a63639
authored
Oct 30, 2021
by
Jinze (Richard) Xue
Committed by
GitHub
Oct 30, 2021
Browse files
Fix --cuaev-all-sms (#600)
* Fix --cuaev-all-sms * expecttest * fix ci
parent
bf771af0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
ci/install_dependencies.sh
ci/install_dependencies.sh
+1
-1
setup.py
setup.py
+4
-5
test_requirements.txt
test_requirements.txt
+1
-0
No files found.
ci/install_dependencies.sh
View file @
d1a63639
...
@@ -2,6 +2,6 @@
...
@@ -2,6 +2,6 @@
pip
install
--upgrade
pip
pip
install
--upgrade
pip
pip
install
twine wheel
pip
install
twine wheel
pip
install
--pre
torch
-f
https://download.pytorch.org/whl/nightly/cu11
0
/torch_nightly.html
pip
install
--pre
torch
-f
https://download.pytorch.org/whl/nightly/cu11
2
/torch_nightly.html
pip
install
-r
test_requirements.txt
pip
install
-r
test_requirements.txt
pip
install
-r
docs_requirements.txt
pip
install
-r
docs_requirements.txt
setup.py
View file @
d1a63639
...
@@ -53,10 +53,9 @@ def maybe_download_cub():
...
@@ -53,10 +53,9 @@ def maybe_download_cub():
def
cuda_extension
(
build_all
=
False
):
def
cuda_extension
(
build_all
=
False
):
import
torch
import
torch
from
torch.utils.cpp_extension
import
CUDAExtension
from
torch.utils.cpp_extension
import
CUDAExtension
SMs
=
None
SMs
=
[]
print
(
'-'
*
75
)
print
(
'-'
*
75
)
if
not
build_all
:
if
not
build_all
:
SMs
=
[]
devices
=
torch
.
cuda
.
device_count
()
devices
=
torch
.
cuda
.
device_count
()
print
(
'FAST_BUILD_CUAEV: ON'
)
print
(
'FAST_BUILD_CUAEV: ON'
)
print
(
'This build will only support the following devices or the devices with same cuda capability: '
)
print
(
'This build will only support the following devices or the devices with same cuda capability: '
)
...
@@ -71,13 +70,13 @@ def cuda_extension(build_all=False):
...
@@ -71,13 +70,13 @@ def cuda_extension(build_all=False):
SMs
.
append
(
sm
)
SMs
.
append
(
sm
)
nvcc_args
=
[
"-Xptxas=-v"
,
'--expt-extended-lambda'
,
'-use_fast_math'
]
nvcc_args
=
[
"-Xptxas=-v"
,
'--expt-extended-lambda'
,
'-use_fast_math'
]
if
SMs
:
if
SMs
and
not
ONLY_BUILD_SM80
:
for
sm
in
SMs
:
for
sm
in
SMs
:
nvcc_args
.
append
(
f
"-gencode=arch=compute_
{
sm
}
,code=sm_
{
sm
}
"
)
nvcc_args
.
append
(
f
"-gencode=arch=compute_
{
sm
}
,code=sm_
{
sm
}
"
)
elif
len
(
SMs
)
==
0
and
ONLY_BUILD_SM80
:
# --cuaev --only-sm80
elif
ONLY_BUILD_SM80
:
# --cuaev --only-sm80
nvcc_args
.
append
(
"-gencode=arch=compute_80,code=sm_80"
)
nvcc_args
.
append
(
"-gencode=arch=compute_80,code=sm_80"
)
else
:
# no gpu detected
else
:
# no gpu detected
print
(
'
NO gpu detected, w
ill build for all SMs'
)
print
(
'
W
ill build for all SMs'
)
nvcc_args
.
append
(
"-gencode=arch=compute_60,code=sm_60"
)
nvcc_args
.
append
(
"-gencode=arch=compute_60,code=sm_60"
)
nvcc_args
.
append
(
"-gencode=arch=compute_61,code=sm_61"
)
nvcc_args
.
append
(
"-gencode=arch=compute_61,code=sm_61"
)
nvcc_args
.
append
(
"-gencode=arch=compute_70,code=sm_70"
)
nvcc_args
.
append
(
"-gencode=arch=compute_70,code=sm_70"
)
...
...
test_requirements.txt
View file @
d1a63639
...
@@ -6,3 +6,4 @@ pillow
...
@@ -6,3 +6,4 @@ pillow
pkbar
pkbar
pyyaml
pyyaml
pytest
pytest
expecttest
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