Skip to content

Add Accelerate/BLAS when using Swift #765

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 5, 2023

Conversation

a10y
Copy link
Contributor

@a10y a10y commented Apr 4, 2023

Hey!

This repo and the community are amazing, props to the maintainers :)

I am playing around with the added Swift bindings for Mac/iOS and I noticed that BLAS didn't appear to be enabled at runtime with the default Package.swift file even when I explicitly added the Accelerate framework on my target, looks like b/c some preprocessor directives weren't make their way to ggml.

Before:

Screenshot 2023-04-04 at 3 55 59 PM

After:

Screenshot 2023-04-04 at 3 55 29 PM

@a10y a10y changed the title Add Accelerate framework dependency from Swift in this test. Add Accelerate/BLAS when using Swift Apr 4, 2023
@a10y
Copy link
Contributor Author

a10y commented Apr 4, 2023

@j-f1 as the original author of the Package file curious for your thoughts :)

Copy link
Collaborator

@j-f1 j-f1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t have an Intel Mac to test on but this seems fine to me! One small suggestion:

Co-authored-by: Jed Fox <git@jedfox.com>
@a10y
Copy link
Contributor Author

a10y commented Apr 5, 2023

Done! Confirmed test passes with the change

Copy link
Collaborator

@j-f1 j-f1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for contributing!

@j-f1 j-f1 merged commit 58c438c into ggml-org:master Apr 5, 2023
@a10y a10y deleted the aduffy/package-swift-accelerate branch April 5, 2023 11:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants