[Bf-cycles] Apple OpenCL and Cycles

Jens Verwiebe info at jensverwiebe.de
Thu Dec 20 12:40:37 CET 2012


Hi Marcio

K then, you made the point. Exactly the vectorizations and structs are the problem here.
I wonder why i had no probs running on cpu then, but the code already changed a lot.
I will look into your patch ( aka trying out ) asap.

Thx for investigation.

Jens




Am 20.12.2012 um 11:56 schrieb Jens Verwiebe <info at jensverwiebe.de>:

> Hi Marcio
> 
> You make a mistake in thinking here. The openCL problem is not a general one, but arises
> on gpu's, expecially AMD. Using cpu mode is good for initially debugging and i too work
> that way, but it won't help adapting code to gfx vendors.
> 
> What i found was that using the ofline compiler gives much better results than the cvm compiler
> from ati, but still has problems ( overwriting structs in memory ? ) elaborating all features.
> 
> So the way to go would be: 
> - adapt/refine/simplyfy code to work on ati gpu
> or
> - wait for adressed issues in the ati openCL components
> 
> Jens
> 
> 
> 
> Am 20.12.2012 um 10:48 schrieb Marcio Andrade <migueletto at yahoo.com>:
> 
>> Hi,
>> 
>> I have submited patch #33626. Pasting from the description:
>> 
>> This patch has three main goals:
>> 
>> 1) Enable OpenCL rendering on CPU for Cycles (device_opencl.cpp).
>> 
>> 2)
>> Provide debug information about the OpenCL platform and devices. Could 
>> be helpful for understanding OpenCL problems (util_opencl.cpp).
>> 
>> 3)
>> Fixes to the OpenCL kernel in order to make it compile on Mac platforms
>> for CPU (kernel.cl, kernel_displace.h, kernel_types.h).
>> NOTE: I have
>> enabled kernel_ocl_shader in kernel.cl, even though it is not beeing 
>> called. It was done to test how the compilation would perform.
>> 
>> Patched againts revision 53178.
>> 
>> I
>> am not sure if any of this is really intended for merging, but it can 
>> help someone trying to understand/debug OpenCL on his/her platform.
>> 
>> Regards,
>> migueletto
>> 
>> 
>> 
>> ----- Mensagem original -----
>> De: Ton Roosendaal <ton at blender.org>
>> Para: Marcio Andrade <migueletto at yahoo.com>; bf-cycles at blender.org
>> Cc: 
>> Enviadas: Terça-feira, 18 de Dezembro de 2012 9:46
>> Assunto: Re: [Bf-cycles] Apple OpenCL and Cycles
>> 
>> Hi Marcio,
>> 
>> You can submit code changes via our patch tracker.
>> http://projects.blender.org/tracker/?atid=127&group_id=9&func=browse
>> 
>> (run svn diff > patch.txt)
>> 
>> blender.org has a free ftp upload facility:
>> 
>> ftp to: ftp.bender.org
>> User: Anonymous
>> cd to directory "incoming" and put the file.
>> 
>> The link will appear here: http://download.blender.org/ftp/incoming/
>> 
>> BTW: Anonymous ftp only allows write-once, no delete or overwrites.
>> 
>> Thanks!
>> 
>> -Ton-
>> 
>> ------------------------------------------------------------------------
>> Ton Roosendaal  Blender Foundation  ton at blender.org    www.blender.org
>> Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands
>> 
>> On 18 Dec, 2012, at 11:13, Marcio Andrade wrote:
>> 
>>> Hi,
>>> 
>>> It is \blender\intern\cycles\device\device_opencl.cpp
>>> 
>>> I also had to change the maximum local workgroup size for execution. For 2-dimension workgroups, the Intel CPU accepts at most 1024 x 1, and blender was submiting a workgroup of 11 x 11 for kernel_ocl_tonemap, so I changed it to submit 128 x 1.
>>> 
>>> I could email the changes to you, if you like, in order to not pollute the list.
>>> 
>>> Regards,
>>> migueletto
>>> 
>>> 
>>> 
>>> ________________________________
>>> De: Nazim Mer <nazim.mer at gmail.com>
>>> Para: bf-cycles at blender.org 
>>> Enviadas: Segunda-feira, 17 de Dezembro de 2012 15:53
>>> Assunto: Re: [Bf-cycles] Apple OpenCL and Cycles
>>> 
>>> 
>>> 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
>> _______________________________________________
>> Bf-cycles mailing list
>> Bf-cycles at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-cycles
> 
> _____________________________________
> 
> Jens Verwiebe
> Allerskehre 44  -  22309 Hamburg
> 
> Tel.: +49 40 68 78 50
> mobil: +49 172 400 49 07
> mailto: info at jensverwiebe.de
> web:  http://www.jensverwiebe.de
> _____________________________________
> 
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles

_____________________________________

Jens Verwiebe
Allerskehre 44  -  22309 Hamburg

Tel.: +49 40 68 78 50
mobil: +49 172 400 49 07
mailto: info at jensverwiebe.de
web:  http://www.jensverwiebe.de
_____________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20121220/a73f97bc/attachment.htm 


More information about the Bf-cycles mailing list