The essence of this problem is how iOS development understands Apple's concept of static libraries and how to adapt to the M1 chip computer, which has little to do with the PyTorch framework itself.
It takes a lot of space to fully explain the relevant issues, and this issue is always triggered, so I made a simple demo to show it.
This is a simple and rough copy of my usual working environment. If you find any information that should not appear, please contact me.
Build passed in macOS Big Sur 11.5.1
,Xcode 12.5.1 Simulator - iOS 14.5
created 2022/04/28