Skip to content

Commit b521442

Browse files
authored
Update Cutlass configuration for DLE 2025.2 (#5018)
To fix: ```bash RequiresExtension: Feature requires the following SPIR-V extension: SPV_INTEL_2d_block_io ``` --------- Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 10bddf6 commit b521442

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

benchmarks/cutlass_kernel/CMakeLists.txt

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
1+
# from https://github.com/pytorch/pytorch/blob/b7e207ca9f046ddd716076965a0cce403ba99052/cmake/Modules/FindSYCLToolkit.cmake#L44
2+
function(parse_sycl_compiler_version version_number)
3+
# Execute the SYCL compiler with the --version flag to match the version string.
4+
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE SYCL_VERSION_STRING)
5+
string(REGEX REPLACE "Intel\\(R\\) (.*) Compiler ([0-9]+\\.[0-9]+\\.[0-9]+) (.*)" "\\2"
6+
SYCL_VERSION_STRING_MATCH ${SYCL_VERSION_STRING})
7+
string(REPLACE "." ";" SYCL_VERSION_LIST ${SYCL_VERSION_STRING_MATCH})
8+
# Split the version number list into major, minor, and patch components.
9+
list(GET SYCL_VERSION_LIST 0 VERSION_MAJOR)
10+
list(GET SYCL_VERSION_LIST 1 VERSION_MINOR)
11+
list(GET SYCL_VERSION_LIST 2 VERSION_PATCH)
12+
# Calculate the version number in the format XXXXYYZZ, using the formula (major * 10000 + minor * 100 + patch).
13+
math(EXPR VERSION_NUMBER_MATCH "${VERSION_MAJOR} * 10000 + ${VERSION_MINOR} * 100 + ${VERSION_PATCH}")
14+
set(${version_number} "${VERSION_NUMBER_MATCH}" PARENT_SCOPE)
15+
endfunction()
16+
17+
parse_sycl_compiler_version(SYCL_COMPILER_VERSION)
18+
19+
set(SPIRV_EXTENSIONS "+SPV_INTEL_split_barrier")
20+
21+
if (SYCL_COMPILER_VERSION GREATER_EQUAL 20250200)
22+
string(APPEND SPIRV_EXTENSIONS ",+SPV_INTEL_2d_block_io,+SPV_INTEL_subgroup_matrix_multiply_accumulate")
23+
endif()
24+
125
set(CUTLASS_KERNEL_FLAGS ${CUTLASS_KERNEL_FLAGS}
226
-fsycl
327
-fsycl-device-code-split=per_kernel
428
-fsycl-targets=intel_gpu_pvc,intel_gpu_bmg_g21
5-
"SHELL:-Xspirv-translator=intel_gpu_pvc --spirv-ext=+SPV_INTEL_split_barrier"
6-
"SHELL:-Xspirv-translator=intel_gpu_bmg_g21 --spirv-ext=+SPV_INTEL_split_barrier"
29+
"SHELL:-Xspirv-translator=intel_gpu_pvc --spirv-ext=${SPIRV_EXTENSIONS}"
30+
"SHELL:-Xspirv-translator=intel_gpu_bmg_g21 --spirv-ext=${SPIRV_EXTENSIONS}"
731
-Xs "-options \"-igc_opts 'VISAOptions=-perfmodel,VectorAliasBBThreshold=1000,ExtraOCLOptions=-cl-intel-256-GRF-per-thread'\" -options -ze-opt-large-register-file"
832
)
933

0 commit comments

Comments
 (0)