Commit b27c2461 authored by Paul's avatar Paul
Browse files

Return bool from verify_program

parent 5bf4dee6
......@@ -70,7 +70,7 @@ std::vector<argument> run_target(program p,
return output;
}
void verify_program(const std::string& name,
bool verify_program(const std::string& name,
const program& p,
const target& t,
compile_options options,
......@@ -81,11 +81,13 @@ void verify_program(const std::string& name,
auto x = run_ref(p, inputs);
auto y = run_target(p, t, options, quantize, inputs);
bool passed = true;
std::size_t output_num = x.size();
for(std::size_t i = 0; i < output_num; ++i)
{
verify_args(name, x[i], y[i], tolerance);
passed &= verify_args(name, x[i], y[i], tolerance);
}
return passed;
}
void verify_instructions(const program& prog,
......
......@@ -31,7 +31,7 @@ namespace migraphx {
namespace driver {
inline namespace MIGRAPHX_INLINE_NS {
void verify_program(const std::string& name,
bool verify_program(const std::string& name,
const program& p,
const target& t,
compile_options options = compile_options{},
......
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