hughperkins / cltorch

An OpenCL backend for torch.
Other
291 stars 26 forks source link

Use OpenCL with POCL? #75

Closed genixpro closed 8 years ago

genixpro commented 8 years ago

screenshot from 2016-06-11 12 06 31 Hello,

I'm trying to use OpenCL on a computer that does not have a dedicated GPU. I installed two OpenCL drivers that might work, one is Beignet which runs on the "Intel HD Graphics" GPUs build into my desktop processor, the other is called POCL, which is just an implementation of OpenCL for your CPU.

CLTorch seems to work great with Beignet. However, Beignet seems to have a bug where it causes the graphics, specifically fonts, to become corrupted while its running. See screenshot. This is not a bug of CLTorch.

So I then figured that I should just run it on the regular CPU. So I try to run cltorch on the POCL driver, but it just doesn't seem to take. No matter what I do, it doesn't seem to detect POCL - it just goes to the Intel Beignet driver - even though other tools, like clinfo, list POCL as an available OpenCL driver. I can even uninstall Beignet, and then clinfo tells me that I only have one OpenCL device. But when I run cltorch in this way, it tells me that there are no OpenCL devices available!

Is it possible that the POCL driver doesn't have everything implemented, and so CLTorch is just ruling it out because of the absence of some feature?

hughperkins commented 8 years ago

beignet does have this bug. on 5500 right? I gave up using it for ages, but I grabbed latest version the other day, and it seems to work ok. I tried the version 8dfec54e2f3e , from git, 28th April 2016. Perhaps you can give that a shot?

As far as POCL, sounds like it runs a CPU, not as a GPU? This wont work very well, since not enough threads. You're welcome to try, but it's unlikely to do anything useful. You'll have to call:

cltorch.setAllowNonGpus(1)

... and then enjoy the uselessness :-P

beignet works ok now, if you try that git version above. At least: I reckon it's worth trying, especially if youre using an hd5500.

genixpro commented 8 years ago

Ahh thats how you to do it. I know that its not going to be very efficient, I just wanted to know if it was possible. Your suggestion is greatly appreciatted, I will try that version of Beginet.

Thanks Hugh you are very helpful