I’m making an attempt to deploy a PyTorch mannequin on an iOS venture. Once I was constructing for the entire venture, I received an Undefined symbols:
error from the console.
Right here is the pod file I’m utilizing:
supply 'https://github.com/CocoaPods/Specs.git'
platform :ios, '14.3'
goal 'abc' do
# Remark the following line if you happen to do not wish to use dynamic frameworks
use_frameworks!
pod 'LibTorch', '1.13.0'
pod 'LibTorchvision', '0.14.0'
finish
Right here is the detailed messages from the console:
ld: Undefined symbols:
_cblas_cgemm, referenced from:
at::native::cpublas::gemm(at::native::TransposeType, at::native::TransposeType, lengthy lengthy, lengthy lengthy, lengthy lengthy, c10::advanced<float>, c10::advanced<float> const*, lengthy lengthy, c10::advanced<float> const*, lengthy lengthy, c10::advanced<float>, c10::advanced<float>*, lengthy lengthy) in libtorch_cpu.a[arm64][148](CPUBlas.cpp.o)
_cblas_dgemm, referenced from:
at::native::cpublas::gemm(at::native::TransposeType, at::native::TransposeType, lengthy lengthy, lengthy lengthy, lengthy lengthy, double, double const*, lengthy lengthy, double const*, lengthy lengthy, double, double*, lengthy lengthy) in libtorch_cpu.a[arm64][148](CPUBlas.cpp.o)
_cblas_sgemm, referenced from:
at::native::cpublas::gemm(at::native::TransposeType, at::native::TransposeType, lengthy lengthy, lengthy lengthy, lengthy lengthy, float, float const*, lengthy lengthy, float const*, lengthy lengthy, float, float*, lengthy lengthy) in libtorch_cpu.a[arm64][148](CPUBlas.cpp.o)
_cblas_zgemm, referenced from:
at::native::cpublas::gemm(at::native::TransposeType, at::native::TransposeType, lengthy lengthy, lengthy lengthy, lengthy lengthy, c10::advanced<double>, c10::advanced<double> const*, lengthy lengthy, c10::advanced<double> const*, lengthy lengthy, c10::advanced<double>, c10::advanced<double>*, lengthy lengthy) in libtorch_cpu.a[arm64][148](CPUBlas.cpp.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I’ve tried to put in LibTorch '1.9.0'
from CocoaPods and it might be constructed into the present Xcode iOS venture accurately. So I’m questioning why this occurred…
As well as, though LibTorch '1.9.0'
might be constructed into the iOS venture, the PyTorch mannequin additionally has some points as said right here. So I’d nonetheless must discover a answer out…