Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Sirgienko <nikita.sirgienko@intel.com>2022-10-13 11:49:07 +0300
committerNikita Sirgienko <nikita.sirgienko@intel.com>2022-10-13 11:49:30 +0300
commit057e99d6dfc3b2bed70be24ebe28724bc6dca7f2 (patch)
tree00cef7a746a11478f69a62c4f9435e52a4dbae1a
parentc32a4556052b1a55a48be581a41621115f14f8b7 (diff)
Cycles: use one instance of oneAPI gpu compiler by default
This change removes CMake code for automatic calculation of the number of offline device compiler instances, to hand over control to developers instead as it incurs a rather large memory usage with around 8GB per instance at peak. Use SYCL_OFFLINE_COMPILER_PARALLEL_JOBS CMake variable to configure it.
-rw-r--r--intern/cycles/kernel/CMakeLists.txt13
1 files changed, 3 insertions, 10 deletions
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 8f50c7586b8..36c8b23d983 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -727,16 +727,9 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
${SRC_UTIL_HEADERS}
)
- set (ONEAPI_OFFLINE_COMPILER_PARALLEL_JOBS 1)
+ set (SYCL_OFFLINE_COMPILER_PARALLEL_JOBS 1 CACHE STRING "Number of parallel compiler instances to use for device binaries compilation (expect ~8GB peak memory usage per instance).")
if (WITH_CYCLES_ONEAPI_BINARIES)
- cmake_host_system_information(RESULT AVAILABLE_MEMORY_AMOUNT QUERY AVAILABLE_PHYSICAL_MEMORY)
- # Conservative value of peak consumption here, just to be fully sure that other backend compilers will have enough memory as well
- set(ONEAPI_GPU_COMPILER_MEMORY_AT_PEAK_MB 8150)
- math(EXPR ONEAPI_OFFLINE_COMPILER_PARALLEL_JOBS "${AVAILABLE_MEMORY_AMOUNT} / ${ONEAPI_GPU_COMPILER_MEMORY_AT_PEAK_MB}")
- if (ONEAPI_OFFLINE_COMPILER_PARALLEL_JOBS LESS 1)
- set(ONEAPI_OFFLINE_COMPILER_PARALLEL_JOBS 1)
- endif()
- message(STATUS "${ONEAPI_OFFLINE_COMPILER_PARALLEL_JOBS} instance(s) of oneAPI offline compiler will be used.")
+ message(STATUS "${SYCL_OFFLINE_COMPILER_PARALLEL_JOBS} instance(s) of oneAPI offline compiler will be used.")
endif()
# SYCL_CPP_FLAGS is a variable that the user can set to pass extra compiler options
set(sycl_compiler_flags
@@ -747,7 +740,7 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
-mllvm -inlinedefault-threshold=250
-mllvm -inlinehint-threshold=350
-fsycl-device-code-split=per_kernel
- -fsycl-max-parallel-link-jobs=${ONEAPI_OFFLINE_COMPILER_PARALLEL_JOBS}
+ -fsycl-max-parallel-link-jobs=${SYCL_OFFLINE_COMPILER_PARALLEL_JOBS}
-shared
-DWITH_ONEAPI
-ffast-math