From 049ba2d74701f8ce3683b0a0d270112e0374dadb Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Mon, 15 Apr 2019 15:57:48 -0700 Subject: [PATCH] Exclude tests that fail when contrib ops are disabled. (#835) --- onnxruntime/test/optimizer/graph_transform_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/onnxruntime/test/optimizer/graph_transform_test.cc b/onnxruntime/test/optimizer/graph_transform_test.cc index 932fcb899b..dd87a9672f 100644 --- a/onnxruntime/test/optimizer/graph_transform_test.cc +++ b/onnxruntime/test/optimizer/graph_transform_test.cc @@ -148,6 +148,7 @@ TEST(GraphTransformationTests, FuseConvBNMulAddUnsqueeze) { } } +#ifndef DISABLE_CONTRIB_OPS TEST(GraphTransformationTests, FuseConvActivation) { std::unordered_map model_to_op_name{{"fusion/conv_relu.onnx", "Relu"}, {"fusion/conv_sigmoid.onnx", "Sigmoid"}, @@ -172,6 +173,7 @@ TEST(GraphTransformationTests, FuseConvActivation) { ASSERT_TRUE(op_to_count[model.second] == 0); } } +#endif TEST(GraphTransformationTests, FuseConvMulNoBias) { string model_uri = MODEL_FOLDER + "fusion/fuse-conv-mul-no-bias.onnx"; @@ -269,6 +271,7 @@ TEST(GraphTransformationTests, MatMulAddFusion_three_input) { ASSERT_TRUE(op_to_count["Gemm"] == 1); } +#ifndef DISABLE_CONTRIB_OPS TEST(GraphTransformationTests, Gemm_Relu_three_input) { string model_uri = MODEL_FOLDER + "matmul_add_fusion/3Input/gemm_relu.onnx"; @@ -283,6 +286,7 @@ TEST(GraphTransformationTests, Gemm_Relu_three_input) { std::map op_to_count = CountOpsInGraph(graph); ASSERT_TRUE(op_to_count["Relu"] == 0); } +#endif TEST(GraphTransformationTests, FuseConvBnAddMulFloat16) { string model_uri = MODEL_FOLDER + "fusion/fuse-conv-bn-add-mul-float16.onnx";