open cl confusion
Hello, i have written a small program which evaluates a model (res10_300x300_ssd_iter_140000_fp16.caffemodel). This is working fine. I want to compare opencl with cpu only model
I set setPreferableTarget(DNN_TARGET_CPU);
to force cpu usage.
In Logs
[ INFO:0] Initialize OpenCL runtime...
The measured time still the same(42ms). Well to make very sure - i decided to recompile without open cl
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DWITH_OPENCL=OFF -DBUILD_DOCS=ON -DBUILD_EXAMPLES=ON ../opencv-3.4.1-src
and after that
make -j7
In Logs
[ INFO:0] Initialize OpenCL runtime...
Still - the measured time still the same(42ms) and i got the open cl log. Did it run on cpu or gpu? Does gpu acceleration has no influence for this model? Did i failed to reinstall successfully or does open cv always uses open cl? Very confused.
adding
sudo make install
to actually install it.So i compiled and installed open cv without open cl The times measured are still the same.
Strangely this code from above gives me no exception. I guess its "preferable" So to come to a conclusion.This model is unsuitable for gpu / cpu comparison. I will try on another model, but i still have the impression open cl for dnn has no effect and if you have big model you need cuda for dnn evaluation(not supported by open cv - but there are other ways to play around) Will post results here.