-
Notifications
You must be signed in to change notification settings - Fork 6.8k
MXNet Amalgamation iOS compilation #1914
Comments
Are you building for the simulator or hardware targets? Have you managed to get it working on the simulator to begin with? |
@Piyush3dB Thanks for the reply! I can successfully build for the iPhone 6 simulator. However, building for the iPhone 5 simulators and below give me the aforementioned error. I get the same error when trying a hardware install on an iPhone 5. |
Ok, looks like an llvm issue. We need to establish what the differences are. Are you able to post the commands Xcode uses during linking for the iPhone 5 and 6 simulators? Fortunately when I tried it I didn't run into this issue as I was targeting the iPhone 6. I'll give it a go with other devices soon. |
Would this be it? I'm copying this from the "View -> Show Report Navigator -> Build" page, under the Link dropdown menu. iPhone 5:
iPhone 6:
The difference seems to be i386 vs x86_64 during compilation for iPhone 5 and iPhone 6 respectively. |
This might be a can of worms to debug. Anyway to get you going I propose the following: The the bottom of mxnet_predict-all.cc you have the definition of the function MXGetLastError() where the error appears. This function doesn't get used during MXNet predict so it is safe to comment out the offending line like so
Thereafter you should be able to build and run without any problems. Does this work? I'll try and give it a go myself later today. |
@RishabGargeya FYI I'm able to build and run the app on iPhone 5 simulator by making the following mods to mxnet_predict-all.cc (at the bottom of the file).
Hopefully this solves your issue? |
@Piyush3dB Thank you so much! This workaround fixes the issues I have been having. Here are the changes I have made in total to the amalgamation file (mxnet_predict-all.cc) found here:
change to:
as well --
change to:
Once again, thanks for all the help! |
Hi all,
I am using MXNet amalgamation for prediction on iOS and am running into an issue -- here is the situation:
My goal is to build a prediction model for iOS using the c_predict_api.h and mxnet_predict-all.cc files downloaded from the demo: https://github.com/pppoe/WhatsThis-iOS/tree/master/WhatIsThis/MXNet
When building the project in xcode, I am able to successfully load a trained mxnet model and predict when building for the iPhone 6, but when building for the iPhone 5, I am getting this error:
I am kind of confused as to why this error would show up when building for certain devices and not for others. Any ideas?
Thanks so much for your help!
The text was updated successfully, but these errors were encountered: