Add support trace on MPS backend (#87910)
Fixes [#87221](https://github.com/pytorch/pytorch/issues/87221)
`trace` now supported on MPS
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87910
Approved by: https://github.com/kulinseth, https://github.com/malfet