[Bf-cycles] Apple OpenCL and Cycles

Marcio Andrade migueletto at yahoo.com
Tue Dec 18 11:02:24 CET 2012


Hi,

In my tests the speed was similar, but it does not mean it always has to be like that.

Using "OpenCL C" on the CPU, in theory the compiler would try to output parallel opcodes whenever they are appropriate. It is possible that these opcodes are not beeing used when running the C++ Cycles kernel on the CPU, for example.
The key factor is that the kernel code has to targted for optimal compilation with OpenCL. In my logs I am seeing the following output when compiling kernel.cl for CPU:


OpenCL: Compiling kernel
OpenCL: Kernel compilation finished in 3.72s
OpenCL: kernel_ocl_path_trace workgroup size is 1
OpenCL: kernel_ocl_tonemap workgroup size is 128
OpenCL: kernel_ocl_shader workgroup size is 1

Of the three kernels, it seems only kernel_ocl_tonemap could be optmized. The other two will use at most 1 work item for execution, which, in my understanding, means they will not take advantage from multiple compute elements.
(by the way, in my test I uncomented kernel_ocl_shader, but it is not beeing called. It was just to test the compilation)


Regards,
migueletto

________________________________
De: Przemyslaw Golab <golab.przemyslaw at gmail.com>
Para: bf-cycles at blender.org 
Enviadas: Segunda-feira, 17 de Dezembro de 2012 22:23
Assunto: Re: [Bf-cycles] Apple OpenCL and Cycles


Nazim, why You want to use OpenCL for CPU it will have no speed gain.




2012/12/17 Nazim Mer <nazim.mer at gmail.com>

Hi,
>Can you post the directory in which the  device_opencl.cpp file is contained in...(is this file the same among st all platforms)
>
>
>as well as:
>what the final file should look like once changes are made...
>
>
>OR 
>would enabling CPU based Opencl be a target for the official blender build " but certainly a good target for the next release."
>i.e. Blender 2.65a....
>
>
>
>On 17 December 2012 15:35, Ton Roosendaal <ton at blender.org> wrote:
>
>Hi Marcio,
>>
>>Our OS X platform maintainer - Jens Verwiebe - reported similar good results.
>>It hasn't been taken further yet... but certainly a good target for the next release.
>>
>>Could you upload your compiled blender.app for others to check?
>>
>>-Ton-
>>
>>------------------------------------------------------------------------
>>Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
>>Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands
>>
>>
>>On 17 Dec, 2012, at 13:57, Marcio Andrade wrote:
>>
>>> Hello,
>>>
>>> I read that OpenCL development on Cycles is on hold, mainly because of compiler/driver problems in the AMD SDK. I have been doing some experiments with OpenCL on a Mac, and so far I did not encounter thouse kind of problems. After making some small changes to the kernel (basically enabling some defines that were commented out in kernel_types.h and fixing one compile error), I gave it a try.
>>>
>>> Compilation is fast and does not give memory errors. On my system the kernel is compiled in under 5 seconds. My Mac has a Intel HD 3000 GPU, which does not support OpenCL, so in order to make these tests I enabled OpenCL on the CPU (a small change to device_opencl.cpp). When I run the kernel in Blender, rendering time is close to the normal render using CPU, which is expected, since OpenCL Kernel on CPU should be close to the C++ Kernel on CPU.
>>>
>>> Apple is the original author of OpenCL, and OpenCL support on Macs seems to be pretty decent (no need to install anything, it is already bundled). So, is there anyone else trying Cycles/OpenCL on Apple hardware ? I would like to know how OpenCL performs on a Mac with a true GPU, to see if its worth pursuing this direction.
>>>
>>>
>>> Regards,
>>> migueletto
>>>
>>> _______________________________________________
>>> Bf-cycles mailing list
>>> Bf-cycles at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-cycles
>>
>>_______________________________________________
>>Bf-cycles mailing list
>>Bf-cycles at blender.org
>>http://lists.blender.org/mailman/listinfo/bf-cycles
>>
>
>_______________________________________________
>Bf-cycles mailing list
>Bf-cycles at blender.org
>http://lists.blender.org/mailman/listinfo/bf-cycles
>
>

_______________________________________________
Bf-cycles mailing list
Bf-cycles at blender.org
http://lists.blender.org/mailman/listinfo/bf-cycles


More information about the Bf-cycles mailing list