@@ -82,18 +82,14 @@ CMAKE_ARGS="-DCMAKE_POLICY_VERSION_MINIMUM=3.5" pip install nvidia-cudnn-fronten
82
82
python -c " import torch; print('cuDNN version:', torch.backends.cudnn.version());"
83
83
python -c " from transformer_engine.pytorch.utils import get_cudnn_version; get_cudnn_version()"
84
84
85
- # # Megatron-LM requires flash-attn >= 2.1.1, <= 2.7.3
86
- # cu=$(nvcc --version | grep "Cuda compilation tools" | awk '{print $5}' | cut -d '.' -f 1)
87
- # torch=$(pip show torch | grep Version | awk '{print $2}' | cut -d '+' -f 1 | cut -d '.' -f 1,2)
88
- # cp=$(python3 --version | awk '{print $2}' | awk -F. '{print $1$2}')
89
- # cxx=$(g++ --version | grep 'g++' | awk '{print $3}' | cut -d '.' -f 1)
90
- # wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.3/flash_attn-2.7.3+cu${cu}torch${torch}cxx${cxx}abiFALSE-cp${cp}-cp${cp}-linux_x86_64.whl
91
- # pip install flash_attn-2.7.3+cu${cu}torch${torch}cxx${cxx}abiFALSE-cp${cp}-cp${cp}-linux_x86_64.whl
92
- # rm flash_attn-2.7.3+cu${cu}torch${torch}cxx${cxx}abiFALSE-cp${cp}-cp${cp}-linux_x86_64.whl
93
- wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.0.post2/flash_attn-2.8.0.post2+cu12torch2.7cxx11abiFALSE-cp312-cp312-linux_x86_64.whl
94
- pip install flash_attn-2.8.0.post2+cu12torch2.7cxx11abiFALSE-cp312-cp312-linux_x86_64.whl
95
- rm flash_attn-2.8.0.post2+cu12torch2.7cxx11abiFALSE-cp312-cp312-linux_x86_64.whl
96
-
85
+ # Megatron-LM requires flash-attn >= 2.1.1, <= 2.7.3
86
+ cu=$( nvcc --version | grep " Cuda compilation tools" | awk ' {print $5}' | cut -d ' .' -f 1)
87
+ torch=$( pip show torch | grep Version | awk ' {print $2}' | cut -d ' +' -f 1 | cut -d ' .' -f 1,2)
88
+ cp=$( python3 --version | awk ' {print $2}' | awk -F. ' {print $1$2}' )
89
+ cxx=$( g++ --version | grep ' g++' | awk ' {print $3}' | cut -d ' .' -f 1)
90
+ wget https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.0.post2/flash_attn-2.8.0.post2+cu${cu} torch${torch} cxx${cxx} abiFALSE-cp${cp} -cp${cp} -linux_x86_64.whl
91
+ pip install --no-cache-dir flash_attn-2.8.0.post2+cu${cu} torch${torch} cxx${cxx} abiFALSE-cp${cp} -cp${cp} -linux_x86_64.whl
92
+ rm flash_attn-2.8.0.post2+cu${cu} torch${torch} cxx${cxx} abiFALSE-cp${cp} -cp${cp} -linux_x86_64.whl
97
93
98
94
# From Megatron-LM log
99
95
pip install " git+https://github.com/Dao-AILab/flash-attention.git@v2.7.2#egg=flashattn-hopper&subdirectory=hopper"
0 commit comments