11find_package (CutlassSycl )
22
3+ set (CUTLASS_SYCL_REVISION "v{{ version }}" CACHE STRING "CUTLASS revision to use" )
34if (NOT CutlassSycl_FOUND)
45 set (CUTLASS_ENABLE_HEADERS_ONLY ON CACHE BOOL "Enable only the header library" )
56 set (CUTLASS_ENABLE_BENCHMARKS OFF CACHE BOOL "Disable CUTLASS Benchmarks" )
6-
7- # Set CUTLASS_REVISION manually -- its revision detection doesn't work in this case.
8- set (CUTLASS_REVISION "v{{ version }}" CACHE STRING "CUTLASS revision to use" )
9-
107# Use the specified CUTLASS source directory for compilation if CUTLASS_SYCL_SRC_DIR is provided
118 if (DEFINED ENV{CUTLASS_SYCL_SRC_DIR})
129 set (CUTLASS_SYCL_SRC_DIR $ENV{CUTLASS_SYCL_SRC_DIR} )
@@ -22,7 +19,7 @@ if (NOT CutlassSycl_FOUND)
2219 FetchContent_Declare (
2320 cutlass
2421 GIT_REPOSITORY https://github.com/intel/cutlass-sycl.git
25- GIT_TAG ${CUTLASS_REVISION }
22+ GIT_TAG ${CUTLASS_SYCL_REVISION }
2623 GIT_PROGRESS TRUE
2724
2825 # Speed up CUTLASS download by retrieving only the specified GIT_TAG instead of the history.
@@ -54,8 +51,15 @@ else()
5451 include_directories (${CUTLASS_INCLUDE_DIR} )
5552 include_directories (${CUTLASS_TOOLS_UTIL_INCLUDE_DIR} )
5653endif (NOT CutlassSycl_FOUND )
54+ if (CUTLASS_SYCL_REVISION MATCHES "^v3\\ .9" )
55+ add_compile_definitions (OLD_API=1 )
56+ endif ()
57+
5758string (REPLACE "-fsycl-targets=spir64_gen,spir64" "-fsycl-targets=intel_gpu_pvc" sycl_link_flags "${sycl_link_flags} " )
5859string (REPLACE "-device pvc,xe-lpg,ats-m150" "" sycl_link_flags "${sycl_link_flags} " )
59- string (APPEND sycl_link_flags "-Xspirv-translator;-spirv-ext=+SPV_INTEL_split_barrier;" )
60+ string (APPEND sycl_link_flags "-Xspirv-translator;-spirv-ext=+SPV_INTEL_split_barrier" )
61+ if (CUTLASS_SYCL_REVISION STREQUAL "v0.5" )
62+ string (APPEND sycl_link_flags ",+SPV_INTEL_2d_block_io,+SPV_INTEL_subgroup_matrix_multiply_accumulate" )
63+ endif ()
6064string (REPLACE "-fsycl-targets=spir64_gen,spir64" "-fsycl-targets=intel_gpu_pvc" sycl_flags "${sycl_flags} " )
6165
0 commit comments