diff --git a/onnxruntime/test/contrib_ops/tensor_op_test.cc b/onnxruntime/test/contrib_ops/tensor_op_test.cc index bc2ff5f4f724d..2922e6517943e 100644 --- a/onnxruntime/test/contrib_ops/tensor_op_test.cc +++ b/onnxruntime/test/contrib_ops/tensor_op_test.cc @@ -121,7 +121,12 @@ void MeanVarianceNormalizationAcrossChannels(bool across_channels, bool normaliz test.AddAttribute("normalize_variance", normalize_variance ? one : zero); test.AddInput("input", {N, C, H, W}, X); test.AddOutput("output", {N, C, H, W}, result); - test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kOpenVINOExecutionProvider, kTensorrtExecutionProvider}); // OpenVINO doesn't support MVN operator below opset 9. TensorRT doesn't support opset 8 of MVN operator. + // DML currently has known failures in this 4D MVN coverage. + // See https://github.com/microsoft/onnxruntime/issues/27933 and remove this exclusion once + // that issue is fixed. OpenVINO does not support MVN below opset 9. TensorRT does not + // support MVN opset 8. + test.Run(OpTester::ExpectResult::kExpectSuccess, "", + {kDmlExecutionProvider, kOpenVINOExecutionProvider, kTensorrtExecutionProvider}); } void MeanVarianceNormalizationPerChannel(bool across_channels, bool normalize_variance) { @@ -188,7 +193,12 @@ void MeanVarianceNormalizationPerChannel(bool across_channels, bool normalize_va test.AddAttribute("normalize_variance", normalize_variance ? one : zero); test.AddInput("input", {N, C, H, W}, X); test.AddOutput("output", {N, C, H, W}, result); - test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kOpenVINOExecutionProvider, kTensorrtExecutionProvider}); // OpenVINO doesn't support MVN operator below opset 9. TensorRT doesn't support opset 8 of MVN operator. + // OpenVINO does not support MVN below opset 9. TensorRT does not support MVN opset 8. + // DML currently has known failures in this 4D MVN coverage. + // See https://github.com/microsoft/onnxruntime/issues/27933 and remove this exclusion once + // that issue is fixed. + test.Run(OpTester::ExpectResult::kExpectSuccess, "", + {kDmlExecutionProvider, kOpenVINOExecutionProvider, kTensorrtExecutionProvider}); } TEST(MVNContribOpTest, MeanVarianceNormalizationCPUTest_Version1_TO_8) { diff --git a/onnxruntime/test/providers/cpu/tensor/mean_variance_normalization_test.cc b/onnxruntime/test/providers/cpu/tensor/mean_variance_normalization_test.cc index 8dcb15cbc6926..2d688dc32299e 100644 --- a/onnxruntime/test/providers/cpu/tensor/mean_variance_normalization_test.cc +++ b/onnxruntime/test/providers/cpu/tensor/mean_variance_normalization_test.cc @@ -69,7 +69,10 @@ TEST(MeanVarianceNormalizationTest, DefaultAxes) { OpTester test("MeanVarianceNormalization", 9); test.AddInput("input", {N, C, H, W}, X); test.AddOutput("output", {N, C, H, W}, result); - test.Run(); + // DML currently has known failures in this 4D default-axes MVN coverage. + // See https://github.com/microsoft/onnxruntime/issues/27933 and remove this exclusion once + // that issue is fixed. + test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kDmlExecutionProvider}); } static void TestMeanVarianceNormalizationOverAllAxes(const std::vector& shape) { @@ -90,7 +93,14 @@ static void TestMeanVarianceNormalizationOverAllAxes(const std::vector& test.AddInput("input", shape, X); test.AddOutput("output", shape, Y); - test.Run(); + if (shape.size() == 4) { + // Restrict the DML exclusion to the known failing 4D all-axes coverage. + // See https://github.com/microsoft/onnxruntime/issues/27933 and remove this exclusion once + // that issue is fixed. + test.Run(OpTester::ExpectResult::kExpectSuccess, "", {kDmlExecutionProvider}); + } else { + test.Run(); + } } TEST(MeanVarianceNormalizationTest, AllAxes) { @@ -157,6 +167,7 @@ TEST(MeanVarianceNormalizationTest, AxesSubsets5D) { test.AddOutput("output", shape, Y.data(), Y.size()); if (DefaultDmlExecutionProvider().get() != nullptr) { + // 5D subset-axis coverage stays enabled for DML. test.SetOutputTolerance(0.001f); }