diff --git a/libxe2/CMakeLists.txt b/libxe2/CMakeLists.txt index 0ad0552e..4416f785 100644 --- a/libxe2/CMakeLists.txt +++ b/libxe2/CMakeLists.txt @@ -31,9 +31,14 @@ rad_add_plugin(libxe2 kernels SOURCES ${XE2_SRC}) # on the compile line alone it changes nothing on the card. # SPV_INTEL_subgroup_matrix_multiply_accumulate: DPAS on operands in registers (xe2_common.h's # dpas_f16), for kernels that decode a weight straight into the B operand. +# -options -ffp-contract=off: the ESIMD kernels' vector compiler forms mads from a multiply and an +# add unless its own option says strict, whatever the front end's -ffp-contract (probe fmac.cpp: +# t = (s * a) * b; c += t came back fused in 14062 of 65536 lanes, 0 with the option; SIMT kernels +# are unaffected either way). Without it an ESIMD epilogue that copies libref's chain is not exact. set(_xe2_sycl -fsycl "-fsycl-targets=${RAD_SYCL_TARGETS}" -ffp-model=precise -ffp-contract=off -Wno-overriding-option -foffload-fp32-prec-div -foffload-fp32-prec-sqrt - "SHELL:-Xspirv-translator -spirv-ext=+SPV_INTEL_subgroup_matrix_multiply_accumulate") + "SHELL:-Xspirv-translator -spirv-ext=+SPV_INTEL_subgroup_matrix_multiply_accumulate" + "SHELL:-Xsycl-target-backend \"-options -ffp-contract=off\"") target_compile_options(libxe2 PRIVATE ${_xe2_sycl} -fvisibility=hidden) get_filename_component(_xe2_icpx_bin "${CMAKE_CXX_COMPILER}" DIRECTORY) get_filename_component(_xe2_oneapi_lib "${_xe2_icpx_bin}/../lib" ABSOLUTE)