# amd APP for opencl on cpu?

**URL:** <https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255>\
**Category:** General\
**Created:** [June 18, 2015, 12:54pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255 "2015-06-18T12:54:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 12:54pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/1 "2015-06-18T12:54:47Z")

</div>

ok i downloaded the amd APP sdk v2.9 to try to test cpu based opencl. but i suspect either ive downloaded the wrong thing, or im missing a step.

on my renderbox with no gpu i get error 1001 (iirc) when i try to “select opencl devices”

on my main machine (with a gpu obvs.) i can open the selection dialogue, but i only see my gpu listed.

what am i missing?

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 12:56pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/2 "2015-06-18T12:56:45Z")

</div>

can i use this instead ?

OpenCL™ Runtime 14.2 for Intel® CPU and Intel® Xeon Phi™ coprocessors for Windows\* (64-bit)

> **[OpenCL™ Runtimes for Intel® Processors](https://www.intel.com/content/www/us/en/developer/articles/tool/opencl-drivers.html)**
>
> Obtain runtimes to execute or develop OpenCL™ applications on Intel­® processors.

---

<div class="post-metadata">

**Author:** ![savage309](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/savage309/32/40144_2.png) [@savage309](https://forums.chaos.com/u/savage309)\
**Post date:** [June 18, 2015, 1:17pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/3 "2015-06-18T13:17:39Z")

</div>

Both of them should work.  
If you don’t see the CPU device after installing the runtime (AMD or Intel), most likely you have to restart the machine.

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 1:26pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/4 "2015-06-18T13:26:58Z")

</div>

i restarted both after installing the amd one, no result.

i uninstalled it and tried the intel one.. works fine.

thanks! Robin.

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 1:45pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/5 "2015-06-18T13:45:00Z")

</div>

ok so my first test, using both gpu and cpu in first machine, and only cpu in second machine (using dr)…

i have an error on the second machine (first one is compiling trace program for gpu, will be a while!)

second machine (one with no gpu) says:

error:clcreatecontext() failed for device 0 (-6)!  
warning: initdevices()failed

is this just because its stuck waiting for the master machine to start rendering, or an issue that needs fixing?

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 1:49pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/6 "2015-06-18T13:49:58Z")

</div>

ok so the building of the trace program failed on the main machine now:

ptxas fatal :memory allocation failure  
error invalid binary (-42) at line 1514 , in file ./src/opencl\_main.cpp !!!  
warning:failed to compile opencl kernels,falling back to cpu mode.  
error:buildprogram() failed for device 0 (-42)!  
warning: initdevices() failed.

so thats both machines..

all fun eh?

im using vray 3.25 (build from vlado that fixed another RT issue i was having)

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 1:55pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/7 "2015-06-18T13:55:23Z")

</div>

i now tried disabling the gpu and using only the cpu using the “select opencl devices” tool

i disabled the gpu, but when i render RT states “found 2 opencl devices” and "using geforce 670 gtx for rendering " or something similar.. then starts building the trace program again.

in fact i noticed that wahtever i set in the “select opencl devices” dialogue, it only ever says "found 2 devices, using 1 device (gpu) "

---

<div class="post-metadata">

**Author:** ![savage309](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/savage309/32/40144_2.png) [@savage309](https://forums.chaos.com/u/savage309)\
**Post date:** [June 18, 2015, 1:55pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/8 "2015-06-18T13:55:55Z")

</div>

This error is reported from the nVidia OpenCL, I guess ?  
If so, try with driver 353.06 or 347.88.  
We’ve tried to explain what is expected to work here [Chaos Docs](http://docs.chaosgroup.com/display/VRAY3/GPU+Rendering).

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 2:01pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/9 "2015-06-18T14:01:33Z")

</div>

well it appears i have errors from both the cpus and the gpu, since as mentioned in the fifth post, the machine without a gpu (hence no nvidia driver) still errors out too.

plus the device selector isnt working.

i did install vray 3.25 to fix a crashing display driver when using rt cuda. it seemed to fix all my driver related problems. obviously not for opencl. ill try to roll back to an earlier geforce driver.

---

<div class="post-metadata">

**Author:** ![savage309](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/savage309/32/40144_2.png) [@savage309](https://forums.chaos.com/u/savage309)\
**Post date:** [June 18, 2015, 2:15pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/10 "2015-06-18T14:15:05Z")

</div>

There might be a chance that the custom build you have has working CUDA, but not-working OpenCL.

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 2:21pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/11 "2015-06-18T14:21:47Z")

</div>

ok i shall also download the official build.. cheers!

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 3:09pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/12 "2015-06-18T15:09:56Z")

