diff --git a/cmake/FindDPCPP.cmake b/cmake/FindDPCPP.cmake index 9f45285cdc..2d05793525 100644 --- a/cmake/FindDPCPP.cmake +++ b/cmake/FindDPCPP.cmake @@ -106,6 +106,11 @@ function(add_sycl_to_target) get_target_property(target_type ${CUTLASS_ADD_SYCL_TARGET} TYPE) if (NOT target_type STREQUAL "OBJECT_LIBRARY") target_link_options(${CUTLASS_ADD_SYCL_TARGET} PUBLIC ${DPCPP_FLAGS}) + if("${DPCPP_SYCL_TARGET}" STREQUAL "intel_gpu_pvc" OR + "${DPCPP_SYCL_TARGET}" STREQUAL "spir64" OR + "${DPCPP_SYCL_TARGET}" STREQUAL "intel_gpu_bmg_g21") + target_link_options(${CUTLASS_ADD_SYCL_TARGET} PRIVATE -Xs "-options -ze-opt-large-register-file") + endif() endif() endfunction() diff --git a/media/docs/cpp/build/building_with_sycl_support.md b/media/docs/cpp/build/building_with_sycl_support.md index 21ce23f63a..cd733d4fea 100644 --- a/media/docs/cpp/build/building_with_sycl_support.md +++ b/media/docs/cpp/build/building_with_sycl_support.md @@ -69,14 +69,7 @@ $ CC=clang CXX=clang++ cmake .. -G Ninja \ CMake will check that DPC++ compiler is available in the system, and it will download the MKL library if it cannot find it. -To get better performance result we require the following combinations of the environment variables flags to provide better performance hints for generating optimised code. For ahead of time (AOT) compilation, the following options have to be set during compilation and for Just in time (JIT) Compilation when running -``` -export SYCL_PROGRAM_COMPILE_OPTIONS="-ze-opt-large-register-file" -export IGC_VISAOptions="-perfmodel" -export IGC_VectorAliasBBThreshold=10000 -export IGC_ExtraOCLOptions="-cl-intel-256-GRF-per-thread" -``` To build and run a simple PVC gemm example run the commands below. ```