cancel
Showing results for
Did you mean:

# Archives Discussions

## Blender Cycles(Opencl on AMD GPUS)

Dear Opencl Developer

Why doesn't the AMD opencl compiler work with blender cycles?

whenever i compile the blender cycles kernel, the system either crashes due to lack of memory, or takes too long to compile the blender cycles kernel(which thereafter comes up with the following error:

opencl build failed:errors in console

calclcompile failederror: creating kernel_ocl_path_trace failed!

can't open file c:\tmp\5688.blend@ for writing:no file or directory

).

When is AMD opencl compiler going to work properly with blender cycles?

Why can't the AMD opencl compiler developers test their compiler against blender cycles?

Seasons Greetings,

npm1,

PS i am as well as others(i assume) are considering to make a switch from AMD GPUs to Nvidia.

371 Replies
Exemplar

Try consider LuxRender http://www.luxrender.net/forum/viewforum.php?f=34 (you must register to read forum) It is works very well on AMD cards. There is also Blender integration. It has very active development. Now there is fourth version of GPU engine.

but is it as fast as blender cycles.

i want to mostly render animations...

what are the best settings for using luxrender for animations

Exemplar

why can't AMD's opencl compiler support the full opencl spefication regardless of the big kernel or not

Exemplar

Just downloaded Blender 2.63 and 2.65 and tried BMW Cycles benchmark. It worked for me. So what exactly didn't work for you?

in blender 2.65 opencl for cycles isn't included(compiled with blender).

I haven't tried blender 2.63 opencl-does that work

i also assume that opencl for AMD GPUs doesn't or else Brecht and team would make the announcment.

You were only using CPU mode.(correct me if i was wrong).

In which case AMD ought to test their opencl compiler against blender cycles and make the necessary optimizations, as:

the compiler runs out of memory, and chokes out errors and complains

This is good for AMD, as this will result to loosing a market of users.

More specifically the AMDs opencl compiler fails to compile blender cycles SVM(shader virtual machine)....

AMD fix your compiler, so that it works with the full opencl specification

Exemplar

I was talking about Blender cycles. Indeed I was using CPU, OpenCL must be enabled in preferences. After this I got segfault when compiling OpenCL kernels.

You should really check out luxrender. it works well on both nVidia and AMD.

Hi Nazim,

Sorry that you have to go through this.

I think you have posted a repro case http://devgurus.amd.com/message/1285984

Will take a look at the repro and get back to you on that thread.

Best Regards,

Workitem 6

Hi I'm a blender user too (but native french peaker).I use blender For Archiviz at professionnal level.But when it's come to speak about productivity there's big shame.My Boss now want to pay cash for high end workstation.I'm the one that can advise the boss about which component are enought powerfull or stable to help us get more Fast rendering.

Me like many many blender user wish that AMD radeon card will be full support by cycles.but it's not the case and cycles developper said that:

"OpenCL support for AMD

is currently on hold. Only a small subset of the entire rendering kernel can currently be compiled, which leaves this mostly at prototype. We will need major driver or hardware improvements to get full cycles support on AMD hardware. For NVidia CUDA still works faster, and Intel integrated GPU's are unlikely to give any speed improvement over CPU rendering.

In Blender 2.65, OpenCL is not available as a choice in the UI by default. The environment variable CYCLES_OPENCL_TEST can be defined to show it, which can be useful for developers that want to test it. The OpenCL kernel is located in 2.65/scripts/addons/cycles/kernel. In the file kernel_types.h specific functionality can be enabled/disabled for testing, without recompiling Blender."

sentence below explain why luxrender work on AMD and why it doesn't for Cycles:

"

The path tracing kernel is currently a single big kernel, much bigger than typical OpenCL code. There are about 40 shading nodes, 10 BSDF's, etc.

Splitting it up into smaller parts may help, but even then compiling only the shading nodes execution code fails. This would be quite difficult to split up. An alternative would be to compile a kernel for each material in the scene, but I don't have much faith in complex node setups compiling reliably then, and scene startup time would increase considerably.

