Skip to content

Commit 507e0aa

Browse files
committed
Removed duplicate include for ROCM_VERSION_DEV. Corrected indentation and code cleanup.
1 parent 6943678 commit 507e0aa

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -895,9 +895,9 @@ if(USE_ROCM)
895895
endif()
896896
endif()
897897

898-
# CK shared lib linkage
898+
# link CK library
899899
if(USE_ROCM)
900-
if(UNIX AND (USE_CK_FLASH_ATTENTION))
900+
if(UNIX AND USE_CK_FLASH_ATTENTION)
901901
include(cmake/External/ck.cmake)
902902
endif()
903903
endif()

aten/src/ATen/CMakeLists.txt

-7
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,6 @@ file(GLOB flash_attention_hip_hip "native/transformers/hip/flash_attn/*.hip")
173173
# if USE_FLASH_ATTENTION is set, ensure CK instances get generated
174174
if(USE_FLASH_ATTENTION)
175175
if(USE_CK_FLASH_ATTENTION)
176-
if(DEFINED ENV{PYTORCH_ROCM_ARCH})
177-
list(LENGTH PYTORCH_ROCM_ARCH NUM_ARCHS)
178-
if(NUM_ARCHS GREATER 1)
179-
message(WARNING "Building CK for multiple archs can increase build time considerably!
180-
Consider setting PYTORCH_ROCM_ARCH env var value as the gfx arch you need to build for")
181-
endif()
182-
endif()
183176
message(STATUS "USE_CK_FLASH_ATTENTION is set; building PyTorch with CK Flash Attention enabled")
184177
message(STATUS "Generating CK kernel instances...")
185178
# disable buidling CK files

cmake/External/ck.cmake

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ else()
1818
message(FATAL_ERROR "Failed to get submodule status for composable_kernel.")
1919
endif()
2020

21-
# get ROCm version from LoadHIP.cmake
22-
include(${CMAKE_SOURCE_DIR}/cmake/public/LoadHIP.cmake)
23-
2421
# full path for CK library on compute-artifactory.amd.com
2522
set(url "https://compute-artifactory.amd.com/artifactory/rocm-generic-local")
2623
set(ck_lib_full_path "${url}/torch_ck_gen_lib/ck_${ck_commit_hash}/rocm_${ROCM_VERSION_DEV}/libck_kernels.so")

0 commit comments

Comments
 (0)