Native Kernels

I’m finding limited information about the internals of native kernels. Specifically:

How do they work? Are native kernels compiled along with the host code? Or are they JIT compiled just like a normal kernel?

This post points out that linking against external libraries isn’t possible within a normal kernel (which is understandable) - I wouldn’t think the same would be true for native kernels? I ask, because I’m running into issues with making OpenCV API calls inside native kernels.

I know there are issues with thread safety when using event callbacks, but does the same apply for native kernels?

Again, my main issue is making OpenCV API calls inside native kernels. Just as a proof of concept, I’ve written a small program with two native kernels - one that grabs a webcam frame and another that waits for the first native kernel to finish and then displays the result (cv::imshow for those of you who use OpenCV). The second kernel seems to be the issue.

Thanks in advance!