OpenCL without a GPU

Red Prince wrote on 12/20/2011, 3:11 PM
While OpenCL is typically implemented using a GPU, CPU versions also exist. For example, you can download and install the OpenCL SDK for Intel processors, which lets you use OpenCL on the Intel CPU. Similarly, the AMD OpenCL SDK supports OpenCL on the CPU, even if you don’t have an AMD GPU installed.

The problem is that by default Vegas 11 will not display CPU OpenCL devices in its preferences. As I have just discovered, however, you can convince Vegas to let you use the CPU versions of OpenCL (assuming, of course, that you have it, or them, installed on your computer). Normally you would only do that if you do not have a GPU (or you have an old one without the OpenCL support), though you could use it even if you do have a GPU but for some reason prefer to use the CPU version of OpenCL. This is what I did:

Click Preferences while holding the Shift key. Then select the Internal tab. Scroll all the way down. Change the value of OpenCL Device Filter from 4 (the default) to 6. Click Apply and OK and quit Vegas.

Restart Vegas and go to Preferences (no need to hold the shift key this time). Select the Video tab, and voilà, the Intel CPU is listed under the choices for GPU acceleration of video processing. You can select it, and click Apply and OK. Vegas will tell you you need to restart (Vegas, not the OS) for it to take effect.

So, restart Vegas again. Vegas will now run its OpenCL code using your Intel processor instead of your GPU. It only allows you to use one “GPU” (as it refers to all OpenCL devices) at a time, so you cannot use both the GPU and the CPU at the same time.

But if your Vegas is crashing when using your GPU (as some of you have reported), this may be just what the doctor ordered. Naturally, it will not be as fast as using an actual GPU but you will still get the advantage of OpenCL.

I have tested both versions (the one by Intel and the one by AMD) on my system, and it worked. I did it out of curiosity only since I have an NVIDIA card with OpenCL and Vegas does not crash on me, so I have no reason not to use my GPU. Naturally, I cannot guarantee it will work for you. And of course, Sony does not want you to meddle in its Internal settings and may smite you if dare to. But if this is something you may want or need, by all means, go ahead and see if it works for you.

Adam

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Comments

farss wrote on 12/20/2011, 3:42 PM
What I can see being useful is using a second GPU for OpenCL acceleration.

Bob.
Red Prince wrote on 12/20/2011, 4:07 PM
Yes, that would be nice. That would allow us to use both, the GPU(s) and the CPU, at the same time for the highest speed. But as of now, Vegas only allows one OpenCL device to be used.

And for computers without a compatible GPU, the CPU option is nice. My desktop has a GPU, but my laptop (Sony Vaio) has an AMD video card which does not support OpenCL, which is why I was looking for a way to use the CPU OpenCL and have finally found it.

Another thing I’d like to see is for Sony to make the choice of which device is in the preferences available to third party plug-ins, so they could be consistent with our choices. Presumably Vegas is passing that information onto Sony’s own plug-ins. If so, they should publish the respective information in their SDK for third party developers.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

farss wrote on 12/20/2011, 7:49 PM
"Vegas only allows one OpenCL device to be used."

I don't want to use two devices. My thought is that the primary GPU is also being used to feed video to the monitor. It might be better if we were using another GPU that was doing nothing else or even one of the purpose built GPU number crunching boards.
Bob.
GJeffrey wrote on 12/20/2011, 9:08 PM
@ Redprince,

I have tested openCL with CPU on my laptop which doesn't have a compatible GPU.
I can now select openCL for video processing but the sonyAVC and sonyMXF both disappear from the render tab.
When rendering MC AVC, openCL is recognizes but it fails at the beginning of the rendering ("undetermined error").
I also made 2 tests using a 10s 1080-60i AVCHD + sony gaussian blur FX (medium setting) rendered to MC AVC 720p (using CPU only mode to avoid error):
1- Video processing on: 3min57s.
2- Video processing off: 46s.
On my computer, it seems useless to use Intel OpenCL. How about Yours?
TheHappyFriar wrote on 12/20/2011, 10:45 PM
I don't want to use two devices. My thought is that the primary GPU is also being used to feed video to the monitor. It might be better if we were using another GPU that was doing nothing else or even one of the purpose built GPU number crunching boards.

Basically, the OpenCL part is just the 3D part of your GPU being used. It can still put 2D stuff out and that won't effect anything. It would be like saying you want a new audio card because one is recording and playing back, that effects recording performance.

I use OpenGL apps in a window with Vegas editing/previewing video and they don't effect each other (except the RAM usage). They're using two different sets of resources on the GPU. The issue I see happening is that Windows Vista & 7 use the GPU for displaying graphical "wow" stuff. That could slow down OpenCL efficiency some what.

Doesn't OpenCL support multiple GPU's linked together as one?
Red Prince wrote on 12/21/2011, 12:45 AM
Doesn't OpenCL support multiple GPU's linked together as one?

OpenCL is simply a language. A vendor specific implementation may or may not support multiple GPUs as one. That would be entirely dependent on the respective drivers.

Applications may use as many devices as are available but they have to divide the load up among the different devices on their own. Vegas does not do that (in all fairness most applications do not), it only lets you choose what device you want to use if you have more than one GPU or, if changing your preferences as described in the OP, between one of your GPUs and the CPU. But it only lets you choose one such device at any given time.

I don't want to use two devices. My thought is that the primary GPU is also being used to feed video to the monitor. It might be better if we were using another GPU that was doing nothing else or even one of the purpose built GPU number crunching boards.

You can do that since Vegas lets you pick which GPU to use. Though feeding video to the monitor and doing number crunching are independent of each other and should not be interfering with each other.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)