You get an AMD GPU, put it in an external case ("enclosure") connect it with usb-c or thunderbolt and that's what's being used in the app. For inference of course
>the upstream Linux amdgpu driver embedded as DriverKit
https://developer.apple.com/documentation/driverkit
>The drivers you build with DriverKit run in user space, rather than as kernel extensions, which improves system stability and security. You create your driver as an app extension and deliver it inside your existing app.