Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flash attention use mirror #10530

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions cmake/third_party/flash_attention.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
include(ExternalProject)

find_package(Threads)

# NOTE: A git version of 1.6.5 or later is required if this download method is used.
find_package(Git QUIET REQUIRED)

set(FLASH_ATTENTION_PROJECT flash_attention)

set(FLASH_ATTENTION_URL https://github.com/Oneflow-Inc/flash-attention-v2.git)
set(FLASH_ATTENTION_TAG eed2e82b880e06237af3e50ceac4cf6728b15645)
set(FLASH_ATTENTION_URL
https://github.com/Oneflow-Inc/flash-attention-v2/archive/eed2e82b880e06237af3e50ceac4cf6728b15645.zip
)
use_mirror(VARIABLE FLASH_ATTENTION_URL URL ${FLASH_ATTENTION_URL})
set(FLASH_ATTENTION_MD5 cff17aa2a95ad754c9889bb3a03d5c51)

set(FLASH_ATTENTION_INSTALL_DIR ${THIRD_PARTY_DIR}/flash_attention)
set(FLASH_ATTENTION_INCLUDE_DIR ${FLASH_ATTENTION_INSTALL_DIR}/include CACHE PATH "" FORCE)
Expand All @@ -19,8 +17,8 @@ if(THIRD_PARTY)
ExternalProject_Add(
${FLASH_ATTENTION_PROJECT}
PREFIX flash_attention
GIT_REPOSITORY ${FLASH_ATTENTION_URL}
GIT_TAG ${FLASH_ATTENTION_TAG}
URL ${FLASH_ATTENTION_URL}
URL_MD5 ${FLASH_ATTENTION_MD5}
UPDATE_COMMAND ""
BUILD_BYPRODUCTS ${FLASH_ATTENTION_LIBRARIES}
CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
Expand Down
Loading