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
f3c825a2
Commit
f3c825a2
authored
Feb 03, 2022
by
Amit Aflalo
Browse files
mac arm64 compile
parent
d6b8feed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
setup.py
setup.py
+7
-0
No files found.
setup.py
View file @
f3c825a2
...
...
@@ -3,6 +3,8 @@ import glob
import
os.path
as
osp
from
itertools
import
product
from
setuptools
import
setup
,
find_packages
import
platform
import
sys
import
torch
from
torch.utils.cpp_extension
import
BuildExtension
...
...
@@ -51,6 +53,11 @@ def get_extensions():
if
suffix
==
'cuda'
and
osp
.
exists
(
path
):
sources
+=
[
path
]
# Compile for mac arm64
if
(
sys
.
platform
==
'darwin'
and
platform
.
machine
()
==
'arm64'
):
extra_compile_args
[
'cxx'
]
+=
[
'-arch'
,
'arm64'
]
extra_link_args
+=
[
'-arch'
,
'arm64'
]
Extension
=
CppExtension
if
suffix
==
'cpu'
else
CUDAExtension
extension
=
Extension
(
f
'torch_spline_conv._
{
name
}
_
{
suffix
}
'
,
...
...
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