Skip to content

Commit 5b431f5

Browse files
authored
[Submodule] Add Flash attention v2 (#15423)
1 parent 6e33de6 commit 5b431f5

File tree

5 files changed

+41
-1
lines changed

5 files changed

+41
-1
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@
2525
[submodule "3rdparty/cutlass_fpA_intB_gemm"]
2626
path = 3rdparty/cutlass_fpA_intB_gemm
2727
url = https://github.com/tlc-pack/cutlass_fpA_intB_gemm
28+
[submodule "3rdparty/libflash_attn"]
29+
path = 3rdparty/libflash_attn
30+
url = https://github.com/tlc-pack/libflash_attn

3rdparty/libflash_attn

Submodule libflash_attn added at 58b343e

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Apache Software Foundation License 2.0
214214
3rdparty/OpenCL-Headers
215215
3rdparty/mlperftiny
216216
3rdparty/nvbench (with LLVM exception)
217-
217+
3rdparty/cutlass_fpA_intB_gemm
218218

219219
BSD 2-clause License
220220
--------------------
@@ -247,3 +247,4 @@ BSD 3-Clause "New" or "Revised" License
247247

248248
3rdparty/cutlass
249249
3rdparty/libbacktrace
250+
3rdparty/libflash_attn

licenses/LICENSE.libflash_attn.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file.
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

python/setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ def get_lib_path():
103103
candidate_path, "cutlass_fpA_intB_gemm", "cutlass", "media"
104104
)
105105
)
106+
_remove_path(
107+
os.path.join(candidate_path, "libflash_attn", "cutlass", "docs")
108+
)
109+
_remove_path(
110+
os.path.join(candidate_path, "libflash_attn", "cutlass", "media")
111+
)
106112
break
107113
else:
108114
libs = None

0 commit comments

Comments
 (0)