Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
fairscale
Commits
2bb2a134
Unverified
Commit
2bb2a134
authored
Apr 27, 2021
by
msbaines
Committed by
GitHub
Apr 27, 2021
Browse files
[chore] do not build cuda extensions by default (#634)
parent
a5594032
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
CHANGELOG.md
CHANGELOG.md
+2
-0
pyproject.toml
pyproject.toml
+0
-1
setup.py
setup.py
+3
-7
No files found.
CHANGELOG.md
View file @
2bb2a134
...
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
...
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## NEXT - TBD
## NEXT - TBD
### Fixed
-
setup.py: hide CUDA extensions behind BUILD_CUDA_EXTENSIONS envvar
### Added
### Added
-
FSDP: better memory usage for reduce bucket (
[
#633
](
https://github.com/facebookresearch/fairscale/pull/633
)
)
-
FSDP: better memory usage for reduce bucket (
[
#633
](
https://github.com/facebookresearch/fairscale/pull/633
)
)
...
...
pyproject.toml
View file @
2bb2a134
[build-system]
[build-system]
requires
=
[
requires
=
[
"setuptools >= 40.6.2"
,
"setuptools >= 40.6.2"
,
"torch >= 1.4.0"
,
"wheel >= 0.30.0"
"wheel >= 0.30.0"
]
]
build-backend
=
"setuptools.build_meta:__legacy__"
build-backend
=
"setuptools.build_meta:__legacy__"
...
...
setup.py
View file @
2bb2a134
...
@@ -7,11 +7,8 @@
...
@@ -7,11 +7,8 @@
import
os
import
os
import
re
import
re
import
warnings
import
setuptools
import
setuptools
import
torch
from
torch.utils.cpp_extension
import
CUDA_HOME
,
BuildExtension
,
CUDAExtension
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
...
@@ -34,8 +31,9 @@ def find_version(version_file_path):
...
@@ -34,8 +31,9 @@ def find_version(version_file_path):
extensions
=
[]
extensions
=
[]
cmdclass
=
{}
cmdclass
=
{}
force_cuda
=
os
.
getenv
(
"FORCE_CUDA"
,
"0"
)
==
"1"
if
os
.
getenv
(
"BUILD_CUDA_EXTENSIONS"
,
"0"
)
==
"1"
:
if
(
torch
.
cuda
.
is_available
()
and
CUDA_HOME
is
not
None
)
or
force_cuda
:
from
torch.utils.cpp_extension
import
BuildExtension
,
CUDAExtension
extensions
.
extend
(
extensions
.
extend
(
[
[
CUDAExtension
(
CUDAExtension
(
...
@@ -51,8 +49,6 @@ if (torch.cuda.is_available() and CUDA_HOME is not None) or force_cuda:
...
@@ -51,8 +49,6 @@ if (torch.cuda.is_available() and CUDA_HOME is not None) or force_cuda:
)
)
cmdclass
[
"build_ext"
]
=
BuildExtension
cmdclass
[
"build_ext"
]
=
BuildExtension
else
:
warnings
.
warn
(
"Cannot install FusedAdam cuda."
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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