If at all possible I would like to avoid splitting up the kernel in many pieces, mainly because it makes extending the code much harder (we're only getting started in terms of number of features). And also because I haven't really seen this demonstrated working efficiently in other renderers yet, e.g. NVidia Optix also uses a single kernel."

## AMD

The immediate issue that you run into when trying OpenCL, is that compilation will take a long time, or the compiler will crash running out of memory. We can successfully compile a subset of the rendering kernel (thanks to the work of developers at AMD improving the driver), but not enough to consider this usable in practice beyond a demo.

I think register spilling is broken at the AMDIL level.  cycles depends on register spilling for nvidia it uses 24 max-register setting. to force compiler to spill.

i looked at public AMDIL llvm branch and it has the following lines:

unsigned TrivialRegAlloc::getPhysicalRegister()

{

for (unsigned i = 0; i < _regInUse.size(); ++i) {

if (!_regInUse) {

_regInUse = 1;

return _regSet;

}

}

// No physical register available. Has to spill.

abort();

return 0;

}

I do not know if support for spilling registers in the AMD pipeline is on the horizon but the ability to spill would really halp to be able to compile cycles on AMD harware.

Additionally the ability to control the ammount of registers the compiler is able to allocate would further allow the program to benefit of GCN

Grandmaster

Thanks for the feedback. I will let the relevant people know.

 sharlybg wrote:Hi I'm a blender user too (but native french peaker).I use blender For Archiviz at professionnal level.But when it's come to speak about productivity there's big shame.My Boss now want to pay cash for high end workstation.I'm the one that can advise the boss about which component are enought powerfull or stable to help us get more Fast rendering.Me like many many blender user wish that AMD radeon card will be full support by cycles.but it's not the case and cycles developper said that:"OpenCL support for AMDis currently on hold. Only a small subset of the entire rendering kernel can currently be compiled, which leaves this mostly at prototype. We will need major driver or hardware improvements to get full cycles support on AMD hardware. For NVidia CUDA still works faster, and Intel integrated GPU's are unlikely to give any speed improvement over CPU rendering.In Blender 2.65, OpenCL is not available as a choice in the UI by default. The environment variable CYCLES_OPENCL_TEST can be defined to show it, which can be useful for developers that want to test it. The OpenCL kernel is located in 2.65/scripts/addons/cycles/kernel. In the file kernel_types.h specific functionality can be enabled/disabled for testing, without recompiling Blender."sentence below explain why luxrender work on AMD and why it doesn't for Cycles:"The path tracing kernel is currently a single big kernel, much bigger than typical OpenCL code. There are about 40 shading nodes, 10 BSDF's, etc.Splitting it up into smaller parts may help, but even then compiling only the shading nodes execution code fails. This would be quite difficult to split up. An alternative would be to compile a kernel for each material in the scene, but I don't have much faith in complex node setups compiling reliably then, and scene startup time would increase considerably.If at all possible I would like to avoid splitting up the kernel in many pieces, mainly because it makes extending the code much harder (we're only getting started in terms of number of features). And also because I haven't really seen this demonstrated working efficiently in other renderers yet, e.g. NVidia Optix also uses a single kernel."

## AMD

 The immediate issue that you run into when trying OpenCL, is that compilation will take a long time, or the compiler will crash running out of memory. We can successfully compile a subset of the rendering kernel (thanks to the work of developers at AMD improving the driver), but not enough to consider this usable in practice beyond a demo.

I'm wondering how different architectures, by design, are with respect to Blender Cycles and say Optics Real-Time Render.OPTIS | Real Time Physics Based Rendering

 OPTIS THEIA-RT Final-quality rendering 50-100

 The time saved in not having to develop new code for each hardware platform on which you want your software to run can also be significant – something that optical and lighting simulation specialist at OPTIS discovered with THEIA-RT, our real-time visualisation system. “Time saved on kernel development enables us to spend more time on tasks like developing a nice UI and adding new raytracing features such as advanced caustics and global illumination. Thanks to the time saved by using OpenCL, we had advanced GI ready three months earlier than we had planned,” says Nicolas Dalmasso, co-founder and COO at SimplySim, part of the OPTIS Group.

I expect these issues will get resolved and perhaps Blender will see some major boosts once it leverages OpenCL 2.0 based code.

THEIA-RT is realtime but not really realistic at rendering ! Look here what Dade luxrender dev said about it :

http://www.luxrender.net/forum/viewtopic.php?f=17&t=10345

And at job we finally run with Nvidia workstation based ! My own one with two GTX TiTan Black . Nvidia opencl 1.1 compiler work with blender cycles but Amd is supposed to support opencl 1.2 but with bad and poor performance . I think opencl 2.0 isn't the solution.

past year I've tried Luxrender but here again because of amd bad compiler lux dev can't reach a serious production based GPU render engine !

 sharlybg wrote:THEIA-RT is realtime but not really realistic at rendering ! Look here what Dade luxrender dev said about it :http://www.luxrender.net/forum/viewtopic.php?f=17&t=10345And at job we finally run with Nvidia workstation based ! My own one with two GTX TiTan Black . Nvidia opencl 1.1 compiler work with blender cycles but Amd is supposed to support opencl 1.2 but with bad and poor performance . I think opencl 2.0 isn't the solution.past year I've tried Luxrender but here again because of amd bad compiler lux dev can't reach a serious production based GPU render engine !

Reading this thread on LLVM-Dev : [LLVMdev] PHINode containing itself causes segfault when compiling Blender OpenCL kernel with R600 b...

Tells me that Blender's Cycles implementation has bugs and it's nice to see the developer contacting LLVM concerning Mesa OpenCL and R600 backend. He's discovered there is much to learn about LLVM and its architecture, and how to implement a solution. I expect he'll get passed the errors soon.

Challenger

AMD OpenCL 2.0 Driver

OCL2.0 from AMD was just released. Can someone try blender with it and let us know if it is any better?

Thanks

Challenger

AMD Releases OpenCL 2.0 Catalyst Linux Driver - Page 2

Blender issue finally fixed? I'd appreciate a second confirmation.

I'm using the nightly default build and it's crashing, but it crashes a lot faster, so that's different. I don't have time to mess around with the build settings. I left everything as-is.

As everyone is saying, this may not actually be a bug and may instead be issues with Blender and OpenCL 2.0. I'll give everyone the benefit of the doubt on this. I have hopes, though. I definitely have hopes.

Journeyman III

Blender 2.71 Works compile time down to about 20sec and Ram used was 970mb.

Render time is not any better yet.

all of the Daily Builds I have after 2.71 and up to 2.72rc do not work.

This is like having a corvette and the only thing it can do is crash faster than before.  I love my 2x r9 280x's, I built my workstation around these cards. But I just opened a complex scene and it shut down very quickly and politely,

I've ordered a gtx card to put into the mix. I do not like how Nvidia has treated me i the past. But it's better than being slighted in the here and now.

When Nvidia released gellato to everyone it was amazing. Than it was purchased and made into renderman and cost too much for the smaller houses.  This renderer drove many in the industry to purchase cuda cards to use in production.

Has someone tried making Mantle for blender? Has amd attempted to make use of the productive capability of the card rather than the end-user/gamer aspect? If so perhaps this is the avenue we should take rather than abandon this hardware.

Cycles is what we would like to use and it is why we all joined this discussion group. Is there a discussion group for Mantle and blender?  This issue has obviously cost many of us a great deal of time and in some cases business.

Amd must know we are not just using these cards for a hobby.  How can we create great visuals for the xbone or ps4 and utilize the amd graphics without having produced them on amd platforms. Are we to slap an Nvidia logo on the visuals and say "made for amd" in the corner?

Yes, Blender 2.72 crashed quickly with new drivers. Somehow I don't believe the people writing them even know this forum exists or they simply would have tested it before release.

In my case too, as I have the money for the asus gtx 970.

Amd stayed with the party games and more intel that ta is not engaged in gross gpus are improving much more than amd.

So amd "the great disappointment"

Journeyman III

Compile time and ram usage are down with the latest OpenCL 2.0 drivers. Render time virtually the same. A10 5800k + R9 270 here.

Rendering on OpenCL CPU works as well, but on the APU's GPU it crashes while compiling the kernel, same for CPU+270+iGPU render.

On a Richland APU with Ubuntu 14.04 I tried Blender 2.69 and 2.71, it crashes compiling the kernel for the APU's GPU side.

Journeyman III

Any developments on this topic yet?

I think this topic should get high priority within the AMD development. AMD and thus almost all Apple users are unable to use these powerful features in blender!

Thanks for the update!

Grandmaster

The issue is being undertaken at high priority. Currently i have nothing to share publicly. I will ask for the status again. Thanks for your patience.

Journeyman III

Thank you for working on this problem with high priority, was anything changed in the month of working on it?

LuxRender users (at least - speaking for myself) would happily test any new version (of Linux drivers as for me).

Example scenes in LuxRender that reproduces the problem: http://www.luxrender.net/mantis/view.php?id=1407

In case of questions LuxRender forums are very active and all developers are there.

Journeyman III

Any low priority news?

2afir I commented that I did not expect much from amd with cycles took years now waiting at least 2 or more the odd month. Nor expect any information himanshu.gautam never gives you. Always we are the users who have to say that is what was achieved but now the only solution is LuxRender. But eh also investigated some other render engines that did not funcionavan and already have something in mind with amd 3.0 Example Brigade has raised real-tim and walk with amd auque do not know quite how it is that I walk. leave a couple of links to see. I am also interested in asking amd one section specifically for the area 3d render also the games have for a forum that is also multilingual and chat.

Ray Tracey's blog: Le Brigade nouveau est arrivé!

____________

2afir te comento que no esperes mucho de amd con cycles llevamos años espereando al menos 2 o algun que otro mes mas. Tampoco esperes alguna informacion de himanshu.gautam  nunca la dá. Siempre somos nosotros los usuarios que tenemos que decir que es lo que se pudo lograr pero de momentos la unica solucion es Luxrender. Pero tambien eh investigado algunos otros motores de render que antes no funcionavan y ya tienen algo en mente con amd  Ejemplo Brigade 3.0 real tiem ya tiene planteado hacerlo andar con amd auque no se sabe del todo como es que ande.  dejo un par de links para que vean. Tambien estoy interesado en pedir a amd una seccion especificamente para el area del 3d render asi como la tiene para los juegos un foro que sea tambien multilenguaje y chat.

Journeyman III

Any news on this topic?

Simple answer extraymond amd abandoned us like 2 years ago or so. they are a truly stupid question but one could rewrite api mantle blender for better use of cycles or a chance to ride something in 3d render?. no offense amd but this forum is half or completely dead,just us users to whom we speak and we had information we could get amd gives nothing.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

extraymond respuesta simple amd nos abandono hace como 2 años mas o menos .les are una pregunta realmente estupida pero la api mantle se podria rescribir blender para un mejor uso de cycles o alguna oportunidad de hacer andar algo en 3d render?.Sin animos de ofender pero este foro de amd esta medio o completamente muerto, solamente somos nosotros los usuarios al cual hablamos y nos pasamos datos que podriamos obtener amd no da nada.

Journeyman III

HSA could help real time visualization but for renders Opencl is more suitable.

Cycles is working fine using Opencl with Intel and Nvidia hardware (With Nvidia you can use Opencl or Cuda) so there's no need to rewrite Blender code at all.

I'm not sure if amd is trying to fix this or they're just focusing in their new Mantle and HSA technology

HSA should be the Opencl alternative but then you need two things to make it work with blender:

1. New HSA Hardware (So users will have to buy new hardware to use something that should work with Opencl)

2. Blender devs needs to rewrite Cycles to run with HSA not knowing if they're going to hit another bug like this that took amd years to... not solve.

I regret buying an amd card, i was enticed for the good looking benchmarks so i didn't pay attention to possible bugs, that amd posted that are going to be fixed anyway so i never expect to have this bug years later.

I wish amd the best of luck with HSA and mantle and i hope that in the future the bugs will be solved in months not in years (or never), but at the moment i'm really disappointed.

___________________________________

HSA podría ayudar con visualización a tiempo real pero para renders Opencl es mas apropiado.

Cycles esta funcionando bien utilizando Opencl con Intel y NVidia (Con NVidia pudiendo utilizar tanto OpenCL como CUDA) así que no hay ninguna necesidad en reescribir código de blender.

No tengo claro si amd esta intentado arreglar esto o simplemente se están centrando en sus nuevas tecnologías Mantle y HSA.

HSA debería ser la alternativa de Opencl pero para que funcione con blender necesitaras dos cosas:

1. Nuevo hardware compatible con HSA (Así que los usuarios tendrán que comprar hardware nuevo para hacer uso de algo que debería haber funcionado con Opencl en primer lugar)

2. Los desarrolladores de Blender necesitaran reescribir Cycles para que utilizar HSA sin la certeza de terminar en la misma situación con un bug que amd tardara años en .... NO arreglar.

Me arrepiento de haber comprado una gráfica de AMD, me deje llevar por los benchmarks sin hacer demasiado caso a los posibles problemas, que de todas formas amd dijo se iban a solucionar, así que nunca espere que los bugs persistieran años después.

Le deseo la mejor de las suertes a AMD con HSA y MANTLE y espero que en el futuro los bugs se arreglen en cuestión de meses y no años (o nunca), pero de momento estoy muy decepcionado.

himanshu.gautam are a useless. In none of the information for anything I pen but the fixer Vini NVIDIA destruya delighted that my GPU amd really disappointed amd es cierto es only it humo. I am sorry a la gente los fans amd,but I also thought I was a fan of amd and now I feel really defected eh fatal and that I am a designer. I need the pc for graphics and renders no use to me, that a global company solamete amd put me there LuxRender excuse and nothing more. An engine that I have nothing against him but is really slowpidiria whether a refund of the graph. But the worst thing you can do is not to buy more products and discredit amd I think is worse.

_________________________

himanshu.gautam  es un inutil. No da ninguna informacion para nada   me da pena, pero si viniera "the fixer" de nvidia encantado de que destruya mi gpu amd, realmente decepcionado es cierto amd es solamente humo. Lamento a la gente o los fans amd , pero yo tambien pense que era un fan de amd y ahora eh desertado me siento realmente fatal y eso que soy diseñador. Que la pc la necesito para graficos y renders no me sirve, que solamete amd una empresa mundial me ponga de excusa que existe luxrender y nada mas. Un motor que no tengo nada contra el pero es realmente lento eh incompleto, en si pidiria un rembolso de la grafica. Pero lo peor que puedo hacer es no comprar mas productos amd y desprestigiarla que pienso que es peor.

Grandmaster

I am no longer supporting the OpenCL Developer Forums officially. I would request all to refrain from quoting me in messages and sending me personal messages containing Driver bugs. It was a great experience supporting the forums for such a long time.

None of that means I wont be back here . I will be visiting the forums but just like others. I hope the current forum moderators will help me in case i land into

any bugs while developing OpenCL applications

Thanks to everyone.

Good.

Hi There! Cusa,

There has been a rejig in the forum support and some one is going to start supporting all forum activities soon. We (himanshu, bruhaspati and team) are not doing this now.

But, Blender is an issue that is being addressed within AMD. It has to be done at multiple levels. First, they got it compiled and then what we heard is that the performance-issues are being addressed. So, You will have to accept that there is progress. It will take some time before these kind of massive changes come out....

I won't say "Be Patient". Because you guys have been patient for so long....

There is nothing more we can do from our side....But for all we know, AMD is working and they will fix these over time...

Let good luck be with the AMD team,

Best,

Bruhaspati

Journeyman III
 First, they got it compiled

Tolga 9009 23-oct-2013:

So are you saying that you have successfully compiled cycles with all features enabled or just the crippled version?

Yes, At some point of time, Blender was not even compiling. They made it compile...That was a first step.

We had passed on the Tolga's message (of crippled and full-blown version) to AMD long time back.

As a favor, I did pass on your comments to AMD folks through e-mail again today. (i.e only crippled works. full blown is still a problem)

And, This will be the last time I do this...

I believe a new set of people are already working to support this forum.

You can start asking them in future,

Good luck!

Best,

Bruhaspati

Thanks, Bruhaspati.

Yes, I have also passed on the feedback to the relevant folks, and they are working on it. I shall provide an update as soon as it becomes available.

Thanks Himanshu and Bruhaspati, and do continue to contribute your experience and expert insights to this forum.

Yes, the team recognizes the Blender Cycles issue and is working on it.  There has been incremental progress.  I'll post an update as soon as I get one.