facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

can i use caffe2 in ios 8? #1682

Closed sunfei closed 6 years ago

sunfei commented 6 years ago

i failed to compile when deployment target is 8.x, and in ios 9.x has an error:

dyld: Symbol not found: _OBJCCLASS$_MTLFunctionConstantValues Referenced from: /var/containers/Bundle/Application/05C2F6EC-4E83-4C2F-B6F8-F0F862D246F4/testcaffe.app/testcaffe Expected in: /System/Library/Frameworks/Metal.framework/Metal in /var/containers/Bundle/Application/05C2F6EC-4E83-4C2F-B6F8-F0F862D246F4/testcaffe.app/testcaffe

Maratyszcza commented 6 years ago

Caffe2 Metal backend uses MPSCNN kernels, which were introduced in iOS 10. For earlier iOS versions, configure Caffe2 with -DUSE_METAL=0 to disable Metal backend.