From 284b89a0a35a2dfbf9bc54669e382f446e7cccc5 Mon Sep 17 00:00:00 2001 From: Xavier Hallade Date: Mon, 30 Sep 2024 21:28:23 +0200 Subject: [PATCH] Cycles: oneAPI: compile kernels with fast-relaxed-math This enables most of the GPU compiler's optimizations while -ffast-math isn't set at DPC++ level. It brings an overall 1% speedup and currently doesn't change the unit tests pass rate. --- intern/cycles/kernel/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index 40cccbabec2..4951da8e93a 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -1057,7 +1057,7 @@ if(WITH_CYCLES_DEVICE_ONEAPI) # Set defaults for spir64 and spir64_gen options if(NOT DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_spir64) - set(CYCLES_ONEAPI_SYCL_OPTIONS_spir64 "-options '-ze-opt-large-register-file -ze-opt-regular-grf-kernel integrator_intersect -ze-opt-large-grf-kernel shade -ze-opt-no-local-to-generic'") + set(CYCLES_ONEAPI_SYCL_OPTIONS_spir64 "-options '-cl-fast-relaxed-math -ze-opt-large-register-file -ze-opt-regular-grf-kernel integrator_intersect -ze-opt-large-grf-kernel shade -ze-opt-no-local-to-generic'") endif() if(NOT DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen) set(CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "${CYCLES_ONEAPI_SYCL_OPTIONS_spir64}" CACHE STRING "Extra build options for spir64_gen target")