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
gaoqiong
flash-attention
Commits
cbb4cf5f
Commit
cbb4cf5f
authored
Aug 18, 2023
by
Tri Dao
Browse files
Don't need to set TORCH_CUDA_ARCH_LIST in setup.py
parent
bb4cded1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
setup.py
setup.py
+0
-21
No files found.
setup.py
View file @
cbb4cf5f
...
...
@@ -98,27 +98,6 @@ def append_nvcc_threads(nvcc_extra_args):
return
nvcc_extra_args
if
not
torch
.
cuda
.
is_available
():
# https://github.com/NVIDIA/apex/issues/486
# Extension builds after https://github.com/pytorch/pytorch/pull/23408 attempt to query torch.cuda.get_device_capability(),
# which will fail if you are compiling in an environment without visible GPUs (e.g. during an nvidia-docker build command).
print
(
"
\n
Warning: Torch did not find available GPUs on this system.
\n
"
,
"If your intention is to cross-compile, this is not an error.
\n
"
"By default, FlashAttention will cross-compile for Ampere (compute capability 8.0, 8.6, "
"8.9), and, if the CUDA version is >= 11.8, Hopper (compute capability 9.0).
\n
"
"If you wish to cross-compile for a single specific architecture,
\n
"
'export TORCH_CUDA_ARCH_LIST="compute capability" before running setup.py.
\n
'
,
)
if
os
.
environ
.
get
(
"TORCH_CUDA_ARCH_LIST"
,
None
)
is
None
and
CUDA_HOME
is
not
None
:
_
,
bare_metal_version
=
get_cuda_bare_metal_version
(
CUDA_HOME
)
if
bare_metal_version
>=
Version
(
"11.8"
):
os
.
environ
[
"TORCH_CUDA_ARCH_LIST"
]
=
"8.0;8.6;9.0"
elif
bare_metal_version
>=
Version
(
"11.4"
):
os
.
environ
[
"TORCH_CUDA_ARCH_LIST"
]
=
"8.0;8.6"
else
:
os
.
environ
[
"TORCH_CUDA_ARCH_LIST"
]
=
"8.0;8.6"
cmdclass
=
{}
ext_modules
=
[]
...
...
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