Skip to content

Commit

Permalink
Update OnnxRuntime to latest version. (dotnet#4337)
Browse files Browse the repository at this point in the history
* Update OnnxRuntime to latest version.

OnnxRuntime supports win-x86, so start running tests on the win-x86 leg.

* Update README - ONNX is supported on 32-bit.

* Consolidate "is onnx runtime supported" logic in the tests.
  • Loading branch information
eerhardt authored Oct 17, 2019
1 parent a54a431 commit d871655
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ There a list of short videos each one focusing on a particular single topic of M

ML.NET runs on Windows, Linux, and macOS using [.NET Core](https://github.com/dotnet/core), or Windows using .NET Framework.

64 bit is supported on all platforms. 32 bit is supported on Windows, except for TensorFlow, LightGBM, and ONNX related functionality.
64 bit is supported on all platforms. 32 bit is supported on Windows, except for TensorFlow and LightGBM related functionality.

## ML.NET Nuget packages status

Expand Down
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.5.1</GoogleProtobufPackageVersion>
<LightGBMPackageVersion>2.2.3</LightGBMPackageVersion>
<MicrosoftExtensionsPackageVersion>2.1.0</MicrosoftExtensionsPackageVersion>
<MicrosoftMLOnnxRuntimePackageVersion>0.4.0</MicrosoftMLOnnxRuntimePackageVersion>
<MicrosoftMLOnnxRuntimePackageVersion>0.5.1</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 @@ -12,14 +12,18 @@ namespace Microsoft.ML.TestFramework.Attributes
/// </summary>
public sealed class OnnxFactAttribute : EnvironmentSpecificFactAttribute
{
public OnnxFactAttribute() : base("Onnx is 64-bit Windows only")
public OnnxFactAttribute() : base("Onnx is not supported on Linux with libc < v2.23")
{
}

/// <inheritdoc />
protected override bool IsEnvironmentSupported()
{
return Environment.Is64BitProcess && (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23)));
return IsOnnxRuntimeSupported;
}

public static bool IsOnnxRuntimeSupported { get; } =
!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
|| AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23));
}
}
2 changes: 1 addition & 1 deletion test/Microsoft.ML.Tests/OnnxConversionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public OnnxConversionTest(ITestOutputHelper output) : base(output)

private bool IsOnnxRuntimeSupported()
{
return Environment.Is64BitProcess && (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new System.Version(2, 23)));
return OnnxFactAttribute.IsOnnxRuntimeSupported;
}

/// <summary>
Expand Down

0 comments on commit d871655

Please sign in to comment.