How to solve Insufficient Permission (to submit GPU work from background) (IOAF code 6)?

I have developed an app that uses Metal performance shaders to compute the machine learning prediction from a TensorFlow trained model. The app works fine in foreground but in background I get the error:


"Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (IOAF code 6)"


How do we enable GPU processing in background mode?

Replies

Thanks Audulus; what if I convert the implementation to a BNNS? would that work in the background?