Cycles: Tweak scheduling of GPU kernel compilation

This change makes it so only kernels of the same vendor are compiled in
parallel. For example for the release builds it will be:

1. All CUDA kernels
2. All OptiX kernels
3. All HIP kernels
4. All OneAPI kernels

This potentially leads to a lower CPU utilization, but it makes it much
easier to manage memory usage and tweak per-vendor concurrency.

The goal of this change is to solve occasional out-of-memory during the
GPU kernels compilation step on the CI/CD farm.

This change also includes tweaks to the prallel jobs for HIP-RT and
oneAPI. The tweak is based on measuring apparent memory usage peak on
Linux when doing single-thread compilation, and giving some safe margin
from the available memory on the buildbot.

Pull Request: https://projects.blender.org/blender/blender/pulls/129945
This commit is contained in:
Sergey Sharybin
2024-11-08 11:05:38 +01:00
committed by Sergey Sharybin
parent 449e7229f3
commit f58522fc10
3 changed files with 19 additions and 14 deletions

View File

@@ -14,4 +14,5 @@ message(STATUS "Building in Rocky 8 Linux 64bit environment")
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES_TEST_OSL ON CACHE BOOL "" FORCE)
set(HIPRT_COMPILER_PARALLEL_JOBS 2 CACHE STRING "" FORCE)
set(HIPRT_COMPILER_PARALLEL_JOBS 6 CACHE STRING "" FORCE)
set(SYCL_OFFLINE_COMPILER_PARALLEL_JOBS 6 CACHE STRING "" FORCE)

View File

@@ -6,4 +6,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
set(WITH_CYCLES_TEST_OSL ON CACHE BOOL "" FORCE)
set(HIPRT_COMPILER_PARALLEL_JOBS 2 CACHE STRING "" FORCE)
set(HIPRT_COMPILER_PARALLEL_JOBS 6 CACHE STRING "" FORCE)
set(SYCL_OFFLINE_COMPILER_PARALLEL_JOBS 6 CACHE STRING "" FORCE)