Cycles: Adjust global size for OpenCL CPU devices to make them faster
This commit is contained in:
@@ -346,9 +346,18 @@ public:
|
||||
|
||||
virtual int2 split_kernel_global_size(device_memory& kg, device_memory& data, DeviceTask */*task*/)
|
||||
{
|
||||
cl_device_type type;
|
||||
clGetDeviceInfo(device->cdDevice, CL_DEVICE_TYPE, sizeof(cl_device_type), &type, NULL);
|
||||
|
||||
/* Use small global size on CPU devices as it seems to be much faster. */
|
||||
if(type == CL_DEVICE_TYPE_CPU) {
|
||||
VLOG(1) << "Global size: (64, 64).";
|
||||
return make_int2(64, 64);
|
||||
}
|
||||
|
||||
cl_ulong max_buffer_size;
|
||||
clGetDeviceInfo(device->cdDevice, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(cl_ulong), &max_buffer_size, NULL);
|
||||
VLOG(1) << "Maximum device allocation side: "
|
||||
VLOG(1) << "Maximum device allocation size: "
|
||||
<< string_human_readable_number(max_buffer_size) << " bytes. ("
|
||||
<< string_human_readable_size(max_buffer_size) << ").";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user