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-spline-conv
Commits
58f7102f
Commit
58f7102f
authored
Mar 05, 2021
by
rusty1s
Browse files
use ninja
parent
51f3cd00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
setup.py
setup.py
+5
-1
No files found.
setup.py
View file @
58f7102f
...
@@ -8,6 +8,9 @@ import torch
...
@@ -8,6 +8,9 @@ import torch
from
torch.utils.cpp_extension
import
BuildExtension
from
torch.utils.cpp_extension
import
BuildExtension
from
torch.utils.cpp_extension
import
CppExtension
,
CUDAExtension
,
CUDA_HOME
from
torch.utils.cpp_extension
import
CppExtension
,
CUDAExtension
,
CUDA_HOME
major
,
minor
=
int
(
str
(
torch
.
__version__
)[
0
]),
int
(
str
(
torch
.
__version__
)[
2
])
use_ninja
=
major
>=
2
or
(
major
==
1
and
minor
>=
8
)
WITH_CUDA
=
torch
.
cuda
.
is_available
()
and
CUDA_HOME
is
not
None
WITH_CUDA
=
torch
.
cuda
.
is_available
()
and
CUDA_HOME
is
not
None
suffices
=
[
'cpu'
,
'cuda'
]
if
WITH_CUDA
else
[
'cpu'
]
suffices
=
[
'cpu'
,
'cuda'
]
if
WITH_CUDA
else
[
'cpu'
]
if
os
.
getenv
(
'FORCE_CUDA'
,
'0'
)
==
'1'
:
if
os
.
getenv
(
'FORCE_CUDA'
,
'0'
)
==
'1'
:
...
@@ -89,7 +92,8 @@ setup(
...
@@ -89,7 +92,8 @@ setup(
ext_modules
=
get_extensions
()
if
not
BUILD_DOCS
else
[],
ext_modules
=
get_extensions
()
if
not
BUILD_DOCS
else
[],
cmdclass
=
{
cmdclass
=
{
'build_ext'
:
'build_ext'
:
BuildExtension
.
with_options
(
no_python_abi_suffix
=
True
,
use_ninja
=
False
)
BuildExtension
.
with_options
(
no_python_abi_suffix
=
True
,
use_ninja
=
use_ninja
)
},
},
packages
=
find_packages
(),
packages
=
find_packages
(),
)
)
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