Skip to content

Commit bff3147

Browse files
committed
Re-enable compilation for Hopper
1 parent 187c2a0 commit bff3147

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

flash_attn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.2.4"
1+
__version__ = "2.2.4.post1"
22

33
from flash_attn.flash_attn_interface import (
44
flash_attn_func,

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ def append_nvcc_threads(nvcc_extra_args):
122122
# cc_flag.append("arch=compute_75,code=sm_75")
123123
cc_flag.append("-gencode")
124124
cc_flag.append("arch=compute_80,code=sm_80")
125-
# if CUDA_HOME is not None:
126-
# if bare_metal_version >= Version("11.8"):
127-
# cc_flag.append("-gencode")
128-
# cc_flag.append("arch=compute_90,code=sm_90")
125+
if CUDA_HOME is not None:
126+
if bare_metal_version >= Version("11.8"):
127+
cc_flag.append("-gencode")
128+
cc_flag.append("arch=compute_90,code=sm_90")
129129

130130
# HACK: The compiler flag -D_GLIBCXX_USE_CXX11_ABI is set to be the same as
131131
# torch._C._GLIBCXX_USE_CXX11_ABI

training/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ RUN pip install transformers==4.25.1 datasets==2.8.0 pytorch-lightning==1.8.6 tr
8585
RUN pip install git+https://github.com/mlcommons/logging.git@2.1.0
8686

8787
# Install FlashAttention
88-
RUN pip install flash-attn==2.2.4
88+
RUN pip install flash-attn==2.2.4.post1
8989

9090
# Install CUDA extensions for fused dense, layer norm
9191
RUN git clone https://github.com/HazyResearch/flash-attention \
92-
&& cd flash-attention && git checkout v2.2.4 \
92+
&& cd flash-attention && git checkout v2.2.4.post1 \
9393
&& cd csrc/layer_norm && pip install . && cd ../../ \
9494
&& cd csrc/fused_dense_lib && pip install . && cd ../../ \
9595
&& cd .. && rm -rf flash-attention

0 commit comments

Comments
 (0)