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
fairscale
Commits
3b83ef51
Unverified
Commit
3b83ef51
authored
Nov 19, 2020
by
msbaines
Committed by
GitHub
Nov 19, 2020
Browse files
[fix] make extension build robust to include path (#196)
Fixes #190
parent
cd496b36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
setup.py
setup.py
+3
-0
No files found.
setup.py
View file @
3b83ef51
...
@@ -10,6 +10,8 @@ import setuptools
...
@@ -10,6 +10,8 @@ import setuptools
import
torch
import
torch
from
torch.utils.cpp_extension
import
CUDA_HOME
,
BuildExtension
,
CUDAExtension
from
torch.utils.cpp_extension
import
CUDA_HOME
,
BuildExtension
,
CUDAExtension
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
def
fetch_requirements
():
def
fetch_requirements
():
with
open
(
"requirements.txt"
)
as
f
:
with
open
(
"requirements.txt"
)
as
f
:
...
@@ -35,6 +37,7 @@ if (torch.cuda.is_available() and CUDA_HOME is not None) or force_cuda:
...
@@ -35,6 +37,7 @@ if (torch.cuda.is_available() and CUDA_HOME is not None) or force_cuda:
[
[
CUDAExtension
(
CUDAExtension
(
name
=
"fairscale.fused_adam_cuda"
,
name
=
"fairscale.fused_adam_cuda"
,
include_dirs
=
[
os
.
path
.
join
(
this_dir
,
"fairscale/clib/fused_adam_cuda"
)],
sources
=
[
sources
=
[
"fairscale/clib/fused_adam_cuda/fused_adam_cuda.cpp"
,
"fairscale/clib/fused_adam_cuda/fused_adam_cuda.cpp"
,
"fairscale/clib/fused_adam_cuda/fused_adam_cuda_kernel.cu"
,
"fairscale/clib/fused_adam_cuda/fused_adam_cuda_kernel.cu"
,
...
...
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