Skip to content

Commit d871655

Browse files
authored
Update OnnxRuntime to latest version. (#4337)
* 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.
1 parent a54a431 commit d871655

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ There a list of short videos each one focusing on a particular single topic of M
4040

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

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

4545
## ML.NET Nuget packages status
4646

build/Dependencies.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<GoogleProtobufPackageVersion>3.5.1</GoogleProtobufPackageVersion>
1717
<LightGBMPackageVersion>2.2.3</LightGBMPackageVersion>
1818
<MicrosoftExtensionsPackageVersion>2.1.0</MicrosoftExtensionsPackageVersion>
19-
<MicrosoftMLOnnxRuntimePackageVersion>0.4.0</MicrosoftMLOnnxRuntimePackageVersion>
19+
<MicrosoftMLOnnxRuntimePackageVersion>0.5.1</MicrosoftMLOnnxRuntimePackageVersion>
2020
<MlNetMklDepsPackageVersion>0.0.0.9</MlNetMklDepsPackageVersion>
2121
<ParquetDotNetPackageVersion>2.1.3</ParquetDotNetPackageVersion>
2222
<SystemDrawingCommonPackageVersion>4.5.0</SystemDrawingCommonPackageVersion>

test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ namespace Microsoft.ML.TestFramework.Attributes
1212
/// </summary>
1313
public sealed class OnnxFactAttribute : EnvironmentSpecificFactAttribute
1414
{
15-
public OnnxFactAttribute() : base("Onnx is 64-bit Windows only")
15+
public OnnxFactAttribute() : base("Onnx is not supported on Linux with libc < v2.23")
1616
{
1717
}
1818

1919
/// <inheritdoc />
2020
protected override bool IsEnvironmentSupported()
2121
{
22-
return Environment.Is64BitProcess && (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23)));
22+
return IsOnnxRuntimeSupported;
2323
}
24+
25+
public static bool IsOnnxRuntimeSupported { get; } =
26+
!RuntimeInformation.IsOSPlatform(OSPlatform.Linux)
27+
|| AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23));
2428
}
2529
}

test/Microsoft.ML.Tests/OnnxConversionTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public OnnxConversionTest(ITestOutputHelper output) : base(output)
4343

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

4949
/// <summary>

0 commit comments

Comments
 (0)