Unverified Commit fa0dc35f authored by Paul Fultz II's avatar Paul Fultz II Committed by GitHub
Browse files

Only print verification passed when it passes all verification (#2437)

parent 4ae80d98
...@@ -119,6 +119,7 @@ void verify_program(const std::string& name, ...@@ -119,6 +119,7 @@ void verify_program(const std::string& name,
auto target_outs = run_target(p, t, options, quantize, inputs); auto target_outs = run_target(p, t, options, quantize, inputs);
std::size_t output_num = ref_outs.size(); std::size_t output_num = ref_outs.size();
bool passed = true;
for(std::size_t i = 0; i < output_num; ++i) for(std::size_t i = 0; i < output_num; ++i)
{ {
if(ref_outs[i].get_shape().type() != target_outs[i].get_shape().type() or if(ref_outs[i].get_shape().type() != target_outs[i].get_shape().type() or
...@@ -130,9 +131,11 @@ void verify_program(const std::string& name, ...@@ -130,9 +131,11 @@ void verify_program(const std::string& name,
} }
else else
{ {
verify_args(name, target_outs[i], verify::expected{ref_outs[i]}, tols); passed &= verify_args(name, target_outs[i], verify::expected{ref_outs[i]}, tols);
} }
} }
if(passed)
std::cout << "MIGraphX verification passed successfully." << std::endl;
} }
void verify_instructions(const program& prog, void verify_instructions(const program& prog,
......
...@@ -88,7 +88,6 @@ bool verify_args(const std::string& name, ...@@ -88,7 +88,6 @@ bool verify_args(const std::string& name,
if(target_nan_idx >= 0) if(target_nan_idx >= 0)
std::cout << "Non finite number found in target at " << target_nan_idx << ": " std::cout << "Non finite number found in target at " << target_nan_idx << ": "
<< target[target_nan_idx] << std::endl; << target[target_nan_idx] << std::endl;
std::cout << "MIGraphX verification passed successfully." << std::endl;
} }
}); });
return passed; return passed;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment