Upload 9 files
Browse files- .gitattributes +8 -0
- WindowsWhlBuilder_cuda.bat +75 -0
- flash_attn-2.7.0.post2+cu124torch2.4.0cxx11abiFALSE-cp311-cp311-win_amd64.whl +3 -0
- flash_attn-2.7.0.post2+cu124torch2.4.0cxx11abiFALSE-cp312-cp312-win_amd64.whl +3 -0
- flash_attn-2.7.0.post2+cu124torch2.4.1cxx11abiFALSE-cp311-cp311-win_amd64.whl +3 -0
- flash_attn-2.7.0.post2+cu124torch2.4.1cxx11abiFALSE-cp312-cp312-win_amd64.whl +3 -0
- flash_attn-2.7.0.post2+cu124torch2.5.0cxx11abiFALSE-cp311-cp311-win_amd64.whl +3 -0
- flash_attn-2.7.0.post2+cu124torch2.5.0cxx11abiFALSE-cp312-cp312-win_amd64.whl +3 -0
- flash_attn-2.7.0.post2+cu124torch2.5.1cxx11abiFALSE-cp311-cp311-win_amd64.whl +3 -0
- flash_attn-2.7.0.post2+cu124torch2.5.1cxx11abiFALSE-cp312-cp312-win_amd64.whl +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,11 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
flash_attn-2.7.0.post2+cu124torch2.4.0cxx11abiFALSE-cp311-cp311-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
37 |
+
flash_attn-2.7.0.post2+cu124torch2.4.0cxx11abiFALSE-cp312-cp312-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
38 |
+
flash_attn-2.7.0.post2+cu124torch2.4.1cxx11abiFALSE-cp311-cp311-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
39 |
+
flash_attn-2.7.0.post2+cu124torch2.4.1cxx11abiFALSE-cp312-cp312-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
40 |
+
flash_attn-2.7.0.post2+cu124torch2.5.0cxx11abiFALSE-cp311-cp311-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
41 |
+
flash_attn-2.7.0.post2+cu124torch2.5.0cxx11abiFALSE-cp312-cp312-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
42 |
+
flash_attn-2.7.0.post2+cu124torch2.5.1cxx11abiFALSE-cp311-cp311-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
43 |
+
flash_attn-2.7.0.post2+cu124torch2.5.1cxx11abiFALSE-cp312-cp312-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
|
WindowsWhlBuilder_cuda.bat
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@echo off
|
2 |
+
setlocal enabledelayedexpansion
|
3 |
+
|
4 |
+
|
5 |
+
:parseArgs
|
6 |
+
if [%1] == [WORKERS] set MAX_JOBS=%2 & shift & shift & goto :parseargs
|
7 |
+
if [%1] == [FORCE_CXX11_ABI] set FLASH_ATTENTION_FORCE_CXX11_ABI=%2 & shift & shift & goto :parseargs
|
8 |
+
goto :buildContinue
|
9 |
+
:end
|
10 |
+
|
11 |
+
:buildFinalize
|
12 |
+
set MAX_JOBS=
|
13 |
+
set BUILD_TARGET=
|
14 |
+
set DISTUTILS_USE_SDK=
|
15 |
+
set FLASH_ATTENTION_FORCE_BUILD=
|
16 |
+
set FLASH_ATTENTION_FORCE_CXX11_ABI=
|
17 |
+
set dist_dir=
|
18 |
+
set tmpname=
|
19 |
+
endlocal
|
20 |
+
goto :eof
|
21 |
+
:end
|
22 |
+
|
23 |
+
:buildContinue
|
24 |
+
echo MAX_JOBS: %MAX_JOBS%
|
25 |
+
echo FLASH_ATTENTION_FORCE_CXX11_ABI: %FLASH_ATTENTION_FORCE_CXX11_ABI%
|
26 |
+
rem # We want setuptools >= 49.6.0 otherwise we can't compile the extension if system CUDA version is 11.7 and pytorch cuda version is 11.6
|
27 |
+
rem # https://github.com/pytorch/pytorch/blob/664058fa83f1d8eede5d66418abff6e20bd76ca8/torch/utils/cpp_extension.py#L810
|
28 |
+
rem # However this still fails so I'm using a newer version of setuptools
|
29 |
+
rem pip install setuptools==68.0.0
|
30 |
+
pip install "setuptools>=49.6.0" ninja packaging wheel psutil
|
31 |
+
rem # Limit MAX_JOBS otherwise the github runner goes OOM
|
32 |
+
rem # CUDA 11.8 can compile with 2 jobs, but CUDA 12.3 goes OOM
|
33 |
+
set FLASH_ATTENTION_FORCE_BUILD=TRUE
|
34 |
+
set BUILD_TARGET=cuda
|
35 |
+
set DISTUTILS_USE_SDK=1
|
36 |
+
set dist_dir=dist
|
37 |
+
python setup.py bdist_wheel --dist-dir=%dist_dir%
|
38 |
+
|
39 |
+
|
40 |
+
rem rename whl
|
41 |
+
|
42 |
+
rem just major version, such as cu12torch24cxx11abiFALSE
|
43 |
+
rem for /f "delims=" %%i in ('python -c "import sys; from packaging.version import parse; import torch; python_version = f'cp{sys.version_info.major}{sys.version_info.minor}'; cxx11_abi=str(torch._C._GLIBCXX_USE_CXX11_ABI).upper(); torch_cuda_version = parse(torch.version.cuda); torch_cuda_version = parse(\"11.8\") if torch_cuda_version.major == 11 else parse(\"12.4\"); cuda_version = f'{torch_cuda_version.major}'; torch_version_raw = parse(torch.__version__); torch_version = f'{torch_version_raw.major}.{torch_version_raw.minor}'; wheel_filename = f'cu{cuda_version}torch{torch_version}cxx11abi{cxx11_abi}'; print(wheel_filename);"') do set wheel_filename=%%i
|
44 |
+
|
45 |
+
rem such as cu124torch240cxx11abiFALSE
|
46 |
+
for /f "delims=" %%i in ('python -c "import sys; from packaging.version import parse; import torch; python_version = f'cp{sys.version_info.major}{sys.version_info.minor}'; cxx11_abi=str(torch._C._GLIBCXX_USE_CXX11_ABI).upper(); torch_cuda_version = parse(torch.version.cuda); cuda_version = \"\".join(map(str, torch_cuda_version.release)); torch_version_raw = parse(torch.__version__); torch_version = \".\".join(map(str, torch_version_raw.release)); wheel_filename = f'cu{cuda_version}torch{torch_version}cxx11abi{cxx11_abi}'; print(wheel_filename);"') do set wheel_filename=%%i
|
47 |
+
|
48 |
+
set tmpname=%wheel_filename%
|
49 |
+
|
50 |
+
|
51 |
+
for %%i in (%dist_dir%\*.whl) do (
|
52 |
+
set "filename=%%~nxi"
|
53 |
+
|
54 |
+
rem check if contains +
|
55 |
+
echo !filename! | findstr /c:+ >nul
|
56 |
+
if errorlevel 1 (
|
57 |
+
rem replace second '-' to wheel_filename
|
58 |
+
set "count=0"
|
59 |
+
for /l %%j in (0, 1, 1000) do (
|
60 |
+
if "!filename:~%%j,1!"=="-" set /a count+=1
|
61 |
+
if "!filename:~%%j,1!"=="-" if "!count!"=="2" (
|
62 |
+
set "new_filename=!filename:~0,%%j!+%tmpname%!filename:~%%j!"
|
63 |
+
|
64 |
+
echo Renaming !filename! to !new_filename!
|
65 |
+
move "%%i" "!dist_dir!/!new_filename!"
|
66 |
+
goto :next
|
67 |
+
)
|
68 |
+
)
|
69 |
+
)
|
70 |
+
:next
|
71 |
+
rem continue
|
72 |
+
)
|
73 |
+
|
74 |
+
goto :buildFinalize
|
75 |
+
:end
|
flash_attn-2.7.0.post2+cu124torch2.4.0cxx11abiFALSE-cp311-cp311-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8cc73333f05fcf553ee322446d02bd343415f0c3fd3ed92a2f4aa15d503e3f54
|
3 |
+
size 182257178
|
flash_attn-2.7.0.post2+cu124torch2.4.0cxx11abiFALSE-cp312-cp312-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6c68e07b59cb5440f754074d977e29d7b7f17674a85eea0f8d2b49ab47ba345e
|
3 |
+
size 182257119
|
flash_attn-2.7.0.post2+cu124torch2.4.1cxx11abiFALSE-cp311-cp311-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6e3b5a1f800a83c9f2b479186b8f40f6ee8aff4eaac53d2c54913c7375fd10e8
|
3 |
+
size 182256553
|
flash_attn-2.7.0.post2+cu124torch2.4.1cxx11abiFALSE-cp312-cp312-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3eed5f4f58a3380dadf2101b80791aa83c8b54b0a78e8462596553601296e050
|
3 |
+
size 182257173
|
flash_attn-2.7.0.post2+cu124torch2.5.0cxx11abiFALSE-cp311-cp311-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:676cf819b37db68f48a9fa58ae294062d72fe183e0a0e7f8edabc6e5fadbda5f
|
3 |
+
size 182256051
|
flash_attn-2.7.0.post2+cu124torch2.5.0cxx11abiFALSE-cp312-cp312-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0185455c78800164c52999f404717938ff31c58c056ff732eae06b1f4bc795fc
|
3 |
+
size 182256077
|
flash_attn-2.7.0.post2+cu124torch2.5.1cxx11abiFALSE-cp311-cp311-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc0cf06b8a0a3afc2c803f624abf60b5002522c9021834a2d83a627fad401201
|
3 |
+
size 182255995
|
flash_attn-2.7.0.post2+cu124torch2.5.1cxx11abiFALSE-cp312-cp312-win_amd64.whl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:608d2247f1d442c37e67c0507526456714cb19df3c6e0a080ae72131e78b36ba
|
3 |
+
size 182256160
|