Open waicool20 opened 1 year ago
Ok in this application I am loading other native libraries(DJL with Pytorch engine) first, and seems like if i load opencv first it will not hang. This seems fine but it means I won't be able to lazy load opencv presets.
Do you have any idea why it would hang if I loaded other native libs first?
As far as I know DJL still relies on the builds from LibTorch (@frankfliu?) and if that's still the case, then those binaries are linked statically with MKL, which might prevent other libraries such as OpenCV from using BLAS. Please use another build of PyTorch such as the ones from the presets: https://github.com/bytedeco/javacpp-presets/tree/master/pytorch Those ones will work fine with OpenCV.
Ok, well it seems the application works fine as long as I load OpenCV first before loading DJL, so I will use this workaround for Windows systems for now.
I'm having trouble loading opencv on windows, I have tested the same code on linux and it doesn't hang there. I am loading with the two lines below:
This is the log and it gets stuck at openblas dll