11find_package (CutlassSycl )
22
33if (DPCPP_VERSION STREQUAL "2025.2" )
4- set (CUTLASS_SYCL_REVISION "v0.6" CACHE STRING "CUTLASS revision to use" )
4+ # TODO revert v0.5
5+ set (CUTLASS_SYCL_REVISION "14055e78510b8776ba739755eb57e592fdceefdb" CACHE STRING "CUTLASS revision to use" )
56elseif (DPCPP_VERSION STREQUAL "2025.1" )
67 set (CUTLASS_SYCL_REVISION "v3.9-0.3" CACHE STRING "CUTLASS revision to use" )
78elseif (DPCPP_VERSION STREQUAL "2025.0" )
@@ -27,14 +28,15 @@ if (NOT CutlassSycl_FOUND)
2728 else ()
2829 FetchContent_Declare (
2930 cutlass
30- GIT_REPOSITORY https://github.com/intel/cutlass- sycl.git
31+ GIT_REPOSITORY https://github.com/intel/sycl-tla .git
3132 GIT_TAG ${CUTLASS_SYCL_REVISION}
3233 GIT_PROGRESS TRUE
3334
3435 # Speed up CUTLASS download by retrieving only the specified GIT_TAG instead of the history.
3536 # Important: If GIT_SHALLOW is enabled then GIT_TAG works only with branch names and tags.
3637 # So if the GIT_TAG above is updated to a commit hash, GIT_SHALLOW must be set to FALSE
37- GIT_SHALLOW TRUE
38+ # TODO For 2025.2 FA2, we use a commit hash, so GIT_SHALLOW must be FALSE
39+ GIT_SHALLOW $<IF :$<STREQUAL :${DPCPP_VERSION} ,2025.2>,FALSE ,TRUE >
3840 )
3941 endif ()
4042
@@ -64,12 +66,23 @@ if(CUTLASS_SYCL_REVISION MATCHES "^v3\\.9")
6466 add_compile_definitions (OLD_API=1 )
6567endif ()
6668
67- string (REGEX REPLACE "^v" "" CUTLASS_VER_NO_V "${CUTLASS_SYCL_REVISION} " )
68- if (CUTLASS_VER_NO_V VERSION_LESS "0.6" OR CUTLASS_VER_NO_V MATCHES "^3\\ ." )
69+ # TODO Determine which flash attention implementation to use
70+ if (CUTLASS_SYCL_REVISION MATCHES "^[0-9a-f]{40}$" )
71+ # Commit hash - assume newer version
72+ set (USE_OLD_FLASH_ATTN OFF )
73+ elseif (CUTLASS_SYCL_REVISION MATCHES "^v3\\ ." )
74+ # v3.x versions use old implementation
6975 add_compile_definitions (USE_OLD_FLASH_ATTN=1 )
7076 set (USE_OLD_FLASH_ATTN ON )
7177else ()
72- set (USE_OLD_FLASH_ATTN OFF )
78+ # Tag versions - check version number
79+ string (REGEX REPLACE "^v" "" CUTLASS_VER_NO_V "${CUTLASS_SYCL_REVISION} " )
80+ if (CUTLASS_VER_NO_V VERSION_LESS "0.6" )
81+ add_compile_definitions (USE_OLD_FLASH_ATTN=1 )
82+ set (USE_OLD_FLASH_ATTN ON )
83+ else ()
84+ set (USE_OLD_FLASH_ATTN OFF )
85+ endif ()
7386endif ()
7487
7588string (REPLACE "-fsycl-targets=spir64_gen,spir64" "-fsycl-targets=spir64" sycl_link_flags "${sycl_link_flags} " )
0 commit comments