Skip to content

Commit

Permalink
update onnx to latest commit (microsoft#1622)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
askhade authored Aug 16, 2019
1 parent 1835640 commit 0044be6
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"component":{
"type":"git",
"git": {
"commitHash": "65b8e0f9979fbade16e3becbdfa69c0764946f72",
"commitHash": "7d90796473295ca3cdf976ed772215c5980ad3e0",
"repositoryUrl": "https://github.com/onnx/onnx.git"
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/onnx
Submodule onnx updated 145 files
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/test/framework/allocation_planner_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/test/framework/execution_frame_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
33 changes: 32 additions & 1 deletion onnxruntime/test/onnx/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion onnxruntime/test/optimizer/graph_transform_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 13 additions & 1 deletion onnxruntime/test/python/onnx_backend_test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tools/ci_build/github/linux/docker/scripts/install_onnx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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})"
Expand Down

0 comments on commit 0044be6

Please sign in to comment.