This is a weird XCode 13 beta bug (including beta 5). Metal Core Image kernels fail to load from the library giving error
2021-08-26 12:05:23.806226+0400 MetalFilter[23183:1751438] [api] +[CIKernel kernelWithFunctionName:fromMetalLibraryData:options:error:] Cannot initialize kernel with given library data.
[ERROR] Failed to create CIColorKernel: Error Domain=CIKernel Code=6 "(null)" UserInfo={CINonLocalizedDescriptionKey=Cannot initialize kernel with given library data.}
But there is no such error with XCode 12.5. The kernel loads fine. Only on XCode 13 beta there is an error.