[infra] Runtime Metal shader compilation when metallib unavailable (#60) #61
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/60-runtime-metal-compilation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Unblocks building on systems without the Metal Developer Tools (
metallibcompiler).Problem
xcrun metallibnot available on fresh Xcode installszig buildcreates empty.metallib→LibraryLoadFailedat runtimeSolution
sleepy_mtl_compile_library()to compile.metalsources at runtime usingMTLDevice.newLibraryWithSource()PipelineCacheto fall back to runtime compilation when.metallibis empty/invalidshim.mfor ARC compatibility (removed manualrelease, addedvoid*casts)Test Results
zig build --release=fastcompiles successfully./zig-out/bin/sleepy-llm generateruns withoutLibraryLoadFailedTrade-offs
Future Work
.metallib(faster startup)Closes #60
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.