Please follow the tutorial https://pytorch.org/mobile/ios/#build-pytorch-ios-libraries-from-source very carefully as @xta0 mentioned. Double check you’ve changed the value of Header Search Paths, other linker flags, and bitcode  accordingly before you build it. When you drag install folder to the project, please make sure those three check boxes are checked as the screenshot shows, this is important.
image730×430 56.5 KB
If you dragged in successfully, the color of the folder icon of install in the side bar should be yellow instead of blue.
I also attached a successfully built project which is based on the minimal project you attached (not sure if PR 39591 is included or not, just for showing you the project file structure and settings). Hopefully it will help. https://www.dropbox.com/s/sh0plrh2oakbxcj/PytorchDev-Fixed.zip?dl=0 3 The password is  pytorchios