-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metal not found #36
Comments
I wonder if you were doing a command line build with SwiftPM? See the note here: That is exactly what I would expect to see -- it never built the metallib. You can still do command line builds but you need to use xcodebuild. |
Correct I am just running this through command line, updating xcode right now and will run build and try again, do I need to run xcodebuild everytime? |
Bare SwiftPM doesn't have a way to build the shaders -- you have to build it through xcodebuild (or CMake) |
Is there docs in building using command line tools? Only see cmake build commands in the docs |
I can add a note about how to use xcodebuild. This line from the circleci config is what you want: https://github.com/ml-explore/mlx-swift/blob/main/.circleci/config.yml#L37
That just builds everything. You could use |
https://github.com/ml-explore/mlx-swift?tab=readme-ov-file#xcodebuild shows the xcodebuild command. |
@davidkoski I am seeing something exactly like this but when building in XCode...
Do you have any idea why this might be happening? I also get a |
It has to be something about how it is built or how it links. You can try building some of the applications from https://github.com/ml-explore/mlx-swift-examples to compare. You can look at your own build outputs (you will need to adjust the path of course) -- it should look something like this:
The
All of that should happen automatically, but compare your build to one of the applications in the example code. |
From the error message perhaps it doesn't have the |
You're right, when I navigate to I'm somewhat new to iOS development...how do I make sure this |
Yes, those are "libraries" rather than "frameworks" -- they implicitly donate their resources to a framework or application. If your application links these then I would expect it to include their resources. |
Both these issues were resolved by setting "Build Libraries for Distribution" to "No" in the framework - thanks for the help @davidkoski !! |
Awesome, glad to hear it. I think the original issue (missing docs) and this follow-on are resolved. We can open new issues as needed. |
When installing through SwiftPM and trying to run I get the following error
The text was updated successfully, but these errors were encountered: