From 06e0f7e3e7f8f9be4c72e93db495e6d09aa3e532 Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Sat, 27 Apr 2019 00:41:26 -0700 Subject: [PATCH] Minor changes to support inclusion of x86 bits in the Nuget packaging pipeline (#916) * initial commit * More changes * More changes * Adding stuff back to the targets xml * More changes v3 * More changes v4 * More changes v5 * More changes v6 * More changes v7 * More changes v9 * Disable CSharp tests for now * More changes * Revert file to same status * Update props file for x86 * Change to usage of TargetArchitecture instead of PlatformTarget * Update targets.xml * Minor formatting nit fix * Update based on PR comments --- .../Microsoft.ML.OnnxRuntime.csproj | 15 ++++---- csharp/src/Microsoft.ML.OnnxRuntime/props.xml | 37 ++++++++++++++++++- .../src/Microsoft.ML.OnnxRuntime/targets.xml | 6 +-- .../Microsoft.ML.OnnxRuntime.PerfTool.csproj | 1 - .../Program.cs | 4 +- 5 files changed, 48 insertions(+), 15 deletions(-) diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj index e11525de29..d6cd8de095 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj +++ b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj @@ -12,7 +12,8 @@ ..\.. $(OnnxRuntimeCsharpRoot)\..\build\Windows $(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration) - + x64 + Microsoft.ML.OnnxRuntime Microsoft @@ -40,41 +41,41 @@ Visible="false" /> - + $(MSBuildThisFileDirectory)../../runtimes/win-x64/native/onnxruntime.lib + + + $(MSBuildThisFileDirectory)../../runtimes/win-x86/native/onnxruntime.lib + + + - onnxruntime.dll + onnxruntime.dll PreserveNewest false @@ -46,5 +52,32 @@ PreserveNewest false + + onnxruntime.dll + PreserveNewest + false + + + mkldnn.dll + PreserveNewest + false + + + mklml.dll + PreserveNewest + false + + + libiomp5md.dll + PreserveNewest + false + diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/targets.xml b/csharp/src/Microsoft.ML.OnnxRuntime/targets.xml index c4829504ed..e68bd37fac 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/targets.xml +++ b/csharp/src/Microsoft.ML.OnnxRuntime/targets.xml @@ -1,16 +1,16 @@ - - + Text="Microsoft.ML.OnnxRuntime only supports the AnyCPU, x64, and x86 platforms at this time."/> diff --git a/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Microsoft.ML.OnnxRuntime.PerfTool.csproj b/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Microsoft.ML.OnnxRuntime.PerfTool.csproj index 7d167dd064..07ebb0e2a5 100644 --- a/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Microsoft.ML.OnnxRuntime.PerfTool.csproj +++ b/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Microsoft.ML.OnnxRuntime.PerfTool.csproj @@ -33,7 +33,6 @@ - diff --git a/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Program.cs b/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Program.cs index ee77e5f484..0e9915ad66 100644 --- a/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Program.cs +++ b/csharp/tools/Microsoft.ML.OnnxRuntime.PerfTool/Program.cs @@ -43,10 +43,10 @@ namespace Microsoft.ML.OnnxRuntime.PerfTool var cmdOptions = Parser.Default.ParseArguments(args); cmdOptions.WithParsed( options => { - Main(options); + Run(options); }); } - public static void Main(CommandOptions options) + public static void Run(CommandOptions options) { string modelPath = options.ModelFile; string inputPath = options.InputFile;