LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Vision and Graphics Card/ Hardware Acceleration

Hi All,

 

I'm looking for an easy way to offload some processing to my graphics card because my CPU is getting overloaded with repeated simple operations.  I wanted to know if I could do it without getting into DirectX or OpenGL myself.

 

My question is, Do the image processing operations in the NI Vision module take advantage of hardware acceleration or are they all done in software on the CPU?

 

I found this thread which seems to indicate that LabView does not use graphics hardware acceleration, but it does not speak to the NI Vision VI's.

 

Thanks,

Greg

0 Kudos
Message 1 of 16
(5,769 Views)

Hi, Greg,

 

In the thread which you have found nothing related to NI VIsion.

In general behind of NI Vision is just few windows DLLs. They was partially optimized in Vision 8.6 for MultiCore processing (only some functions).

Refer to NI Vision 8.6 Development Module Readme.

I have compared several functions, and got following results:

 

So, if you needed faster processing, there are different possibilities, how to do this:

1. Use other high performance Library, for example, Intel Integrated Performance Primitives

2. Develop your own DLL for simple operations (compile it with Intel Compiler).

3. Use GPU (in this case I will suggest to try NVidia CUDA, but there are no "ready for use" solution. You should found how to prepare DLL with CUDA compiler, then call it from LabVIEW. I tried this, it works in general).

 

Andrey.

0 Kudos
Message 2 of 16
(5,763 Views)

Item #3 is interesting:

             

3. Use GPU (in this case I will suggest to try NVidia CUDA, but there are no "ready for use" solution. You should found how to prepare DLL with CUDA compiler, then call it from LabVIEW. I tried this, it works in general).

 

 I was looking to attempt something similar, ie, using a GPU to offload the host machine CPU. When you developed the DLL, how did you indicate to the compiler what ran on the CPU and what ran on the GPU? Does LV recognize the DLL? If so, did it execute as seamless as nVidia claims? Thanks for you attention...

0 Kudos
Message 3 of 16
(5,624 Views)

Lebecker,

 

We did end up implementing this solution, though I did not do it personally, so I do not know all the details.  We created DLLs in C that interface with the NVidia CUDA calls.  Then called those DLLs in labview.  That way, just individual operations encapsulated in the DLLs were passed to the GPU.  I'm not sure how seemless NVidia clamis, but it did work without a problem, and we got the performance boost we were looking for.

0 Kudos
Message 4 of 16
(5,622 Views)

Hi everyone,

 

I do not believe there is any built-in functionality in LV or the NI VIs to offload processing to the GPU. The best bet is the CUDA path.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 5 of 16
(5,604 Views)

Well, now that OpenCL is an official standard, maybe it's something which could be supported natively in future versions of LabVIEW.

 

If NI is serious about continuing to exploit the inherently parallel nature of LV, this would seem to be a logical progession to me.

 

Shane.

0 Kudos
Message 6 of 16
(5,586 Views)
If you have good suggestions like these, I highly recommend submitting them to the product feedback page. The R and D guys take the suggestions very seriously.
Jeff | LabVIEW Software Engineer
0 Kudos
Message 7 of 16
(5,563 Views)

Done.

 

I would have thought that the R&D guys would already be aware of something like this but just in case......

 

Shane.

0 Kudos
Message 8 of 16
(5,555 Views)
I'm not a developer, but they probably are. Like anything in development, they have to decide what feature to do next. A lot of customer requests for something will help motivate the decision :).
Jeff | LabVIEW Software Engineer
0 Kudos
Message 9 of 16
(5,535 Views)

Nvidia has released OpenCL drivers for their graphics cards.

 

http://www.tomshardware.com/news/Nvidia-Cuda-OpenCL-SDK,7596.html

 

Shane.

0 Kudos
Message 10 of 16
(5,358 Views)