Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
47ef905
Update Onnx version to 1.2
antoniovs1029 Mar 3, 2020
7f5c219
Added onnx 1.2 private feed
antoniovs1029 Mar 3, 2020
e09c233
Added dependencies to GPU package only
antoniovs1029 Mar 3, 2020
68e719f
Actually use gpuDeviceId when applying ONNX model
antoniovs1029 Mar 3, 2020
94e1967
Add gpuDeviceId parameters to OnnxConversionTests
antoniovs1029 Mar 3, 2020
c91dd19
Use OnnxRuntime.Managed in OnnxTransformer
antoniovs1029 Mar 4, 2020
5092119
Added AI Infra for ONNX 1.2 nightly nugets
antoniovs1029 Mar 4, 2020
75427b7
Added onnxruntime new references for experiment
antoniovs1029 Mar 4, 2020
45b5709
Updated ML.Tests dependency for experiment on CI
antoniovs1029 Mar 4, 2020
477bdfe
Reverted mistake I made in Directory.Build.props
antoniovs1029 Mar 5, 2020
0cc8006
Update ML.Samples dependency
antoniovs1029 Mar 5, 2020
081b91c
Update ort feed
antoniovs1029 Mar 5, 2020
fa5a2ce
Second experiment
antoniovs1029 Mar 5, 2020
2ecb7b5
Update ML.Test to depend on Onnxruntime (no GPU)
antoniovs1029 Mar 5, 2020
94741fe
Revert "Add gpuDeviceId parameters to OnnxConversionTests"
antoniovs1029 Mar 5, 2020
d4501a0
Update ORT feed
antoniovs1029 Mar 10, 2020
dd9f56d
Revert "Update ML.Test to depend on Onnxruntime (no GPU)"
antoniovs1029 Mar 10, 2020
68b5489
Revert "Revert "Add gpuDeviceId parameters to OnnxConversionTests""
antoniovs1029 Mar 10, 2020
60b899b
Revert "Revert "Update ML.Test to depend on Onnxruntime (no GPU)""
antoniovs1029 Mar 10, 2020
932d6ed
Revert "Revert "Revert "Add gpuDeviceId parameters to OnnxConversionT…
antoniovs1029 Mar 10, 2020
2f30fd5
Removed ORT custom feed
antoniovs1029 Mar 10, 2020
98c0dff
Removed whitespaces
antoniovs1029 Mar 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<GoogleProtobufPackageVersion>3.10.1</GoogleProtobufPackageVersion>
<LightGBMPackageVersion>2.2.3</LightGBMPackageVersion>
<MicrosoftExtensionsPackageVersion>2.1.0</MicrosoftExtensionsPackageVersion>
<MicrosoftMLOnnxRuntimePackageVersion>1.1.2</MicrosoftMLOnnxRuntimePackageVersion>
<MicrosoftMLOnnxRuntimePackageVersion>1.2</MicrosoftMLOnnxRuntimePackageVersion>
<MlNetMklDepsPackageVersion>0.0.0.9</MlNetMklDepsPackageVersion>
<ParquetDotNetPackageVersion>2.1.3</ParquetDotNetPackageVersion>
<SystemDrawingCommonPackageVersion>4.5.0</SystemDrawingCommonPackageVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemGroup>
<ProjectReference Include="../Microsoft.ML/Microsoft.ML.nupkgproj" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimePackageVersion)"/>
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed" Version="$(MicrosoftMLOnnxRuntimePackageVersion)"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<ProjectReference Include="..\Microsoft.ML.Core\Microsoft.ML.Core.csproj" />
<ProjectReference Include="..\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimePackageVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime.Managed" Version="$(MicrosoftMLOnnxRuntimePackageVersion)" />
<PackageReference Include="Google.Protobuf" Version="$(GoogleProtobufPackageVersion)" />
</ItemGroup>

Expand Down
16 changes: 13 additions & 3 deletions src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,19 @@ public OnnxModel(string modelFile, int? gpuDeviceId = null, bool fallbackToCpu =

if (gpuDeviceId != null)
{
// The onnxruntime v1.0 currently does not support running on the GPU on all of ML.NET's supported platforms.
// This code path will be re-enabled when there is appropriate support in onnxruntime
throw new NotSupportedException("Running Onnx models on a GPU is temporarily not supported!");
try
{
_session = new InferenceSession(modelFile,
SessionOptions.MakeSessionOptionWithCudaProvider(gpuDeviceId.Value));
}
catch(OnnxRuntimeException)
{
if (fallbackToCpu)
_session = new InferenceSession(modelFile);
else
// If called from OnnxTransform, is caught and rethrown
throw;
}
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ML.Onnx.TestModels" Version="$(MicrosoftMLOnnxTestModelsVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions test/Microsoft.ML.Tests/Microsoft.ML.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<PackageReference Include="Microsoft.ML.TestModels" Version="$(MicrosoftMLTestModelsPackageVersion)" />
<PackageReference Include="SciSharp.TensorFlow.Redist" Version="$(TensorFlowVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(MicrosoftMLOnnxRuntimePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down