diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/TestDataLoader.cs b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/TestDataLoader.cs index 1e44cfdf36..2086fa0ec3 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/TestDataLoader.cs +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/TestDataLoader.cs @@ -177,6 +177,10 @@ namespace Microsoft.ML.OnnxRuntime.Tests { return CreateNamedOnnxValueFromRawData(nodeName, tensor.RawData.ToArray(), sizeof(byte), intDims); } + else if (nodeMeta.ElementType == typeof(sbyte)) + { + return CreateNamedOnnxValueFromRawData(nodeName, tensor.RawData.ToArray(), sizeof(sbyte), intDims); + } else if (nodeMeta.ElementType == typeof(bool)) { return CreateNamedOnnxValueFromRawData(nodeName, tensor.RawData.ToArray(), sizeof(bool), intDims); @@ -192,7 +196,7 @@ namespace Microsoft.ML.OnnxRuntime.Tests else { //TODO: Add support for remaining types - throw new Exception($"Tensors of type {nameof(nodeMeta.ElementType)} not currently supporte in the LoadTensorFromEmbeddedResource"); + throw new Exception($"Tensors of type {nameof(nodeMeta.ElementType)} not currently supported in the LoadTensorFromEmbeddedResource"); } } diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs index 8599db8492..61ff2a43ff 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.NetCoreApp/InferenceTest.netcore.cs @@ -352,7 +352,6 @@ namespace Microsoft.ML.OnnxRuntime.Tests // unnecessary and fails as ORT support for Exp started at opset 6 (as ORT didn't exist until opset 7). { "test_softplus_example_expanded", "Not applicable"}, { "test_softplus_expanded", "Not applicable"}, - { "test_bitwise_or_i16_4d", "8bit test data is not support by C#"}, { "test_col2im_pads", "due to a typo in test data"}, { "test_optional_has_element_empty_optional_input", "C# API doesn't support optional input"}, { "test_optional_get_element_optional_tensor", "C# API doesn't support optional input"}, @@ -577,6 +576,10 @@ namespace Microsoft.ML.OnnxRuntime.Tests { Assert.Equal(result.AsTensor(), outputValue.AsTensor(), new ExactComparer()); } + else if (outputMeta.ElementType == typeof(sbyte)) + { + Assert.Equal(result.AsTensor(), outputValue.AsTensor(), new ExactComparer()); + } else if (outputMeta.ElementType == typeof(bool)) { Assert.Equal(result.AsTensor(), outputValue.AsTensor(), new ExactComparer());