Commit: 16e7e81638f7ddd07e66bb81dd4380dfeb91f0cd
Author: Sergey Sharybin
Date: Mon Feb 20 13:02:11 2017 +0100
Branches: temp_cycles_split_kernel
https://developer.blender.org/rB16e7e81638f7ddd07e66bb81dd4380dfeb91f0cd
Cycles: Report device maximum allocation and detected global size
===================================================================
M intern/cycles/device/opencl/opencl_split.cpp
M intern/cycles/util/util_logging.cpp
M intern/cycles/util/util_logging.h
===================================================================
diff --git a/intern/cycles/device/opencl/opencl_split.cpp
b/intern/cycles/device/opencl/opencl_split.cpp
index 0b015a5db4..26668f89a8 100644
--- a/intern/cycles/device/opencl/opencl_split.cpp
+++ b/intern/cycles/device/opencl/opencl_split.cpp
@@ -302,9 +302,13 @@ public:
{
size_t max_buffer_size;
clGetDeviceInfo(device->cdDevice, CL_DEVICE_MAX_MEM_ALLOC_SIZE,
sizeof(size_t), &max_buffer_size, NULL);
+ VLOG(1) << "Maximum device allocation side: "
+ << string_human_readable_number(max_buffer_size) << "
bytes. ("
+ << string_human_readable_size(max_buffer_size) << ").";
size_t num_elements =
max_elements_for_max_buffer_size(max_buffer_size / 2, task->passes_size);
int2 global_size =
make_int2(round_down((int)sqrt(num_elements), 64), (int)sqrt(num_elements));
+ VLOG(1) << "Global size: " << global_size << ".";
return global_size;
}
};
diff --git a/intern/cycles/util/util_logging.cpp
b/intern/cycles/util/util_logging.cpp
index 03041723e1..6824f1ff83 100644
--- a/intern/cycles/util/util_logging.cpp
+++ b/intern/cycles/util/util_logging.cpp
@@ -69,6 +69,15 @@ void util_logging_verbosity_set(int verbosity)
}
std::ostream& operator <<(std::ostream &os,
+ const int2 &value)
+{
+ os << "(" << value.x
+ << ", " << value.y
+ << ")";
+ return os;
+}
+
+std::ostream& operator <<(std::ostream &os,
const float3 &value)
{
os << "(" << value.x
diff --git a/intern/cycles/util/util_logging.h
b/intern/cycles/util/util_logging.h
index 2aa9c25b1a..ecf9c9cfee 100644
--- a/intern/cycles/util/util_logging.h
+++ b/intern/cycles/util/util_logging.h
@@ -45,6 +45,7 @@ public:
#define VLOG_ONCE(level, flag) if(!flag) flag = true, VLOG(level)
+struct int2;
struct float3;
void util_logging_init(const char *argv0);
@@ -52,6 +53,8 @@ void util_logging_start(void);
void util_logging_verbosity_set(int verbosity);
std::ostream& operator <<(std::ostream &os,
+ const int2 &value);
+std::ostream& operator <<(std::ostream &os,
const float3 &value);
CCL_NAMESPACE_END
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs