Exclude EPs that aren't available on mobile to try and fix Xamarin build error on M1. (#11267)

This commit is contained in:
Scott McKay 2022-04-21 07:01:46 +10:00 committed by GitHub
parent 4854a09340
commit c5de493a8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -821,7 +821,9 @@ namespace Microsoft.ML.OnnxRuntime
// CoreML is available on iOS and macOS so we can't exclude based on __MOBILE__ && __IOS__
[DllImport(NativeLib.DllName, CharSet = CharSet.Ansi)]
public static extern IntPtr /*(OrtStatus*)*/ OrtSessionOptionsAppendExecutionProvider_CoreML(IntPtr /*(OrtSessionOptions*)*/ options, uint coreml_flags);
#endif
#if !__MOBILE__
// on non-mobile platforms any of these EPs are possible
[DllImport(NativeLib.DllName, CharSet = CharSet.Ansi)]
public static extern IntPtr /*(OrtStatus*)*/ OrtSessionOptionsAppendExecutionProvider_Dnnl(IntPtr /*(OrtSessionOptions*) */ options, int use_arena);
@ -1659,4 +1661,4 @@ namespace Microsoft.ML.OnnxRuntime
return System.Text.Encoding.UTF8.GetBytes(str + Char.MinValue);
}
} //class NativeMethods
} //namespace
} //namespace