mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
re-enable disabled tests on nGraph after fixing remaining subgraph resolve error (#1158)
* fix subgraph resolve error for nGraph. * input_args need to be processed in order.
This commit is contained in:
parent
148141dd5f
commit
7316e54153
4 changed files with 16 additions and 12 deletions
|
|
@ -359,6 +359,7 @@ static void GetInputsOutputsOfCluster(const GraphViewer& graph_viewer,
|
|||
/*out*/ std::vector<std::string>& cluster_inputs,
|
||||
/*out*/ std::vector<std::string>& cluster_outputs) {
|
||||
std::unordered_set<std::string> input_args;
|
||||
std::vector<std::string> ordered_input_args;
|
||||
std::unordered_set<std::string> output_args;
|
||||
std::unordered_set<std::string> external_output_args;
|
||||
|
||||
|
|
@ -367,8 +368,15 @@ static void GetInputsOutputsOfCluster(const GraphViewer& graph_viewer,
|
|||
|
||||
// Collect all inputs and outputs
|
||||
node->ForEachDef(
|
||||
[&input_args, &output_args](const NodeArg& node_arg, bool is_input) {
|
||||
is_input ? input_args.insert(node_arg.Name()) : output_args.insert(node_arg.Name());
|
||||
[&input_args, &ordered_input_args, &output_args](const NodeArg& node_arg, bool is_input) {
|
||||
if (is_input) {
|
||||
if (!input_args.count(node_arg.Name())) {
|
||||
ordered_input_args.push_back(node_arg.Name());
|
||||
}
|
||||
input_args.insert(node_arg.Name());
|
||||
} else {
|
||||
output_args.insert(node_arg.Name());
|
||||
}
|
||||
},
|
||||
true);
|
||||
|
||||
|
|
@ -396,8 +404,6 @@ static void GetInputsOutputsOfCluster(const GraphViewer& graph_viewer,
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> cluster_initializers;
|
||||
|
||||
//Extract initializers used by this_cluster.
|
||||
std::unordered_set<std::string> original_graph_inputs;
|
||||
for (const auto& node_arg : graph_viewer.GetInputsIncludingInitializers()) {
|
||||
|
|
@ -405,10 +411,10 @@ static void GetInputsOutputsOfCluster(const GraphViewer& graph_viewer,
|
|||
}
|
||||
|
||||
const auto& initializers = graph_viewer.GetAllInitializedTensors();
|
||||
for (const auto& in_arg : input_args) {
|
||||
for (const auto& in_arg : ordered_input_args) {
|
||||
if ((initializers.count(in_arg) && !original_graph_inputs.count(in_arg)) ||
|
||||
ng_required_initializers.count(in_arg)) {
|
||||
cluster_initializers.push_back(in_arg);
|
||||
cluster_inputs.push_back(in_arg);
|
||||
} else if (!output_args.count(in_arg)) {
|
||||
cluster_inputs.push_back(in_arg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,8 +370,6 @@ int real_main(int argc, char* argv[], Ort::Env& env) {
|
|||
broken_tests.insert({"dequantizelinear", "ambiguity in scalar dimensions [] vs [1]"});
|
||||
broken_tests.insert({"qlinearconv", "ambiguity in scalar dimensions [] vs [1]"});
|
||||
broken_tests.insert({"quantizelinear", "ambiguity in scalar dimensions [] vs [1]"});
|
||||
broken_tests.insert({"tiny_yolov2", "temporarily disable due to graph resolve failure."});
|
||||
broken_tests.insert({"operator_repeat_dim_overflow", "temporarily disable due to graph resolve failure."});
|
||||
#endif
|
||||
|
||||
#ifdef USE_CUDA
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ This test is to ensure, we do not have cyclic dependent sub-graphs.
|
|||
Example: Sub-Graph-1{1,2,3,5} is invalid because the output of this cluster is input to UnSupportedOp whose output is again input to the same cluster.
|
||||
|
||||
*/
|
||||
TEST(NGraphExecutionProviderTest, DISABLED_Independent_SubGraphs) {
|
||||
TEST(NGraphExecutionProviderTest, Independent_SubGraphs) {
|
||||
NameMLValMap feeds;
|
||||
add_feeds(feeds, "A", {4}, {1.0f, 2.0f, 3.0f, 4.0f});
|
||||
|
||||
|
|
|
|||
|
|
@ -121,9 +121,9 @@ def create_backend_test(testname=None):
|
|||
if version_tag == 'onnx150' or onnx.__version__ == '1.5.0':
|
||||
current_failing_tests = current_failing_tests + ('^test_constantofshape_*.*',)
|
||||
|
||||
# Failing for nGraph.
|
||||
if c2.supports_device('NGRAPH'):
|
||||
current_failing_tests = current_failing_tests + ('|^test_operator_repeat_dim_overflow_cpu.*',)
|
||||
# Example of how to disable tests for a specific provider.
|
||||
# if c2.supports_device('NGRAPH'):
|
||||
# current_failing_tests = current_failing_tests + ('|^test_operator_repeat_dim_overflow_cpu.*',)
|
||||
|
||||
filters = current_failing_tests + \
|
||||
tests_with_pre_opset7_dependencies_filters() + \
|
||||
|
|
|
|||
Loading…
Reference in a new issue