# Failed to compile OpenCL kernels, falling back to CPU code

**URL:** <https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371>\
**Category:** Issues\
**Created:** [December 9, 2010, 3:48am UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371 "2010-12-09T03:48:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLADE](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/blade/32/37396_2.png) [@BLADE](https://forums.chaos.com/u/BLADE)\
**Post date:** [December 9, 2010, 3:48am UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/1 "2010-12-09T03:48:20Z")

</div>

Every time I switch to GPU Mode in VRay RT2.0 it last 2-3 minutes to build OpenCL trace program and then crashes with the following error:

**Failed to compile OpenCL kernels, falling back to CPU code**

The scene is simple: 1 box, 2 teapots, daylight, one Vray material

CPU mode runs without problems.

Before I retried I deleted the \*.clbin in %temp% directory with no effect.

GPUs are 1 x GTX285 + 1 x GTX580, Nvidia Driver 263.09  
Windows 7, 64bit, 8 GB RAM, max 2010, hotfix 4

Any tips or hints?

Regards  
BLADE

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [December 9, 2010, 6:36am UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/2 "2010-12-09T06:36:02Z")

</div>

Does it work with older drivers? The latest ones we tested are 260.99; will try the 263 driver a bit later today.

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![BLADE](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/blade/32/37396_2.png) [@BLADE](https://forums.chaos.com/u/BLADE)\
**Post date:** [December 9, 2010, 11:26am UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/3 "2010-12-09T11:26:27Z")

</div>

So, I reinstalled Nvidia driver 262.99 (there was no 260.99 available) and have the same error.

**Error CL\_INVALID\_BINARY (-42) at line 1013 , in file ./src/opencl\_main.app !!!**  
Failed to compile OpenCL kernels, falling back to CPU code

What else can I do?

Regards  
BLADE

edit: I have tried max2011 64 bit + 32 bit and received the same error.

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [December 9, 2010, 11:39am UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/4 "2010-12-09T11:39:32Z")

</div>

Can you try deleting the \*.clbin file in the temporary folder (type %temp% in Windows explorer to go there) and also disabling the 285 card? If that works, try enabling the 285 card again.

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![BLADE](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/blade/32/37396_2.png) [@BLADE](https://forums.chaos.com/u/BLADE)\
**Post date:** [December 9, 2010, 12:57pm UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/5 "2010-12-09T12:57:09Z")

</div>

Vlado, I did what you told me. With only the GTX580 it is working. In combination with the GTX285 it crashes.

I thought, VrayRT can use ANY OpenCL which is available?

BTW, iRay is running like charme with absolute no problems in this configuration (GTX580 + GTX285). I just did another test.

So 2 more questions arise:

I was planing to buy a second GTX580 to replace the GTX285. Will this configuration run? I really need 2 graficboards because I am running a 3 screen configuration with 2 x 21" monitors (connected now to the GTX285) and a 30" monitor in the middle (connected now to the GTX580).

In the next step, I was hoping to upgrade my renderslaves with cheap GTX460 2GB RAM for distributed rendering on GPUs. Is there ANY chance that something like this will run without problems?

Thanks for helping.

Regards  
BLADE

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [December 9, 2010, 1:04pm UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/6 "2010-12-09T13:04:14Z")

</div>

> [@BLADE](#):
>
> I thought, VrayRT can use ANY OpenCL which is available?

Yes, it will do that; however in your case the cards are too different. V-Ray RT attempts to load the GPU code from the 580 card on the 295 card (the reason for this is to reduce the start up time), which fails. It can be made to work, of course, and we will look into it. There are no problems if the cards are identical, or of the same architecture (e.g. when both of them are Fermi cards).

> BTW, iRay is running like charme with absolute no problems in this configuration (GTX580 + GTX285). I just did another test.iRay does not use OpenCL, so no point to mention it.

> I was planing to buy a second GTX580 to replace the GTX285. Will this configuration run?Yep, it will be fine.

> In the next step, I was hoping to upgrade my renderslaves with cheap GTX460 2GB RAM for distributed rendering on GPUs. Is there ANY chance that something like this will run without problems?It will run fine, yes.

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![BLADE](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/blade/32/37396_2.png) [@BLADE](https://forums.chaos.com/u/BLADE)\
**Post date:** [December 9, 2010, 1:56pm UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/7 "2010-12-09T13:56:44Z")

</div>

Ok then, I just ordered a second GTX580 as a replacement for the GTX285. It will be delivered in 3-4 days.  
I will give a statement in these thread after installation and testing then.

Thanks Vlado, for your support.

Regards  
BLADE

---

<div class="post-metadata">

**Author:** ![BLADE](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/blade/32/37396_2.png) [@BLADE](https://forums.chaos.com/u/BLADE)\
**Post date:** [December 13, 2010, 3:03pm UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/8 "2010-12-13T15:03:46Z")

</div>

Problem solved with a second GTX580 as replacement

Just want to say, that the problem is solved. Today I received my second GTX580. After replacing the GTX285 with it, everything worked. And its fast. Real FAST! 😁

Regards  
BLADE

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [December 13, 2010, 3:05pm UTC](https://forums.chaos.com/t/failed-to-compile-opencl-kernels-falling-back-to-cpu-code/26371/9 "2010-12-13T15:05:47Z")

</div>

Very well then 🙂

Best regards,  
Vlado
