Skip to content

Commit

Permalink
[Submodule] Add Flash attention v2 (apache#15423)
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi authored Jul 28, 2023
1 parent 6e33de6 commit 5b431f5
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
[submodule "3rdparty/cutlass_fpA_intB_gemm"]
path = 3rdparty/cutlass_fpA_intB_gemm
url = https://github.com/tlc-pack/cutlass_fpA_intB_gemm
[submodule "3rdparty/libflash_attn"]
path = 3rdparty/libflash_attn
url = https://github.com/tlc-pack/libflash_attn
1 change: 1 addition & 0 deletions 3rdparty/libflash_attn
Submodule libflash_attn added at 58b343
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Apache Software Foundation License 2.0
3rdparty/OpenCL-Headers
3rdparty/mlperftiny
3rdparty/nvbench (with LLVM exception)

3rdparty/cutlass_fpA_intB_gemm

BSD 2-clause License
--------------------
Expand Down Expand Up @@ -247,3 +247,4 @@ BSD 3-Clause "New" or "Revised" License

3rdparty/cutlass
3rdparty/libbacktrace
3rdparty/libflash_attn
29 changes: 29 additions & 0 deletions licenses/LICENSE.libflash_attn.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 6 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ def get_lib_path():
candidate_path, "cutlass_fpA_intB_gemm", "cutlass", "media"
)
)
_remove_path(
os.path.join(candidate_path, "libflash_attn", "cutlass", "docs")
)
_remove_path(
os.path.join(candidate_path, "libflash_attn", "cutlass", "media")
)
break
else:
libs = None
Expand Down

0 comments on commit 5b431f5

Please sign in to comment.