Archived
libxe2: ESIMD kernels compiled with the vector compiler's -ffp-contract=off
The vector compiler that builds ESIMD kernels forms a mad from a multiply and an add unless its own API option says strict, whatever the front end's -ffp-contract: probe fmac.cpp's t = (s * a) * b; c += t came back fused in 14062 of 65536 lanes, 0 with the option, and the SIMT kernels are unaffected either way. An ESIMD epilogue that copies libref's chain (the w2a8 head's group terms) was therefore exact only where no fusion happened to change a rounding. ctest -L sycl on the B65: 3/3 (device_test_sycl, kbench, kbench_moe). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2d1f168ec3
commit
ab0175564b
1 file changed
+6
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user