Hi all. I am are building PyTorch from source with MPS support and am having a problem with the Deployment Target
Some context:
Im using LibTorch to run inference in C++.
My minimum deployment target is currently 11.
My build works correctly on all systems 11 and up as expected for CPU usage, and I also have no problem checking for MPS availability on any system as well.
The problem Im having right now is that inference with MPS only seems to work correctly on the same Mac OSX that PyTorch was built on. Eg, I am building on 15.1 and it works correctly on my own system, but If I attempt to use this build on MacOS 14 it will not work.
Below is the error I see when trying this:
RuntimeError: Failed to created pipeline state object, error: Error Domain=AGXMetalG14X Code=3 "Function kernel_index_offsets_32 has a deployment target (0x00020007) which is incompatible with this OS (0x00020006)." UserInfo={NSLocalizedDescription=Function kernel_index_offsets_32 has a deployment target (0x00020007) which is incompatible with this OS (0x00020006).}
My question is, is it possible to build PyTorch with MPS so that it can be deployed on a MacOS different from the one built on and if so, how can this be done?
Im already setting CMAKE arguments related to the deployment target, but maybe Im missing something critical.
CMAKE_OSX_DEPLOYMENT_TARGET
Any help appreciated, thanks all.