-
Notifications
You must be signed in to change notification settings - Fork 30
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
Difficulty integrating via SPM without poor or decreased performance #1
Comments
Should be fixed now: 0e52adc |
@ggerganov thanks so much for the quick reply! Unfortunately, as mentioned above I am not sure that this solution will work. I think it will make your package invalid entirely, per Apple's documentation here: https://developer.apple.com/documentation/packagedescription/csetting/unsafeflags(_:_:)
That said, while this didn't work for me on Friday, I'll still give this another try to be sure! |
Well, it does work with
|
The warnings should be resolved now. Regarding the incompatibility with other packages:
Not sure if this is a problem for now. |
I was just coming back here to confirm it's working just fine, and our deployments are find and everything is great. Just another false alarm from the Apple documentation? Thanks for all of your help! I think this issue can be closed. 😄 |
We have an Xcode project and Swift package. Currently,
whisper.cpp
is implemented directly into the Xcode project, but we are trying to abstract this into our Swift package viawhisper.spm
. However, we're noticing thatwhisper.spm
is about 40x slower indebug
configuration than inrelease
. We can verify on this repo by runningswift run test-swift -c debug
andswift run test-swift -c release
.The difference in speed is absolutely understandable between configurations, but unfortunately, SPM does not allow us to override the default compilation mode for an individual module. Adding something like
cSettings: [.unsafeFlags["-O3"]]
to the package definition makes no impact on third-party dependencies. Similarly, from the Xcode project, we don't seem to have the option for explicit, configuration-based overrides to our dependencies.The use case here is that we want
whisper
to run in theRelease
configuration 99% of the time.Do you have any ideas on how
whisper.spm
could support this such that we don't have to pursue some option like a wrapper project or pre-compiling the library?Thanks in advance for your help, and for your support with
whisper
!Sample Outputs
Debug
swift test -c debug
Release
swift test -c release
And just to clarify: When running in
Release
configuration, I'm noticing NO performance issues. I repeated a number of performance tests onwhisper.cpp
incorporated directly andwhisper.spm
via SPM, and when inRelease
configuration, they line up 1:1 over thejfk.wav
sample perfectly.The text was updated successfully, but these errors were encountered: