Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Initialize OpenCL Runtime

Hi everyone

I am making a web app which uses some OpenCV functions on the backend. The first time I use the forward method of cv2.dnn it takes a bit of time. I also get this message: [ INFO:0] Initialize OpenCL runtime

Right now, I just have a background thread to load a model and forward an image. This way when an image actually needs to be forwarded through some dnn model, I will have already initialized the OpenCL runtime. Then the delay will not be experienced on the user thread

Is there a better way to handle this? Is there a way to directly initialize OpenCL runtime without loading a model and an image? Thanks!