com.github.asus4.onnxruntime 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/OrtPostProcessBuild.cs +8 -6
- package/README.md +80 -0
- package/{Runtime/targets/net6.0-ios/targets.xml.meta → README.md.meta} +1 -1
- package/package.json +1 -1
- package/Editor/OrtBuildHelper.cs +0 -12
- package/Editor/OrtBuildHelper.cs.meta +0 -11
- package/Runtime/Microsoft.ML.OnnxRuntime.csproj +0 -370
- package/Runtime/Microsoft.ML.OnnxRuntime.csproj.meta +0 -7
- package/Runtime/Microsoft.ML.OnnxRuntime.sln +0 -25
- package/Runtime/Microsoft.ML.OnnxRuntime.sln.meta +0 -7
- package/Runtime/targets/monoandroid11.0/targets.xml +0 -8
- package/Runtime/targets/monoandroid11.0/targets.xml.meta +0 -7
- package/Runtime/targets/monoandroid11.0.meta +0 -8
- package/Runtime/targets/net6.0-android/targets.xml +0 -8
- package/Runtime/targets/net6.0-android/targets.xml.meta +0 -7
- package/Runtime/targets/net6.0-android.meta +0 -8
- package/Runtime/targets/net6.0-ios/targets.xml +0 -13
- package/Runtime/targets/net6.0-ios.meta +0 -8
- package/Runtime/targets/net6.0-macos/targets.xml +0 -21
- package/Runtime/targets/net6.0-macos/targets.xml.meta +0 -7
- package/Runtime/targets/net6.0-macos.meta +0 -8
- package/Runtime/targets/netstandard/props.xml +0 -179
- package/Runtime/targets/netstandard/props.xml.meta +0 -7
- package/Runtime/targets/netstandard/targets.xml +0 -17
- package/Runtime/targets/netstandard/targets.xml.meta +0 -7
- package/Runtime/targets/netstandard.meta +0 -8
- package/Runtime/targets/xamarinios10/targets.xml +0 -21
- package/Runtime/targets/xamarinios10/targets.xml.meta +0 -7
- package/Runtime/targets/xamarinios10.meta +0 -8
- package/Runtime/targets.meta +0 -8
|
@@ -6,7 +6,6 @@ using UnityEditor.Build;
|
|
|
6
6
|
using UnityEditor.Build.Reporting;
|
|
7
7
|
#if UNITY_IOS
|
|
8
8
|
using UnityEditor.iOS.Xcode;
|
|
9
|
-
using UnityEditor.iOS.Xcode.Extensions;
|
|
10
9
|
#endif // UNITY_IOS
|
|
11
10
|
|
|
12
11
|
namespace Microsoft.ML.OnnxRuntime.Editor
|
|
@@ -16,6 +15,10 @@ namespace Microsoft.ML.OnnxRuntime.Editor
|
|
|
16
15
|
/// </summary>
|
|
17
16
|
public class OrtPostProcessBuild : IPostprocessBuildWithReport
|
|
18
17
|
{
|
|
18
|
+
private const string PACKAGE_PATH = "Packages/com.github.asus4.onnxruntime";
|
|
19
|
+
private const string FRAMEWORK_SRC = "Plugins/iOS~/onnxruntime.xcframework";
|
|
20
|
+
private const string FRAMEWORK_DST = "Libraries/onnxruntime.xcframework";
|
|
21
|
+
|
|
19
22
|
public int callbackOrder => 0;
|
|
20
23
|
|
|
21
24
|
public void OnPostprocessBuild(BuildReport report)
|
|
@@ -42,14 +45,13 @@ namespace Microsoft.ML.OnnxRuntime.Editor
|
|
|
42
45
|
PBXProject pbxProject = new();
|
|
43
46
|
pbxProject.ReadFromFile(pbxProjectPath);
|
|
44
47
|
|
|
45
|
-
// Copy XCFramework to
|
|
46
|
-
string frameworkSrcPath = Path.Combine(
|
|
47
|
-
string
|
|
48
|
-
string frameworkDstAbsPath = Path.Combine(report.summary.outputPath, frameworkDstRelPath);
|
|
48
|
+
// Copy XCFramework to the Xcode project folder
|
|
49
|
+
string frameworkSrcPath = Path.Combine(PACKAGE_PATH, FRAMEWORK_SRC);
|
|
50
|
+
string frameworkDstAbsPath = Path.Combine(report.summary.outputPath, FRAMEWORK_DST);
|
|
49
51
|
CopyDir(frameworkSrcPath, frameworkDstAbsPath);
|
|
50
52
|
|
|
51
53
|
// Then add to Xcode project
|
|
52
|
-
string frameworkGuid = pbxProject.AddFile(frameworkDstAbsPath,
|
|
54
|
+
string frameworkGuid = pbxProject.AddFile(frameworkDstAbsPath, FRAMEWORK_DST, PBXSourceTree.Source);
|
|
53
55
|
string targetGuid = pbxProject.GetUnityFrameworkTargetGuid();
|
|
54
56
|
// Note: onnxruntime.xcframework should be linked in build section. Embed framework didn't work.
|
|
55
57
|
// pbxProject.AddFileToEmbedFrameworks(targetGuid, frameworkGuid);
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# ONNX Runtime Plugin for Unity
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/com.github.asus4.onnxruntime)
|
|
4
|
+
|
|
5
|
+
Pre-built ONNX Runtime libraries for Unity.
|
|
6
|
+
|
|
7
|
+
## [See Examples](https://github.com/asus4/onnxruntime-unity-examples)
|
|
8
|
+
|
|
9
|
+
[https://github.com/asus4/onnxruntime-unity-examples](https://github.com/asus4/onnxruntime-unity-examples)
|
|
10
|
+
|
|
11
|
+
<https://github.com/asus4/onnxruntime-unity-examples/assets/357497/96ed9913-41b7-401d-a634-f0e2de4fc3c7>
|
|
12
|
+
|
|
13
|
+
## Tested environment
|
|
14
|
+
|
|
15
|
+
- Unity: 2022.3.16f1 (LTS)
|
|
16
|
+
- ONNX Runtime: 1.16.3
|
|
17
|
+
- ONNX Runtime Extensions: 0.9.0
|
|
18
|
+
|
|
19
|
+
### Execution Providers & Extensions
|
|
20
|
+
|
|
21
|
+
#### [Execution Providers](https://onnxruntime.ai/docs/execution-providers/)
|
|
22
|
+
|
|
23
|
+
Execution Providers are hardware acceleration libraries for each platform. See [official docs](https://onnxruntime.ai/docs/execution-providers/) for more details.
|
|
24
|
+
|
|
25
|
+
| Platform | CPU | CoreML | NNAPI | CUDA | TensorRT | DirectML | XNNPACK |
|
|
26
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
27
|
+
| macOS | :white_check_mark: | :white_check_mark: | | | | | |
|
|
28
|
+
| iOS | :white_check_mark: | :white_check_mark: | | | | | :construction: |
|
|
29
|
+
| Android | :white_check_mark: | | :white_check_mark: | | | | :construction: |
|
|
30
|
+
| Windows | :white_check_mark: | | | :construction: | :construction: | :white_check_mark: | |
|
|
31
|
+
| Linux | :white_check_mark: | | | :construction: | :construction: | | |
|
|
32
|
+
|
|
33
|
+
#### [ONNX Runtime Extensions](https://github.com/microsoft/onnxruntime-extensions)
|
|
34
|
+
|
|
35
|
+
ONNX Runtime Extensions are a set of pre/post-processing.
|
|
36
|
+
|
|
37
|
+
| Platform | Extensions |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| macOS | :construction: |
|
|
40
|
+
| iOS | :construction: |
|
|
41
|
+
| Android | :construction: |
|
|
42
|
+
| Windows | :construction: |
|
|
43
|
+
| Linux | :construction: |
|
|
44
|
+
|
|
45
|
+
:white_check_mark: : Supported in Unity Core library
|
|
46
|
+
:construction: : Experimental Preview
|
|
47
|
+
|
|
48
|
+
## How to Install
|
|
49
|
+
|
|
50
|
+
Pre-built libraries are available on [NPM](https://www.npmjs.com/package/com.github.asus4.onnxruntime). Add the following `scopedRegistries` and `dependencies` in `Packages/manifest.json`.
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
"scopedRegistries": [
|
|
54
|
+
{
|
|
55
|
+
"name": "NPM",
|
|
56
|
+
"url": "https://registry.npmjs.com",
|
|
57
|
+
"scopes": [
|
|
58
|
+
"com.github.asus4"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"com.github.asus4.onnxruntime": "0.1.10",
|
|
64
|
+
"com.github.asus4.onnxruntime.unity": "0.1.10",
|
|
65
|
+
"com.github.asus4.onnxruntime.win-x64-gpu": "0.1.10",
|
|
66
|
+
"com.github.asus4.onnxruntime.linux-x64-gpu": "0.1.10",
|
|
67
|
+
"com.github.asus4.onnxruntime.extensions": "0.1.10",
|
|
68
|
+
... other dependencies
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### What is included in each package
|
|
73
|
+
|
|
74
|
+
- `com.github.asus4.onnxruntime` : Core library
|
|
75
|
+
- CPU provider for all platforms
|
|
76
|
+
- GPU provider for iOS, Android, macOS and Windows(only DirectML)
|
|
77
|
+
- `com.github.asus4.onnxruntime.unity` : (Optional) Utilities for Unity
|
|
78
|
+
- `com.github.asus4.onnxruntime.win-x64-gpu` : (Optional) GPU provider for Windows
|
|
79
|
+
- `com.github.asus4.onnxruntime.linux-x64-gpu` : (Optional) GPU provider for Linux
|
|
80
|
+
- `com.github.asus4.onnxruntime.extensions` : (Optional) ONNX Runtime Extensions
|
package/package.json
CHANGED
package/Editor/OrtBuildHelper.cs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
using System.Linq;
|
|
2
|
-
using UnityEngine;
|
|
3
|
-
using UnityEditor;
|
|
4
|
-
using UnityEditor.Build;
|
|
5
|
-
|
|
6
|
-
namespace Microsoft.ML.OnnxRuntime.Editor
|
|
7
|
-
{
|
|
8
|
-
public static class OrtBuildHelper
|
|
9
|
-
{
|
|
10
|
-
public const string PACKAGE_PATH = "Packages/com.github.asus4.onnxruntime";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
<Project Sdk="MSBuild.Sdk.Extras/3.0.22">
|
|
2
|
-
<PropertyGroup>
|
|
3
|
-
<!--- packaging properties -->
|
|
4
|
-
<OrtPackageId Condition="'$(OrtPackageId)' == ''">Microsoft.ML.OnnxRuntime</OrtPackageId>
|
|
5
|
-
</PropertyGroup>
|
|
6
|
-
|
|
7
|
-
<!--
|
|
8
|
-
Temporary setup until official Visual Studio 2022 release supports .net6, as the CIs require the official release.
|
|
9
|
-
We will be able to build all targets with VS once that happens.
|
|
10
|
-
|
|
11
|
-
Until then, we need to build the pre-.net6 targets with VS and the .net6 targets with dotnet.
|
|
12
|
-
|
|
13
|
-
The pre-.net6 Xamarin targets are optional and only included if the machine has the required workloads.
|
|
14
|
-
|
|
15
|
-
We have 3 scenarios
|
|
16
|
-
1) Build pre-net6 targets with VS - SelectedTargets=PreNet6
|
|
17
|
-
2) Build net6 targets - SelectedTargets=Net6
|
|
18
|
-
3) Run 'Pack' target to create nuget package from combination of 1 and 2 - SelectedTargets=All
|
|
19
|
-
|
|
20
|
-
Default is PreNet6 so that existing projects and CI builds will do the same thing unless explicitly updated.
|
|
21
|
-
-->
|
|
22
|
-
<PropertyGroup>
|
|
23
|
-
<SelectedTargets>PreNet6</SelectedTargets>
|
|
24
|
-
<BaseTargets>netstandard2.0;netcoreapp3.1;net6.0</BaseTargets>
|
|
25
|
-
</PropertyGroup>
|
|
26
|
-
|
|
27
|
-
<!-- only set the Xamarin mobile targets if we're building an ORT package,
|
|
28
|
-
and only if the mobile workloads are installed -->
|
|
29
|
-
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
|
|
30
|
-
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Gpu') AND
|
|
31
|
-
Exists('$(MSBuildExtensionsPath)\Xamarin\Android') AND
|
|
32
|
-
Exists('$(MSBuildExtensionsPath)\Xamarin\iOS')">
|
|
33
|
-
<XamarinTargets>xamarinios10;monoandroid11.0</XamarinTargets>
|
|
34
|
-
</PropertyGroup>
|
|
35
|
-
|
|
36
|
-
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training') AND
|
|
37
|
-
Exists('$(MSBuildExtensionsPath)\Xamarin\Android')">
|
|
38
|
-
<XamarinTargetsForTraining>monoandroid11.0</XamarinTargetsForTraining>
|
|
39
|
-
</PropertyGroup>
|
|
40
|
-
|
|
41
|
-
<!-- only set the .net6 targets if we're building an ORT package.
|
|
42
|
-
we can add .net6 support to other packages later as needed -->
|
|
43
|
-
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
|
|
44
|
-
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Azure' OR
|
|
45
|
-
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Gpu')">
|
|
46
|
-
<Net6Targets>net6.0;net6.0-android;net6.0-ios;net6.0-macos</Net6Targets>
|
|
47
|
-
</PropertyGroup>
|
|
48
|
-
|
|
49
|
-
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training')">
|
|
50
|
-
<Net6TargetsForTrainingPackage>net6.0;net6.0-android</Net6TargetsForTrainingPackage>
|
|
51
|
-
</PropertyGroup>
|
|
52
|
-
|
|
53
|
-
<PropertyGroup Condition="'$(SelectedTargets)'=='PreNet6'">
|
|
54
|
-
<TargetFrameworks>$(BaseTargets);$(XamarinTargets);$(XamarinTargetsForTraining)</TargetFrameworks>
|
|
55
|
-
</PropertyGroup>
|
|
56
|
-
|
|
57
|
-
<PropertyGroup Condition="'$(SelectedTargets)'=='Net6'">
|
|
58
|
-
<TargetFrameworks>$(Net6Targets);$(Net6TargetsForTrainingPackage)</TargetFrameworks>
|
|
59
|
-
</PropertyGroup>
|
|
60
|
-
|
|
61
|
-
<!-- nuget package creation -->
|
|
62
|
-
<PropertyGroup Condition="'$(SelectedTargets)'=='All'">
|
|
63
|
-
<TargetFrameworks>$(BaseTargets);$(XamarinTargets);$(XamarinTargetsForTraining);$(Net6Targets);$(Net6TargetsForTrainingPackage)</TargetFrameworks>
|
|
64
|
-
</PropertyGroup>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<PropertyGroup>
|
|
68
|
-
<Platforms>AnyCPU;x86</Platforms>
|
|
69
|
-
<LangVersion>default</LangVersion>
|
|
70
|
-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
71
|
-
<SignAssembly>true</SignAssembly>
|
|
72
|
-
<AssemblyOriginatorKeyFile>..\..\OnnxRuntime.snk</AssemblyOriginatorKeyFile>
|
|
73
|
-
|
|
74
|
-
<!--internal build related properties-->
|
|
75
|
-
<OnnxRuntimeRoot>$(ProjectDir)..\..\..</OnnxRuntimeRoot>
|
|
76
|
-
<OnnxRuntimeCsharpRoot>$(OnnxRuntimeRoot)\csharp</OnnxRuntimeCsharpRoot>
|
|
77
|
-
<TargetArchitecture Condition=" '$(TargetArchitecture)' == '' ">x64</TargetArchitecture>
|
|
78
|
-
|
|
79
|
-
<RootNamespace>Microsoft.ML.OnnxRuntime</RootNamespace>
|
|
80
|
-
<AssemblyName>Microsoft.ML.OnnxRuntime</AssemblyName>
|
|
81
|
-
<EnableDefaultItems>false</EnableDefaultItems>
|
|
82
|
-
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
|
83
|
-
<DebugType>portable</DebugType>
|
|
84
|
-
|
|
85
|
-
<!-- Controls whether C# Bindings for Training are included in the Managed Nuget Package.
|
|
86
|
-
Bindings for training are included by default. If user tries to call training apis when the native package installed
|
|
87
|
-
on their device is not built for training, an exception will be thrown with the following message -
|
|
88
|
-
"Training is disabled in the current build. Please build onnxruntime from source with the build flags
|
|
89
|
-
enable_training_apis. "-->
|
|
90
|
-
<EnableTrainingApis Condition="'$(EnableTrainingApis)' == ''">true</EnableTrainingApis>
|
|
91
|
-
|
|
92
|
-
<!--- The package name is always hardcoded as the package created by this project only contains managed assemblies -->
|
|
93
|
-
<!--- The parameter OrtPackageId is only used for some conditional logic below -->
|
|
94
|
-
<PackageId>Microsoft.ML.OnnxRuntime.Managed</PackageId>
|
|
95
|
-
<Authors>Microsoft</Authors>
|
|
96
|
-
<PackageVersion Condition=" '$(PackageVersion)' == '' And '$(Configuration)' == 'Debug' ">1.0.0</PackageVersion>
|
|
97
|
-
<PackageVersion Condition=" '$(PackageVersion)' == '' ">0.0.0</PackageVersion>
|
|
98
|
-
<Version>$(PackageVersion)</Version>
|
|
99
|
-
<Description>This package contains ONNX Runtime for .Net platforms</Description>
|
|
100
|
-
<PackageTags>ONNX;ONNX Runtime;Machine Learning</PackageTags>
|
|
101
|
-
<PackageProjectUrl>https://github.com/Microsoft/onnxruntime</PackageProjectUrl>
|
|
102
|
-
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
|
103
|
-
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
|
|
104
|
-
<PackageIcon>ORT_icon_for_light_bg.png</PackageIcon>
|
|
105
|
-
<PackageReleaseNotes>
|
|
106
|
-
Release Def:
|
|
107
|
-
Branch: $(BUILD_SOURCEBRANCH)
|
|
108
|
-
Commit: $(BUILD_SOURCEVERSION)
|
|
109
|
-
Build: https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=$(BUILD_BUILDID)
|
|
110
|
-
</PackageReleaseNotes>
|
|
111
|
-
<!-- sourcelink flags -->
|
|
112
|
-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
|
113
|
-
|
|
114
|
-
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
|
|
115
|
-
<!--EmbedUntrackedSources>true</EmbedUntrackedSources-->
|
|
116
|
-
|
|
117
|
-
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
|
118
|
-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
|
119
|
-
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
|
120
|
-
<Configurations>Debug;Release;RelWithDebInfo</Configurations>
|
|
121
|
-
|
|
122
|
-
<IsLinuxBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinuxBuild>
|
|
123
|
-
<IsWindowsBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindowsBuild>
|
|
124
|
-
<IsMacOSBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsMacOSBuild>
|
|
125
|
-
|
|
126
|
-
<!-- $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) gives better results than
|
|
127
|
-
$(TargetPlatformIdentifier). See https://github.com/dotnet/msbuild/issues/7359
|
|
128
|
-
Note there are slight differences in casing (e.g. macos vs macOS), so if we ever
|
|
129
|
-
change to use $(TargetPlatformIdentifier) we need to adjust for that.
|
|
130
|
-
|
|
131
|
-
-->
|
|
132
|
-
<IsXamarinTarget Condition="$(TargetFramework.StartsWith('xamarinios')) OR
|
|
133
|
-
$(TargetFramework.StartsWith('monoandroid'))">true</IsXamarinTarget>
|
|
134
|
-
<IsAndroidTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' OR
|
|
135
|
-
$(TargetFramework.StartsWith('monoandroid'))">true</IsAndroidTarget>
|
|
136
|
-
<IsIOSTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR
|
|
137
|
-
$(TargetFramework.StartsWith('xamarinios'))">true</IsIOSTarget>
|
|
138
|
-
<IsMacTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos' OR
|
|
139
|
-
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">true</IsMacTarget>
|
|
140
|
-
</PropertyGroup>
|
|
141
|
-
|
|
142
|
-
<!-- Enable training APIs for the build. The native package must be
|
|
143
|
-
a training build with build flag 'enable_training_apis'.
|
|
144
|
-
-->
|
|
145
|
-
<PropertyGroup Condition="'$(EnableTrainingApis)'=='true'">
|
|
146
|
-
<OrtConstants>$(OrtConstants);__ENABLE_TRAINING_APIS__</OrtConstants>
|
|
147
|
-
</PropertyGroup>
|
|
148
|
-
|
|
149
|
-
<!--
|
|
150
|
-
Properties that depend on the system we're building on.
|
|
151
|
-
-->
|
|
152
|
-
<PropertyGroup Condition="'$(IsLinuxBuild)'=='true'">
|
|
153
|
-
<!--internal build related properties for Linux -->
|
|
154
|
-
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Linux</OnnxRuntimeBuildDirectory>
|
|
155
|
-
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
|
156
|
-
</PropertyGroup>
|
|
157
|
-
|
|
158
|
-
<PropertyGroup Condition="'$(IsWindowsBuild)'=='true'">
|
|
159
|
-
<!--internal build related properties for Windows -->
|
|
160
|
-
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Windows</OnnxRuntimeBuildDirectory>
|
|
161
|
-
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)</NativeBuildOutputDir>
|
|
162
|
-
</PropertyGroup>
|
|
163
|
-
|
|
164
|
-
<PropertyGroup Condition="'$(IsMacOSBuild)'=='true'">
|
|
165
|
-
<!--internal build related properties for OSX -->
|
|
166
|
-
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\MacOS</OnnxRuntimeBuildDirectory>
|
|
167
|
-
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
|
168
|
-
</PropertyGroup>
|
|
169
|
-
|
|
170
|
-
<!--
|
|
171
|
-
Properties that depend on the target framework.
|
|
172
|
-
-->
|
|
173
|
-
<PropertyGroup Condition="'$(IsIOSTarget)'=='true' OR '$(IsAndroidTarget)'=='true'">
|
|
174
|
-
<OrtConstants>$(OrtConstants);__MOBILE__</OrtConstants>
|
|
175
|
-
</PropertyGroup>
|
|
176
|
-
|
|
177
|
-
<PropertyGroup Condition="'$(IsAndroidTarget)'=='true'">
|
|
178
|
-
<OrtConstants>$(OrtConstants);__ANDROID__</OrtConstants>
|
|
179
|
-
</PropertyGroup>
|
|
180
|
-
|
|
181
|
-
<PropertyGroup Condition="'$(IsIOSTarget)'=='true'">
|
|
182
|
-
<OrtConstants>$(OrtConstants);__IOS__</OrtConstants>
|
|
183
|
-
</PropertyGroup>
|
|
184
|
-
|
|
185
|
-
<!-- CoreML is definitely valid on iOS and macOS -->
|
|
186
|
-
<PropertyGroup Condition="'$(IsIOSTarget)'=='true' OR '$(IsMacTarget)'=='true'">
|
|
187
|
-
<OrtConstants>$(OrtConstants);__ENABLE_COREML__</OrtConstants>
|
|
188
|
-
</PropertyGroup>
|
|
189
|
-
|
|
190
|
-
<!-- CoreML may be valid for one of these targets as they support macOS. we do a runtime check that the OS is
|
|
191
|
-
macOS before attempting to enable CoreML. This includes netcoreapp3.1 and net6.0
|
|
192
|
-
NOTE: $(TargetFrameworkIdentitier) may not be set yet, so we need to call GetTargetFrameworkIdentifier
|
|
193
|
-
-->
|
|
194
|
-
<PropertyGroup Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))=='.NETCoreApp' AND
|
|
195
|
-
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))==''">
|
|
196
|
-
<OrtConstants>$(OrtConstants);__ENABLE_COREML__</OrtConstants>
|
|
197
|
-
</PropertyGroup>
|
|
198
|
-
|
|
199
|
-
<PropertyGroup Condition="'$(IsXamarinTarget)'=='true'">
|
|
200
|
-
<OrtConstants>$(OrtConstants);__XAMARIN__</OrtConstants>
|
|
201
|
-
</PropertyGroup>
|
|
202
|
-
|
|
203
|
-
<PropertyGroup>
|
|
204
|
-
<DefineConstants>$(DefineConstants);$(OrtConstants)</DefineConstants>
|
|
205
|
-
</PropertyGroup>
|
|
206
|
-
|
|
207
|
-
<!-- debug output - makes finding/fixing any issues with the the conditions easy.
|
|
208
|
-
<Target Name="DumpValues" BeforeTargets="PreBuildEvent">
|
|
209
|
-
<Message Text="TargetPlatform='$(TargetPlatform)' TargetPlatformIdentifier='$(TargetPlatformIdentifier)' " />
|
|
210
|
-
<Message Text="TargetFramework='$(TargetFramework)' TargetFrameworkIdentifier='$(TargetFrameworkIdentifier)' " />
|
|
211
|
-
<Message Text="[MSBuild]::GetTargetPlatformIdentifier(TargetFramework)='$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))' " />
|
|
212
|
-
<Message Text="[MSBuild]::GetTargetFrameworkIdentifier(TargetFramework)='$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))' " />
|
|
213
|
-
<Message Text="IsMacTarget='$(IsMacTarget)' IsIOSTarget='$(IsIOSTarget)' IsAndroidTarget='$(IsAndroidTarget)' IsXamarinTarget='$(IsXamarinTarget)'" />
|
|
214
|
-
<Message Text="OrtConstants='$(OrtConstants)' " />
|
|
215
|
-
<Message Text="TargetFrameworks='$(TargetFrameworks)' " />
|
|
216
|
-
</Target>
|
|
217
|
-
-->
|
|
218
|
-
|
|
219
|
-
<ItemGroup>
|
|
220
|
-
<None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\session\onnxruntime_*.h"
|
|
221
|
-
PackagePath="\build\native\include"
|
|
222
|
-
Pack="false"
|
|
223
|
-
CopyToOutputDirectory="Never"
|
|
224
|
-
Visible="false"
|
|
225
|
-
/>
|
|
226
|
-
<None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\providers\cpu\cpu_provider_factory.h"
|
|
227
|
-
PackagePath="\build\native\include"
|
|
228
|
-
Pack="false"
|
|
229
|
-
CopyToOutputDirectory="Never"
|
|
230
|
-
Visible="false"
|
|
231
|
-
/>
|
|
232
|
-
<None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\providers\dml\dml_provider_factory.h"
|
|
233
|
-
Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.DirectML'"
|
|
234
|
-
PackagePath="\build\native\include"
|
|
235
|
-
Pack="false"
|
|
236
|
-
CopyToOutputDirectory="Never"
|
|
237
|
-
Visible="false"
|
|
238
|
-
/>
|
|
239
|
-
<None Include="$(OnnxRuntimeCsharpRoot)\..\orttraining\orttraining\training_api\include\onnxruntime_training*.h"
|
|
240
|
-
Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training'"
|
|
241
|
-
PackagePath="\build\native\include"
|
|
242
|
-
Pack="false"
|
|
243
|
-
CopyToOutputDirectory="Never"
|
|
244
|
-
Visible="false"
|
|
245
|
-
/>
|
|
246
|
-
<None Include="$(NativeBuildOutputDir)\libonnxruntime.so"
|
|
247
|
-
Condition="Exists('$(NativeBuildOutputDir)\libonnxruntime.so')"
|
|
248
|
-
PackagePath="\runtimes\linux-$(TargetArchitecture)\native"
|
|
249
|
-
Pack="false"
|
|
250
|
-
CopyToOutputDirectory="Never"
|
|
251
|
-
Visible="false"
|
|
252
|
-
/>
|
|
253
|
-
<None Include="$(NativeBuildOutputDir)\onnxruntime.lib"
|
|
254
|
-
Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.lib')"
|
|
255
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
256
|
-
Pack="false"
|
|
257
|
-
CopyToOutputDirectory="Never"
|
|
258
|
-
Visible="false"
|
|
259
|
-
/>
|
|
260
|
-
<None Include="$(NativeBuildOutputDir)\onnxruntime.dll"
|
|
261
|
-
Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.dll')"
|
|
262
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
263
|
-
Pack="false"
|
|
264
|
-
CopyToOutputDirectory="PreserveNewest"
|
|
265
|
-
Visible="false"
|
|
266
|
-
/>
|
|
267
|
-
<None Include="$(NativeBuildOutputDir)\onnxruntime.pdb"
|
|
268
|
-
Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.pdb')"
|
|
269
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
270
|
-
Pack="false"
|
|
271
|
-
CopyToOutputDirectory="PreserveNewest"
|
|
272
|
-
Visible="false"
|
|
273
|
-
/>
|
|
274
|
-
<None Include="$(NativeBuildOutputDir)\dnnl.dll"
|
|
275
|
-
Condition="Exists('$(NativeBuildOutputDir)\dnnl.dll')"
|
|
276
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
277
|
-
Pack="false"
|
|
278
|
-
CopyToOutputDirectory="PreserveNewest"
|
|
279
|
-
Visible="false"
|
|
280
|
-
/>
|
|
281
|
-
<None Include="$(NativeBuildOutputDir)\mklml.dll"
|
|
282
|
-
Condition="Exists('$(NativeBuildOutputDir)\mklml.dll')"
|
|
283
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
284
|
-
Pack="false"
|
|
285
|
-
CopyToOutputDirectory="PreserveNewest"
|
|
286
|
-
Visible="false"
|
|
287
|
-
/>
|
|
288
|
-
<None Include="$(NativeBuildOutputDir)\libiomp5md.dll"
|
|
289
|
-
Condition="Exists('$(NativeBuildOutputDir)\libiomp5md.dll')"
|
|
290
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
291
|
-
Pack="false"
|
|
292
|
-
CopyToOutputDirectory="PreserveNewest"
|
|
293
|
-
Visible="false"
|
|
294
|
-
/>
|
|
295
|
-
<None Include="$(NativeBuildOutputDir)\tvm.dll"
|
|
296
|
-
Condition="Exists('$(NativeBuildOutputDir)\tvm.dll')"
|
|
297
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
298
|
-
Pack="false"
|
|
299
|
-
CopyToOutputDirectory="PreserveNewest"
|
|
300
|
-
Visible="false"
|
|
301
|
-
/>
|
|
302
|
-
<None Include="$(OnnxRuntimeCsharpRoot)\..\LICENSE.txt;$(OnnxRuntimeCsharpRoot)\..\ThirdPartyNotices.txt;$(OnnxRuntimeCsharpRoot)\..\ORT_icon_for_light_bg.png;$(OnnxRuntimeCsharpRoot)\..\docs\Privacy.md"
|
|
303
|
-
PackagePath="\"
|
|
304
|
-
Pack="true"
|
|
305
|
-
Visible="false"
|
|
306
|
-
/>
|
|
307
|
-
<None Include="targets\netstandard\$(PackageId).targets"
|
|
308
|
-
PackagePath="build\netstandard2.0\$(PackageId).targets"
|
|
309
|
-
Pack="true"
|
|
310
|
-
Visible="false"
|
|
311
|
-
/>
|
|
312
|
-
|
|
313
|
-
<!-- Some tools to be packaged in nightly build only, should not be released -->
|
|
314
|
-
<!-- These are copied to the runtimes folder for convenience of loading with the dlls -->
|
|
315
|
-
<None Include="$(NativeBuildOutputDir)\onnxruntime_perf_test.exe"
|
|
316
|
-
Condition="('$(IsReleaseBuild)' != 'true') And ($(TargetArchitecture)=='x64') And Exists('$(NativeBuildOutputDir)\onnxruntime_perf_test.exe')"
|
|
317
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
318
|
-
Pack="false"
|
|
319
|
-
Visible="false"
|
|
320
|
-
/>
|
|
321
|
-
<None Include="$(NativeBuildOutputDir)\onnx_test_runner.exe"
|
|
322
|
-
Condition="('$(IsReleaseBuild)' != 'true') And ($(TargetArchitecture)=='x64') And Exists('$(NativeBuildOutputDir)\onnx_test_runner.exe')"
|
|
323
|
-
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
324
|
-
Pack="false"
|
|
325
|
-
Visible="false"
|
|
326
|
-
/>
|
|
327
|
-
</ItemGroup>
|
|
328
|
-
|
|
329
|
-
<ItemGroup>
|
|
330
|
-
<Compile Include="**\*.shared.cs" Link="%(Filename)%(Extension)" />
|
|
331
|
-
</ItemGroup>
|
|
332
|
-
|
|
333
|
-
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
|
|
334
|
-
<PackageReference Include="System.Memory" Version="4.5.5" />
|
|
335
|
-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
|
336
|
-
<Compile Include="**\*.netstandard.cs" Link="platform\netstandard\%(Filename)%(Extension)" />
|
|
337
|
-
</ItemGroup>
|
|
338
|
-
|
|
339
|
-
<ItemGroup Condition=" $(TargetFramework.StartsWith('net')) AND !$(TargetFramework.StartsWith('netstandard')) ">
|
|
340
|
-
<PackageReference Include="System.Memory" Version="4.5.5" />
|
|
341
|
-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
|
342
|
-
<Compile Include="**\*.net.cs" Link="platform\net\%(Filename)%(Extension)" />
|
|
343
|
-
</ItemGroup>
|
|
344
|
-
|
|
345
|
-
<ItemGroup Condition="$(TargetFramework.StartsWith('monoandroid'))">
|
|
346
|
-
<Compile Include="**\*.android.cs" Link="platform\android\%(Filename)%(Extension)" />
|
|
347
|
-
</ItemGroup>
|
|
348
|
-
|
|
349
|
-
<ItemGroup Condition="$(TargetFramework.StartsWith('xamarinios')) ">
|
|
350
|
-
<Compile Include="**\*.ios.cs" Link="platform\ios\%(Filename)%(Extension)" />
|
|
351
|
-
</ItemGroup>
|
|
352
|
-
|
|
353
|
-
<ItemGroup>
|
|
354
|
-
<LicenseFile Include="$(OnnxRuntimeCsharpRoot)\..\LICENSE" Visible="false" />
|
|
355
|
-
<TargetsFile Include="$(OnnxRuntimeCsharpRoot)\src\Microsoft.ML.OnnxRuntime\targets\netstandard\targets.xml" Visible="false" />
|
|
356
|
-
</ItemGroup>
|
|
357
|
-
|
|
358
|
-
<Target Name="CopyMiscFiles" BeforeTargets="PreBuildEvent">
|
|
359
|
-
<Copy SourceFiles="@(LicenseFile)" DestinationFiles="@(LicenseFile->'$(OnnxRuntimeCsharpRoot)\..\%(Filename).txt')" />
|
|
360
|
-
<Copy SourceFiles="@(TargetsFile)" DestinationFiles="@(TargetsFile->'$(OnnxRuntimeCsharpRoot)\src\Microsoft.ML.OnnxRuntime\targets\netstandard\$(PackageId).targets')" />
|
|
361
|
-
</Target>
|
|
362
|
-
|
|
363
|
-
<Target Name="CopyPackage" AfterTargets="Pack">
|
|
364
|
-
<Copy
|
|
365
|
-
SourceFiles="$(OutputPath)\$(PackageId).$(PackageVersion).nupkg"
|
|
366
|
-
DestinationFolder="$(NativeBuildOutputDir)"
|
|
367
|
-
/>
|
|
368
|
-
</Target>
|
|
369
|
-
|
|
370
|
-
</Project>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
3
|
-
# Visual Studio Version 16
|
|
4
|
-
VisualStudioVersion = 16.0.810.7
|
|
5
|
-
MinimumVisualStudioVersion = 10.0.40219.1
|
|
6
|
-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime", "Microsoft.ML.OnnxRuntime.csproj", "{48FA3117-6599-475D-AE7A-1EE0FB9815D3}"
|
|
7
|
-
EndProject
|
|
8
|
-
Global
|
|
9
|
-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
10
|
-
Debug|Any CPU = Debug|Any CPU
|
|
11
|
-
Release|Any CPU = Release|Any CPU
|
|
12
|
-
EndGlobalSection
|
|
13
|
-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
14
|
-
{48FA3117-6599-475D-AE7A-1EE0FB9815D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
15
|
-
{48FA3117-6599-475D-AE7A-1EE0FB9815D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
16
|
-
{48FA3117-6599-475D-AE7A-1EE0FB9815D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
17
|
-
{48FA3117-6599-475D-AE7A-1EE0FB9815D3}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
18
|
-
EndGlobalSection
|
|
19
|
-
GlobalSection(SolutionProperties) = preSolution
|
|
20
|
-
HideSolutionNode = FALSE
|
|
21
|
-
EndGlobalSection
|
|
22
|
-
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
23
|
-
SolutionGuid = {B2154F36-BE1A-469B-92C1-3365E65F26F8}
|
|
24
|
-
EndGlobalSection
|
|
25
|
-
EndGlobal
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemGroup Condition=" '$(AndroidApplication)'=='true' ">
|
|
4
|
-
<AndroidLibrary Include="$(MSBuildThisFileDirectory)..\..\runtimes\android\native\*">
|
|
5
|
-
<Link>%(Filename)%(Extension)</Link>
|
|
6
|
-
</AndroidLibrary>
|
|
7
|
-
</ItemGroup>
|
|
8
|
-
</Project>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemGroup Condition=" '$(AndroidApplication)'=='true' ">
|
|
4
|
-
<AndroidLibrary Bind="false" Include="$(MSBuildThisFileDirectory)..\..\runtimes\android\native\*">
|
|
5
|
-
<Link>%(Filename)%(Extension)</Link>
|
|
6
|
-
</AndroidLibrary>
|
|
7
|
-
</ItemGroup>
|
|
8
|
-
</Project>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
|
|
4
|
-
<NativeReference Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime.xcframework">
|
|
5
|
-
<Kind>Static</Kind>
|
|
6
|
-
<IsCxx>True</IsCxx>
|
|
7
|
-
<SmartLink>True</SmartLink>
|
|
8
|
-
<ForceLoad>True</ForceLoad>
|
|
9
|
-
<LinkerFlags>-lc++</LinkerFlags>
|
|
10
|
-
<WeakFrameworks>CoreML</WeakFrameworks>
|
|
11
|
-
</NativeReference>
|
|
12
|
-
</ItemGroup>
|
|
13
|
-
</Project>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
|
|
4
|
-
<NativeReference Condition="'$(Platform)' == 'arm64'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx.10.14-arm64\native\libonnxruntime.dylib">
|
|
5
|
-
<Kind>Framework</Kind>
|
|
6
|
-
<IsCxx>True</IsCxx>
|
|
7
|
-
<SmartLink>True</SmartLink>
|
|
8
|
-
<ForceLoad>True</ForceLoad>
|
|
9
|
-
<LinkerFlags>-lc++</LinkerFlags>
|
|
10
|
-
<WeakFrameworks>CoreML</WeakFrameworks>
|
|
11
|
-
</NativeReference>
|
|
12
|
-
<NativeReference Condition="'$(Platform)' == 'x64'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx.10.14-x64\native\libonnxruntime.dylib">
|
|
13
|
-
<Kind>Framework</Kind>
|
|
14
|
-
<IsCxx>True</IsCxx>
|
|
15
|
-
<SmartLink>True</SmartLink>
|
|
16
|
-
<ForceLoad>True</ForceLoad>
|
|
17
|
-
<LinkerFlags>-lc++</LinkerFlags>
|
|
18
|
-
<WeakFrameworks>CoreML</WeakFrameworks>
|
|
19
|
-
</NativeReference>
|
|
20
|
-
</ItemGroup>
|
|
21
|
-
</Project>
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
|
|
4
|
-
<ItemDefinitionGroup>
|
|
5
|
-
<ClCompile>
|
|
6
|
-
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
7
|
-
</ClCompile>
|
|
8
|
-
<ResourceCompile>
|
|
9
|
-
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
10
|
-
</ResourceCompile>
|
|
11
|
-
</ItemDefinitionGroup>
|
|
12
|
-
|
|
13
|
-
<ItemDefinitionGroup Condition="'$(PlatformTarget)' == 'ARM64'">
|
|
14
|
-
<Link>
|
|
15
|
-
<AdditionalDependencies>$(MSBuildThisFileDirectory)../../runtimes/win-arm64/native/onnxruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
16
|
-
</Link>
|
|
17
|
-
</ItemDefinitionGroup>
|
|
18
|
-
|
|
19
|
-
<ItemDefinitionGroup Condition="'$(PlatformTarget)' == 'ARM'">
|
|
20
|
-
<Link>
|
|
21
|
-
<AdditionalDependencies>$(MSBuildThisFileDirectory)../../runtimes/win-arm/native/onnxruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
22
|
-
</Link>
|
|
23
|
-
</ItemDefinitionGroup>
|
|
24
|
-
|
|
25
|
-
<ItemDefinitionGroup Condition="'$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')">
|
|
26
|
-
<Link>
|
|
27
|
-
<AdditionalDependencies>$(MSBuildThisFileDirectory)../../runtimes/win-x64/native/onnxruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
28
|
-
</Link>
|
|
29
|
-
</ItemDefinitionGroup>
|
|
30
|
-
|
|
31
|
-
<ItemDefinitionGroup Condition="'$(PlatformTarget)' == 'x86' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' == 'true')">
|
|
32
|
-
<Link>
|
|
33
|
-
<AdditionalDependencies>$(MSBuildThisFileDirectory)../../runtimes/win-x86/native/onnxruntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
34
|
-
</Link>
|
|
35
|
-
</ItemDefinitionGroup>
|
|
36
|
-
|
|
37
|
-
<PropertyGroup>
|
|
38
|
-
<EnginePlatform Condition="'$(Platform)' == 'Win32'">x86</EnginePlatform>
|
|
39
|
-
<EnginePlatform Condition="'$(Platform)' == 'ARM64'">arm64</EnginePlatform>
|
|
40
|
-
<EnginePlatform Condition="'$(Platform)' == 'ARM'">arm</EnginePlatform>
|
|
41
|
-
<EnginePlatform Condition="'$(Platform)' != 'Win32' AND '$(Platform)' != 'ARM64'">$(Platform)</EnginePlatform>
|
|
42
|
-
</PropertyGroup>
|
|
43
|
-
|
|
44
|
-
<PropertyGroup>
|
|
45
|
-
<OnnxRuntimeBinary>$(MSBuildThisFileDirectory)..\..\runtimes\win-$(EnginePlatform)\native\onnxruntime.dll</OnnxRuntimeBinary>
|
|
46
|
-
</PropertyGroup>
|
|
47
|
-
|
|
48
|
-
<!-- Assume apps using the Microsoft.ML.OnnxRuntime.DirectML package only want the DirectML binaries (no need for a build dependency). -->
|
|
49
|
-
<PropertyGroup Label="Globals" Condition="Exists('$(MSBuildThisFileDirectory)include\dml_provider_factory.h')">
|
|
50
|
-
<Microsoft_AI_DirectML_SkipDebugLayerCopy>true</Microsoft_AI_DirectML_SkipDebugLayerCopy>
|
|
51
|
-
<Microsoft_AI_DirectML_SkipLink>true</Microsoft_AI_DirectML_SkipLink>
|
|
52
|
-
<Microsoft_AI_DirectML_SkipIncludeDir>true</Microsoft_AI_DirectML_SkipIncludeDir>
|
|
53
|
-
</PropertyGroup>
|
|
54
|
-
|
|
55
|
-
<ItemGroup>
|
|
56
|
-
<!-- x64 -->
|
|
57
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime.dll"
|
|
58
|
-
Condition="'$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')">
|
|
59
|
-
<Link>onnxruntime.dll</Link>
|
|
60
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
61
|
-
<Visible>false</Visible>
|
|
62
|
-
</None>
|
|
63
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_shared.dll"
|
|
64
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
65
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_shared.dll')">
|
|
66
|
-
<Link>onnxruntime_providers_shared.dll</Link>
|
|
67
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
68
|
-
<Visible>false</Visible>
|
|
69
|
-
</None>
|
|
70
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_cuda.dll"
|
|
71
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
72
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_cuda.dll')">
|
|
73
|
-
<Link>onnxruntime_providers_cuda.dll</Link>
|
|
74
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
75
|
-
<Visible>false</Visible>
|
|
76
|
-
</None>
|
|
77
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_dnnl.dll"
|
|
78
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
79
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_dnnl.dll')">
|
|
80
|
-
<Link>onnxruntime_providers_dnnl.dll</Link>
|
|
81
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
82
|
-
<Visible>false</Visible>
|
|
83
|
-
</None>
|
|
84
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_tensorrt.dll"
|
|
85
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
86
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_tensorrt.dll')">
|
|
87
|
-
<Link>onnxruntime_providers_tensorrt.dll</Link>
|
|
88
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
89
|
-
<Visible>false</Visible>
|
|
90
|
-
</None>
|
|
91
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_openvino.dll"
|
|
92
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
93
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\onnxruntime_providers_openvino.dll')">
|
|
94
|
-
<Link>onnxruntime_providers_openvino.dll</Link>
|
|
95
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
96
|
-
<Visible>false</Visible>
|
|
97
|
-
</None>
|
|
98
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\dnnl.dll"
|
|
99
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
100
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\dnnl.dll')">
|
|
101
|
-
<Link>dnnl.dll</Link>
|
|
102
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
103
|
-
<Visible>false</Visible>
|
|
104
|
-
</None>
|
|
105
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\mklml.dll"
|
|
106
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
107
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\mklml.dll')">
|
|
108
|
-
<Link>mklml.dll</Link>
|
|
109
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
110
|
-
<Visible>false</Visible>
|
|
111
|
-
</None>
|
|
112
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\libiomp5md.dll"
|
|
113
|
-
Condition="('$(PlatformTarget)' == 'x64' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' != 'true')) AND
|
|
114
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\libiomp5md.dll')">
|
|
115
|
-
<Link>libiomp5md.dll</Link>
|
|
116
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
117
|
-
<Visible>false</Visible>
|
|
118
|
-
</None>
|
|
119
|
-
|
|
120
|
-
<!-- arm64 -->
|
|
121
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm64\native\onnxruntime.dll"
|
|
122
|
-
Condition="'$(PlatformTarget)' == 'ARM64'">
|
|
123
|
-
<Link>onnxruntime.dll</Link>
|
|
124
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
125
|
-
<Visible>false</Visible>
|
|
126
|
-
</None>
|
|
127
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm64\native\onnxruntime_providers_shared.dll"
|
|
128
|
-
Condition="'$(PlatformTarget)' == 'ARM64' AND
|
|
129
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-arm64\native\onnxruntime_providers_shared.dll')">
|
|
130
|
-
<Link>onnxruntime_providers_shared.dll</Link>
|
|
131
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
132
|
-
<Visible>false</Visible>
|
|
133
|
-
</None>
|
|
134
|
-
|
|
135
|
-
<!-- arm -->
|
|
136
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm\native\onnxruntime.dll"
|
|
137
|
-
Condition="'$(PlatformTarget)' == 'ARM'">
|
|
138
|
-
<Link>onnxruntime.dll</Link>
|
|
139
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
140
|
-
<Visible>false</Visible>
|
|
141
|
-
</None>
|
|
142
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm\native\onnxruntime_providers_shared.dll"
|
|
143
|
-
Condition="'$(PlatformTarget)' == 'ARM' AND
|
|
144
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-arm\native\onnxruntime_providers_shared.dll')">
|
|
145
|
-
<Link>onnxruntime_providers_shared.dll</Link>
|
|
146
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
147
|
-
<Visible>false</Visible>
|
|
148
|
-
</None>
|
|
149
|
-
|
|
150
|
-
<!-- x86 -->
|
|
151
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\onnxruntime.dll"
|
|
152
|
-
Condition="('$(PlatformTarget)' == 'x86' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' == 'true'))">
|
|
153
|
-
<Link>onnxruntime.dll</Link>
|
|
154
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
155
|
-
<Visible>false</Visible>
|
|
156
|
-
</None>
|
|
157
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\dnnl.dll"
|
|
158
|
-
Condition="('$(PlatformTarget)' == 'x86' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' == 'true')) AND
|
|
159
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\dnnl.dll')">
|
|
160
|
-
<Link>dnnl.dll</Link>
|
|
161
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
162
|
-
<Visible>false</Visible>
|
|
163
|
-
</None>
|
|
164
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\mklml.dll"
|
|
165
|
-
Condition="('$(PlatformTarget)' == 'x86' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' == 'true')) AND
|
|
166
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\mklml.dll')">
|
|
167
|
-
<Link>mklml.dll</Link>
|
|
168
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
169
|
-
<Visible>false</Visible>
|
|
170
|
-
</None>
|
|
171
|
-
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\libiomp5md.dll"
|
|
172
|
-
Condition="('$(PlatformTarget)' == 'x86' OR ('$(PlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' == 'true')) AND
|
|
173
|
-
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\libiomp5md.dll')">
|
|
174
|
-
<Link>libiomp5md.dll</Link>
|
|
175
|
-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
176
|
-
<Visible>false</Visible>
|
|
177
|
-
</None>
|
|
178
|
-
</ItemGroup>
|
|
179
|
-
</Project>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<Target Name="Microsoft_ML_OnnxRuntime_CheckPrerequisites" BeforeTargets="BeforeBuild">
|
|
4
|
-
<!--
|
|
5
|
-
Special case .NET Core portable applications. When building a portable .NET Core app,
|
|
6
|
-
the PlatformTarget is empty, and you don't know until runtime (i.e. which dotnet.exe)
|
|
7
|
-
what processor architecture will be used.
|
|
8
|
-
-->
|
|
9
|
-
<Error Condition="('$(PlatformTarget)' != 'x64' AND '$(PlatformTarget)' != 'arm32' AND '$(PlatformTarget)' != 'arm64' AND '$(PlatformTarget)' != 'x86' AND '$(PlatformTarget)' != 'AnyCPU') AND
|
|
10
|
-
('$(OutputType)' == 'Exe' OR '$(OutputType)'=='WinExe') AND
|
|
11
|
-
!('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(PlatformTarget)' == '') AND
|
|
12
|
-
('$(TargetFrameworkIdentifier)' != 'Xamarin.iOS' AND
|
|
13
|
-
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'ios') AND
|
|
14
|
-
'$(SuppressOnnxRuntimePlatformCompatibilityError)' != 'true'"
|
|
15
|
-
Text="Microsoft.ML.OnnxRuntime only supports the AnyCPU, x64, arm32, arm64 and x86 platforms at this time."/>
|
|
16
|
-
</Target>
|
|
17
|
-
</Project>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
|
|
4
|
-
<NativeReference Condition="'$(Platform)' == 'iPhoneSimulator'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime.xcframework\ios-arm64_x86_64-simulator\onnxruntime.framework">
|
|
5
|
-
<Kind>Framework</Kind>
|
|
6
|
-
<IsCxx>True</IsCxx>
|
|
7
|
-
<SmartLink>True</SmartLink>
|
|
8
|
-
<ForceLoad>True</ForceLoad>
|
|
9
|
-
<LinkerFlags>-lc++</LinkerFlags>
|
|
10
|
-
<WeakFrameworks>CoreML</WeakFrameworks>
|
|
11
|
-
</NativeReference>
|
|
12
|
-
<NativeReference Condition="'$(Platform)' == 'iPhone'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime.xcframework\ios-arm64\onnxruntime.framework">
|
|
13
|
-
<Kind>Framework</Kind>
|
|
14
|
-
<IsCxx>True</IsCxx>
|
|
15
|
-
<SmartLink>True</SmartLink>
|
|
16
|
-
<ForceLoad>True</ForceLoad>
|
|
17
|
-
<LinkerFlags>-lc++</LinkerFlags>
|
|
18
|
-
<WeakFrameworks>CoreML</WeakFrameworks>
|
|
19
|
-
</NativeReference>
|
|
20
|
-
</ItemGroup>
|
|
21
|
-
</Project>
|