ggerganov / whisper.spm

whisper.cpp package for the Swift Package Manager
MIT License
168 stars 27 forks source link

Enable metal #18

Closed ibash closed 11 months ago

ibash commented 12 months ago

This enables using metal by adding an additional target for ggml-metal and then optionally including it in the build.

I also changed ifdef SWIFT_PACKAGE to ifdef SWIFTPM_MODULE_BUNDLE since I had the former variable set and not the latter (not sure why).

This works on my machine, but I'm not a rapper, so please let me know if I made a mistake.

ibash commented 12 months ago

Similar to https://github.com/ggerganov/whisper.spm/pull/17#issuecomment-1805838138 it seems like this works when imported into a package, but not with swift build.

ibash commented 12 months ago

@bjnortier can you check this out / test this? Any ideas on how to make swift build work?

bjnortier commented 12 months ago

I've tried a couple of things but couldn't get swift build to work :/

ggerganov commented 11 months ago

I'm planning to archive this repo since we now have Swift package support directly in whisper.cpp.

Could you check if the SPM stuff works there and if there are any issues, open a ticked in whisper.cpp so it can get more attention.

ibash commented 11 months ago

didn't see that, will check it out thanks!