-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mobile] Unable to load models in Xamarin iOS due to #15545 changes #19295
Comments
@skottmckay any plans to fix this for Xamarin or workarounds in iOS to extend Xamarin support? |
There's a release candidate with the changes from #18390 that should hopefully fix this. You can pick the latest 1.17 build from the ORT-Nightly feed or use these specific ones: https://aiinfra.visualstudio.com/PublicPackages/_artifacts/feed/ORT-Nightly/NuGet/Microsoft.ML.OnnxRuntime/overview/1.17.0-dev-20240119-0139-a63b71eadb |
Thanks for pointing out on nightly builds @skottmckay error MT5209: Error: warning: ignoring duplicate libraries: '-lc++', '-lsqlite3', '-lz' Native linking |
That's definitely unexpected. Looks like the iOS builds are missing in the package. Will look into it and make sure they're in the official 1.17 release. |
Thanks, i ll follow up the releases, test and report regarding this and relevant linking issue. |
…9311) ### Description <!-- Describe your changes. --> Updates to only include ios archs framework in artifacts included in Nuget Package. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Related issue: #19295 (comment) --------- Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
…9311) ### Description <!-- Describe your changes. --> Updates to only include ios archs framework in artifacts included in Nuget Package. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Related issue: #19295 (comment) --------- Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
@skottmckay, @YUNQIUGUO tks a lot was fixed in 1.17.0 |
Describe the issue
Crush on Microsoft.ML.OnnxRuntime.InferenceSession..ctor in Xamarin.iOS release mode only and Microsoft.ML.OnnxRuntime higher then 1.14.1 using in iOS Microsoft.ML.OnnxRuntime.Extensions.Dummy:
Marshal.GetDelegateForFunctionPointer (System.IntPtr ptr, System.Type t)
System.TypeInitializationException: Attempting to JIT compile method '(wrapper managed-to-native) intptr Microsoft.ML.OnnxRuntime.NativeMethods/DGetMapKeyType:wrapper_aot_native (object,intptr,intptr&)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
(wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
Microsoft.ML.OnnxRuntime.SessionOptions
Microsoft.ML.OnnxRuntime.SessionOptions..ctor () <0x1074cb264 + 0x00107> in <02a3e6a54f1e4988ae968f128df4091d#9f2d94840382105a7f9403abba49d318>:0
Microsoft.ML.OnnxRuntime.InferenceSession
Microsoft.ML.OnnxRuntime.InferenceSession..ctor (System.String modelPath) <0x1074be8e4 + 0x00057> in <02a3e6a54f1e4988ae968f128df4091d#9f2d94840382105a7f9403abba49d318>:0
I am getting in an iPhone 6s, iPhone SE (3rd generation), iPhone 15
XCode 14.2, XCode 15,0
Xamarin.iOS 16.4.0.18, 16.4.0.23
according to @skottmckay relates to #15545 introduced changes
#16463 (comment)
To reproduce
clone this repo: https://github.com/SuperCD/onnx-xamarin-error
Build and run in release the application on an ios device
Urgency
No response
Platform
Xamarin
OS Version
17.2.1
ONNX Runtime Installation
Released Package
Compiler Version (if 'Built from Source')
No response
Package Name (if 'Released Package')
None
ONNX Runtime Version or Commit ID
1.15.0 or higher
ONNX Runtime API
C#
Architecture
ARM64
Execution Provider
Default CPU, CoreML
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: