Compiling CI kernels at runtime

In the "Explore Core Image kernel improvements" session, David mentioned that it is now possible to compile [[stitchable]] CI kernels at runtime. However, I fail to get it working.

The kernel requires the #import of <CoreImage/CoreImage.h> and linking against the CoreImage Metal library. But I don't know how to link against the library when compiling my kernel at runtime. Also, according to the Metal Best Practices Guide, "the #include directive is not supported at runtime for user files."

Any guidance on how the runtime compilation works is much appreciated! 🙂

Thank you for mentioning Frank!

This looks like a bug and we’ve been able to reproduce it now as well. Good catch.

We're looking into it, and there is no need to create any additional bug reports.

The presentation talks about using #include <CoreImage/CoreImage.h> - please use #include instead of #import.

I'm sorry, I meant #include. I'm still getting fatal error: 'CoreImage/CoreImage.h' file not found when calling device.makeLibrary(source: ...).

Compiling CI kernels at runtime
 
 
Q