Hi,
Are there rules around using Foundation Models:
- In a background task/session?
- Concurrently, i.e. a bunch simultaneously using Swift Concurrency?
I couldn't find this in the docs (sorry if I missed it) so wondering what's supported and what the best practice is here.
In case it matters, my primary platform is Vision Pro (so, M2).
You can follow the Swift concurrency rules to run multiple Foundation Models sessions / tasks concurrently. The framework doesn't impose any extra rules for concurrency.
Note that the inference tasks will eventually run on the neural engine serially though.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.