Ask Your Question
0

OpenCV 3.0 - T-API (transparant OpenCL acceleration) CPU-thread-safe ??

asked 2015-07-10 09:49:41 -0600

Hannes gravatar image

In OpenCV 3.0 (http://opencv.org/opencv-3-0.html), there is the so-called T-API introducted, where functions are accelerated, transparently for the user, on the GPU with OpenCL.

I just wonder whether that is safe, when i have several CPU threads, each calling a OpenCV function which under the hood is accelerated with OpenCL ?

So, in short, are the 'accelerated' OpenCV functions STILL CPU-THREAD-SAFE ? Are the OpenCV functions tested in a test suite with respect to CPU-thread-safety ?

I have my doubts, because e.g. for NVIDIA NPP functions i conservatively assume that they are NOT CPU-thread safe, because i cannot know whether they internall use stuff like constant memory, texture references which per se are not cpu-trhead-safe. Regarding NPP and thread-safety, see e.g. https://devtalk.nvidia.com/default/to...

Maybe someone can provide more information, or a better guess.

As in our application stability goes over performance, if there are any doubts we would have to disable the T-API when building OpenCV 3.0 for us.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
-2

answered 2015-07-22 03:38:48 -0600

Hannes gravatar image

OK i see.

There are being made massive changes under the hood, and it seems that nobody from the OpenCV team knows whether that might lead to a disaster or not, or even thought about that ...

Not very professional.

Nowadays, code _has_ to be thread-safe, everything else i won't touch.

As a conclusion for me, I won't touch the T-API, I will disable it. I don't care how cool it is, if it potentially brings disaster in my application.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-10 09:49:41 -0600

Seen: 570 times

Last updated: Jul 22 '15