Posts

Post not yet marked as solved
1 Replies
181 Views
Is it possible to set the header include paths when compiling a metal library from source at runtime? I'm dynamically generating kernel source that I'm compiling at runtime. I want to include some functions I have defined in a header. If I was doing online computation, I can specify include paths using -I /path/to/include using the command. xcrun metal -c -I /path/to/include example.metal -o example.air However when I'm online, it doesn't appear possible to define a header search path. MTLCompileOptions *options = [MTLCompileOptions new]; options.fastMathEnabled = NO; library = [device newLibraryWithSource:kernel_source options:options error:&error]; Is there a way to specify a header search path using newLibraryWithSource?
Posted
by Cianciosa.
Last updated
.