</div>

ok so quick update, after restarting my main machine again, opencl on cpu is working fine (using intel runtime)

so seems my build of vray has working opencl to some extent.

However, the second machine (via DR) which is identical spec to the first, with the same intel runtime installed, but without a gpu, still gives the following error:

error:clcreatecontext() failed for device 0 (-6)!  
warning: initdevices()failed

the device (cpu) is detected properly in the “select devices” dialogue, and also shows up in the rt render server before the error.

only difference is lack of a gpu in that machine.. could that affect it? ive noticed there are actually some old nvidia drivers on there (331.something) since i sometimes plug in an old gpu to do bios stuff. normally i just leave it headless and remote into it.

---

<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:** [June 18, 2015, 3:12pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/13 "2015-06-18T15:12:49Z")

</div>

Are you running the DR spawner as a service? What if you run it manually?

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 3:13pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/14 "2015-06-18T15:13:36Z")

</div>

im running it manually…

---

<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:** [June 18, 2015, 3:15pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/15 "2015-06-18T15:15:48Z")

</div>

Then try updating the nVidia drivers to a newer version - they should support OpenCL and CUDA through remote desktop too; maybe the two OpenCL implementations are connected somehow. Or else, plug a monitor and run the spawner from an actual service.

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 3:20pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/16 "2015-06-18T15:20:04Z")

</div>

thanks vlado, ill try that, but i dont understand what remote desktop has to do with it? i get the same issue if remote desktop isnt connected.. i just use that to see how the other machine is doing.

---

<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:** [June 18, 2015, 3:21pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/17 "2015-06-18T15:21:48Z")

</div>

> [@super\_gnu](#):
>
> thanks vlado, ill try that, but i dont understand what remote desktop has to do with it? i get the same issue if remote desktop isnt connected.. i just use that to see how the other machine is doing.

It used to be that OpenCL and CUDA did not work through remote desktop (don’t ask me why, I didn’t write the drivers). Most drivers now support this, but your nVidia drivers are too old. Because the OpenCL implementations are chained, it may be that the nVidia OpenCL implementation doesn’t want to run through remote desktop and it is preventing the Intel driver from running too.

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 18, 2015, 3:34pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/18 "2015-06-18T15:34:59Z")

</div>

ok thanks for the explanation. i still dont get how im doing rt “through” remote desktop, since it communicates directly with my main system via the network, and im just using RD to see the screen there..

however i will accept this is likely down to teminology or lack of knowledge on my part, and update my damn drivers!

another alternative would be to remove the display drivers all together, but maybe that would cause more issues.

cheers, Robin.

---

<div class="post-metadata">

**Author:** ![chriserskine](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@chriserskine](https://forums.chaos.com/u/chriserskine)\
**Post date:** [June 19, 2015, 12:52am UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/19 "2015-06-19T00:52:44Z")

</div>

higher end quadros will work over standard remote desktop. I’m finding k4000 work fine, but k2200 don’t.

but you can get around this by using team viewer which will let any of them work.

---

<div class="post-metadata">

**Author:** ![super\_gnu](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@super\_gnu](https://forums.chaos.com/u/super_gnu)\
**Post date:** [June 19, 2015, 2:05pm UTC](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255/20 "2015-06-19T14:05:28Z")

</div>

ok so im having a crappy time trying to get opencl working. ( i know i know, use cuda… but i want to test cpu/gpu togehter as i have an underpowered gpu)

first i tried upgrading to the 353.06 nvidia driver.. still get the error:

ptxas fatal :memory allocation failure  
error invalid binary (-42) at line 1514 , in file ./src/opencl\_main.cpp !!!  
warning:failed to compile opencl kernels,falling back to cpu mode.  
error:buildprogram() failed for device 0 (-42)!  
warning: initdevices() failed.

so then i tried doing the ptx optimisation environment variable as suggested

no change.. in fact maybe coincidence, but i got the same errors, plus maxed out my 32gb ram.

so i downgraded to driver 347.88

now it crashes even quicker!

this error is:

error program build failure (-11) at line 1514, in file .src/opencl\_main.cpp !!!

error:buildprogram()failed for device 0 (-11)!

only thing left to try is a different build of vray.. maybe the official build is different in this regard than 3.25.01?

[Next page](https://forums.chaos.com/t/amd-app-for-opencl-on-cpu/54255.md?page=2)
