update onnx to latest commit (#1622)

* update onnx to latest commit

* Disable and/or fix failing tests

* disable not yet implemented tests for opset 11

* disable tests

* fix bug in mkldnn fp16 graph check
This commit is contained in:
Ashwini Khade 2019-08-15 17:10:32 -07:00 committed by GitHub
parent 1835640d94
commit 0044be6259
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 55 additions and 9 deletions

View file

@ -49,7 +49,7 @@
"component":{
"type":"git",
"git": {
"commitHash": "65b8e0f9979fbade16e3becbdfa69c0764946f72",
"commitHash": "7d90796473295ca3cdf976ed772215c5980ad3e0",
"repositoryUrl": "https://github.com/onnx/onnx.git"
}
}

2
cmake/external/onnx vendored

@ -1 +1 @@
Subproject commit 65b8e0f9979fbade16e3becbdfa69c0764946f72
Subproject commit 7d90796473295ca3cdf976ed772215c5980ad3e0

View file

@ -101,7 +101,7 @@ bool MKLDNNExecutionProvider::UseSubgraph(const onnxruntime::GraphViewer& graph_
index++;
node = graph_viewer.GetNode(index);
}
if (node->InputDefs()[0]->Type() != nullptr)
if (!node->InputDefs().empty() && node->InputDefs()[0]->Type() != nullptr)
FP16_graph = node->InputDefs()[0]->Type()->find("16") != std::string::npos;
}

View file

@ -162,7 +162,7 @@ class PlannerTest : public ::testing::Test {
public:
PlannerTest() : model_("test"), graph_{model_.MainGraph()}, state_{execution_providers_, false} {
std_kernel_ = KernelDefBuilder().SetName("Transpose").Build();
in_place_kernel_ = KernelDefBuilder().SetName("Clip").MayInplace(0, 0).Build();
in_place_kernel_ = KernelDefBuilder().SetName("Relu").MayInplace(0, 0).Build();
CPUExecutionProviderInfo epi;
auto execution_provider = std::make_unique<CPUExecutionProvider>(epi);
execution_providers_.Add("CPUExecutionProvider", std::move(execution_provider));

View file

@ -43,7 +43,7 @@ TEST(ExecutionFrameTest, TensorAllocationTest) {
tensor_float.mutable_tensor_type()->set_elem_type(TensorProto_DataType_FLOAT);
onnxruntime::NodeArg input_def("X", &tensor_float), output_def("Y", &tensor_float);
graph.AddNode("node1", "Clip", "Clip operator", ArgMap{&input_def}, ArgMap{&output_def});
graph.AddNode("node1", "Relu", "Relu operator", ArgMap{&input_def}, ArgMap{&output_def});
onnxruntime::Node* node = graph.GetNode(graph.NumberOfNodes() - 1);
Status status = graph.Resolve();

View file

@ -377,7 +377,38 @@ int real_main(int argc, char* argv[], Ort::Env& env) {
{"shrink", "test case is wrong", {"onnx141"}},
{"maxpool_with_argmax_2d_precomputed_strides", "ShapeInferenceError"},
{"tf_inception_v2", "result mismatch"},
{"mxnet_arcface", "result mismatch"}
{"mxnet_arcface", "result mismatch"},
{"dynamicquantizelinear", "not implemented yet"},
{"dynamicquantizelinear_expanded", "not implemented yet"},
{"dynamicquantizelinear_max_adjusted", "not implemented yet"},
{"dynamicquantizelinear_max_adjusted_expanded", "not implemented yet"},
{"dynamicquantizelinear_min_adjusted", "not implemented yet"},
{"dynamicquantizelinear_min_adjusted_expanded", "not implemented yet"},
{"top_k", "not implemented yet for opset 11", {"onnxtip"}},
{"top_k_smallest", "not implemented yet for opset 11", {"onnxtip"}},
{"unique_not_sorted_without_axis", "not implemented yet"},
{"unique_sorted_with_axis", "not implemented yet"},
{"unique_sorted_with_axis_3d", "not implemented yet"},
{"unique_sorted_without_axis", "not implemented yet"},
{"scatter_elements_with_axis", "not implemented yet"},
{"scatter_elements_without_axis", "not implemented yet"},
{"round", "not implemented yet"},
{"gather_elements_1", "not implemented yet"},
{"gather_elements_0", "not implemented yet"},
{"depthtospace_crd_mode_example", "not implemented yet"},
{"depthtospace_crd_mode", "not implemented yet"},
{"cumsum_2d_axis_1", "not implemented yet"},
{"cumsum_2d_axis_0", "not implemented yet"},
{"cumsum_1d_reverse_exclusive", "not implemented yet"},
{"cumsum_1d_reverse", "not implemented yet"},
{"cumsum_1d_exclusive", "not implemented yet"},
{"cumsum_1d", "not implemented yet"},
{"clip_splitbounds", "not implemented yet for opset 11"},
{"clip_outbounds", "not implemented yet for opset 11"},
{"clip_example", "not implemented yet for opset 11"},
{"clip_default_min", "not implemented yet for opset 11"},
{"clip_default_max", "not implemented yet for opset 11"},
{"clip", "not implemented yet for opset 11"},
};
#ifdef USE_NGRAPH

View file

@ -537,7 +537,10 @@ TEST(GraphTransformationTests, FuseConvBnAddMulFloat16) {
}
TEST(GraphTransformationTests, ReluClipFusion) {
Model model("ReluClipFusion");
// Clip op schema changed for opset version 11. Until Clip op is updated in ORT hard coding this model to use
// older opset.
Model model("ReluClipFusion", true, ModelMetaData(), IOnnxRuntimeOpSchemaRegistryList(), {{"", 10}}, {});
auto& graph = model.MainGraph();
std::vector<NodeArg*> inputs;

View file

@ -109,7 +109,19 @@ def create_backend_test(testname=None):
'^test_cumsum_1d_reverse_cpu.*',
'^test_cumsum_1d_reverse_exclusive_cpu.*',
'^test_cumsum_2d_axis_0_cpu.*',
'^test_cumsum_2d_axis_1_cpu.*'
'^test_cumsum_2d_axis_1_cpu.*',
'^test_dynamicquantizelinear*',
'^test_dynamicquantizelinear_expanded*',
'^test_dynamicquantizelinear_max_adjusted*',
'^test_dynamicquantizelinear_max_adjusted_expanded*',
'^test_dynamicquantizelinear_min_adjusted*',
'^test_dynamicquantizelinear_min_adjusted_expanded*',
'^test_clip*',
'^test_depthtospace*',
'^test_gather_elements*',
'^test_scatter_elements*',
'^test_top_k*',
'^test_unique_*',
)
# Example of how to disable tests for a specific provider.

View file

@ -13,7 +13,7 @@ version2tag=(5af210ca8a1c73aa6bae8754c9346ec54d0a756e-onnx123
bae6333e149a59a3faa9c4d9c44974373dcf5256-onnx130
9e55ace55aad1ada27516038dfbdc66a8a0763db-onnx141
7d7bc83d29a328233d3e8affa4c4ea8b3e3599ef-onnx150
65b8e0f9979fbade16e3becbdfa69c0764946f72-onnxtip)
7d90796473295ca3cdf976ed772215c5980ad3e0-onnxtip)
for v2t in ${version2tag[*]}; do
onnx_version="$(cut -d'-' -f1<<<${v2t})"
onnx_tag="$(cut -d'-' -f2<<<${v2t})"