Commit: 343a5812d60ddbe05d3abdef509fdcf9de4fc970
Author: Xavier Hallade
Date:   Fri Apr 29 16:07:00 2022 +0200
Branches: cycles_oneapi
https://developer.blender.org/rB343a5812d60ddbe05d3abdef509fdcf9de4fc970

Cycles: set JIT compiler options for oneAPI backend

===================================================================

M       intern/cycles/kernel/CMakeLists.txt

===================================================================

diff --git a/intern/cycles/kernel/CMakeLists.txt 
b/intern/cycles/kernel/CMakeLists.txt
index 91e7797b8bd..26dac29b915 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -735,15 +735,23 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
       ${LEVEL_ZERO_LIBRARY}
       ${ONEAPI_DPCPP_FLAGS}
       )
+
   if (WITH_CYCLES_ONEAPI_SYCL_HOST_ENABLED)
     list(APPEND sycl_compiler_flags -DWITH_ONEAPI_SYCL_HOST_ENABLED)
   endif()
+
+  set (CYCLES_ONEAPI_GPU_COMPILATION_OPTIONS "-internal_options 
'-ze-opt-large-register-file -ze-opt-regular-grf-kernel integrator_intersect'")
   if (WITH_CYCLES_ONEAPI_BINARIES)
-    set (CYCLES_ONEAPI_GPU_COMPILATION_OPTIONS "-internal_options 
'-ze-opt-large-register-file -ze-opt-regular-grf-kernel integrator_intersect'")
     list(APPEND sycl_compiler_flags
-      -fsycl-targets=spir64_gen
+      -fsycl-targets=spir64,spir64_gen
+      -Xsycl-target-backend=spir64 "${CYCLES_ONEAPI_GPU_COMPILATION_OPTIONS}"
       -Xsycl-target-backend=spir64_gen "-device ${CYCLES_ONEAPI_AOT_TARGETS} 
${CYCLES_ONEAPI_GPU_COMPILATION_OPTIONS}")
+  else()
+    list(APPEND sycl_compiler_flags
+      -fsycl-targets=spir64
+      -Xsycl-target-backend=spir64 "${CYCLES_ONEAPI_GPU_COMPILATION_OPTIONS}")
   endif()
+
   if(WITH_NANOVDB)
     list(APPEND sycl_compiler_flags
       -DWITH_NANOVDB

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to