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:
authorBrecht Van Lommel <brecht@blender.org>2021-10-31 15:18:28 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-11-01 10:36:50 +0300
commit806521f7037a5a50bba9d332ab5de3b0172c5a22 (patch)
treeac075e3972e0b844ff76a8382f328a814e8dc319 /intern/cycles/device
parent154a06077773a5236d388cc47cdaee9d312abd0a (diff)
Fix T92671: confusing Cycles debug logs about CPU architecture
Instead of printing debug flags listing various CPU and GPU settings that may or may not be used, print when we are using them. This include CPU kernel types, OptiX debugging and CUDA and HIP adaptive compilation. BVH type was already printed.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/cpu/device_impl.cpp3
-rw-r--r--intern/cycles/device/cuda/device_impl.cpp10
-rw-r--r--intern/cycles/device/hip/device_impl.cpp12
-rw-r--r--intern/cycles/device/optix/device_impl.cpp1
4 files changed, 17 insertions, 9 deletions
diff --git a/intern/cycles/device/cpu/device_impl.cpp b/intern/cycles/device/cpu/device_impl.cpp
index dbad332f896..d494b40f71d 100644
--- a/intern/cycles/device/cpu/device_impl.cpp
+++ b/intern/cycles/device/cpu/device_impl.cpp
@@ -68,8 +68,7 @@ CPUDevice::CPUDevice(const DeviceInfo &info_, Stats &stats_, Profiler &profiler_
{
/* Pick any kernel, all of them are supposed to have same level of microarchitecture
* optimization. */
- VLOG(1) << "Will be using " << kernels.integrator_init_from_camera.get_uarch_name()
- << " kernels.";
+ VLOG(1) << "Using " << kernels.integrator_init_from_camera.get_uarch_name() << " CPU kernels.";
if (info.cpu_threads == 0) {
info.cpu_threads = TaskScheduler::num_threads();
diff --git a/intern/cycles/device/cuda/device_impl.cpp b/intern/cycles/device/cuda/device_impl.cpp
index 2f9a1394ad8..2bb0592bcc5 100644
--- a/intern/cycles/device/cuda/device_impl.cpp
+++ b/intern/cycles/device/cuda/device_impl.cpp
@@ -378,7 +378,9 @@ string CUDADevice::compile_kernel(const uint kernel_features,
cubin.c_str(),
common_cflags.c_str());
- printf("Compiling CUDA kernel ...\n%s\n", command.c_str());
+ printf("Compiling %sCUDA kernel ...\n%s\n",
+ (use_adaptive_compilation()) ? "adaptive " : "",
+ command.c_str());
# ifdef _WIN32
command = "call " + command;
@@ -405,13 +407,15 @@ string CUDADevice::compile_kernel(const uint kernel_features,
bool CUDADevice::load_kernels(const uint kernel_features)
{
- /* TODO(sergey): Support kernels re-load for CUDA devices.
+ /* TODO(sergey): Support kernels re-load for CUDA devices adaptive compile.
*
* Currently re-loading kernel will invalidate memory pointers,
* causing problems in cuCtxSynchronize.
*/
if (cuModule) {
- VLOG(1) << "Skipping kernel reload, not currently supported.";
+ if (use_adaptive_compilation()) {
+ VLOG(1) << "Skipping CUDA kernel reload for adaptive compilation, not currently supported.";
+ }
return true;
}
diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp
index 31b7b07383b..1ea387513d5 100644
--- a/intern/cycles/device/hip/device_impl.cpp
+++ b/intern/cycles/device/hip/device_impl.cpp
@@ -360,7 +360,9 @@ string HIPDevice::compile_kernel(const uint kernel_features,
source_path.c_str(),
fatbin.c_str());
- printf("Compiling HIP kernel ...\n%s\n", command.c_str());
+ printf("Compiling %sHIP kernel ...\n%s\n",
+ (use_adaptive_compilation()) ? "adaptive " : "",
+ command.c_str());
# ifdef _WIN32
command = "call " + command;
@@ -387,13 +389,15 @@ string HIPDevice::compile_kernel(const uint kernel_features,
bool HIPDevice::load_kernels(const uint kernel_features)
{
- /* TODO(sergey): Support kernels re-load for HIP devices.
+ /* TODO(sergey): Support kernels re-load for CUDA devices adaptive compile.
*
* Currently re-loading kernel will invalidate memory pointers,
- * causing problems in hipCtxSynchronize.
+ * causing problems in cuCtxSynchronize.
*/
if (hipModule) {
- VLOG(1) << "Skipping kernel reload, not currently supported.";
+ if (use_adaptive_compilation()) {
+ VLOG(1) << "Skipping HIP kernel reload for adaptive compilation, not currently supported.";
+ }
return true;
}
diff --git a/intern/cycles/device/optix/device_impl.cpp b/intern/cycles/device/optix/device_impl.cpp
index e9164cc0a76..9b9a5ac0de7 100644
--- a/intern/cycles/device/optix/device_impl.cpp
+++ b/intern/cycles/device/optix/device_impl.cpp
@@ -91,6 +91,7 @@ OptiXDevice::OptiXDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
};
# endif
if (DebugFlags().optix.use_debug) {
+ VLOG(1) << "Using OptiX debug mode.";
options.validationMode = OPTIX_DEVICE_CONTEXT_VALIDATION_MODE_ALL;
}
optix_assert(optixDeviceContextCreate(cuContext, &options, &context));