forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 66
Download CK library from compute-artifactory and link to Pytorch #2007
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
Closed
+65
−64
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 0 additions & 63 deletions
63
aten/src/ATen/native/transformers/hip/flash_attn/ck/CMakeLists.txt
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
akashveramd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# create INTERFACE target for CK library | ||
# | ||
|
||
# get CK commit hash | ||
execute_process( | ||
COMMAND git -C ${CMAKE_SOURCE_DIR}/third_party submodule status composable_kernel | ||
RESULT_VARIABLE result | ||
OUTPUT_VARIABLE submodule_status | ||
ERROR_VARIABLE submodule_status_error | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
if(result EQUAL 0) | ||
string(REGEX REPLACE "^[ \t]" "" submodule_status ${submodule_status}) | ||
# extract first 8 characters of the commit hash | ||
string(SUBSTRING "${submodule_status}" 0 8 ck_commit_hash) | ||
else() | ||
message(FATAL_ERROR "Failed to get submodule status for composable_kernel.") | ||
endif() | ||
|
||
# get ROCm version from LoadHIP.cmake | ||
include(${CMAKE_SOURCE_DIR}/cmake/public/LoadHIP.cmake) | ||
|
||
# full path for CK library on compute-artifactory.amd.com | ||
set(url "https://compute-artifactory.amd.com/artifactory/rocm-generic-local") | ||
set(ck_lib_full_path "${url}/torch_ck_gen_lib/ck_${ck_commit_hash}/rocm_${ROCM_VERSION_DEV}/libck_kernels.so") | ||
|
||
# set destination | ||
set(destination "${CMAKE_SOURCE_DIR}/torch/lib/libck_kernels.so") | ||
|
||
# download CK library | ||
file(DOWNLOAD ${ck_lib_full_path} ${destination} SHOW_PROGRESS RESULT_VARIABLE download_status) | ||
if(NOT download_status) | ||
message(STATUS "Downloaded CK library successfully.") | ||
else() | ||
message(FATAL_ERROR "Failed to download the CK library from ${SOURCE_URL}.") | ||
endif() | ||
|
||
# create INTERFACE target | ||
add_library(__ck_lib INTERFACE) | ||
|
||
# specify path to CK library | ||
target_link_libraries(__ck_lib INTERFACE ${destination}) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.