"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "fef8086c008b13b7b37081f882d1df2cf0d291b7"
Commit 31a264fb authored by Umang Yadav's avatar Umang Yadav
Browse files

Rename verify_args

parent 8930d23d
...@@ -84,7 +84,7 @@ void verify_program(const std::string& name, ...@@ -84,7 +84,7 @@ void verify_program(const std::string& name,
std::size_t output_num = ref_outs.size(); std::size_t output_num = ref_outs.size();
for(std::size_t i = 0; i < output_num; ++i) for(std::size_t i = 0; i < output_num; ++i)
{ {
verify_args_with_threshold(name, target_outs[i], verify::expected{ref_outs[i]}, tols); verify_args(name, target_outs[i], verify::expected{ref_outs[i]}, tols);
} }
} }
......
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
MIGRAPHX_EXPORT bool verify_args_with_threshold(const std::string& name, MIGRAPHX_EXPORT bool verify_args(const std::string& name,
const argument& target_arg, const argument& target_arg,
const verify::expected<argument>& ref_arg, const verify::expected<argument>& ref_arg,
verify::tolerance); verify::tolerance);
MIGRAPHX_EXPORT bool verify_args(const std::string& name, MIGRAPHX_EXPORT bool verify_args_with_tolerance(const std::string& name,
const argument& target_arg, const argument& target_arg,
const verify::expected<argument>& ref_arg, const verify::expected<argument>& ref_arg,
std::size_t tolerance = 80); std::size_t tolerance = 80);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
namespace migraphx { namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS { inline namespace MIGRAPHX_INLINE_NS {
bool verify_args_with_threshold(const std::string& name, bool verify_args(const std::string& name,
const argument& target_arg, const argument& target_arg,
const verify::expected<argument>& ref_arg, const verify::expected<argument>& ref_arg,
verify::tolerance tols) verify::tolerance tols)
...@@ -94,7 +94,7 @@ bool verify_args_with_threshold(const std::string& name, ...@@ -94,7 +94,7 @@ bool verify_args_with_threshold(const std::string& name,
return passed; return passed;
} }
bool verify_args(const std::string& name, bool verify_args_with_tolerance(const std::string& name,
const argument& target_arg, const argument& target_arg,
const verify::expected<argument>& ref_arg, const verify::expected<argument>& ref_arg,
std::size_t tolerance) std::size_t tolerance)
...@@ -102,7 +102,7 @@ bool verify_args(const std::string& name, ...@@ -102,7 +102,7 @@ bool verify_args(const std::string& name,
double rms_tol = 0.001; double rms_tol = 0.001;
target_arg.visit([&](auto ta) { rms_tol = verify::get_rms_tol(ta, tolerance); }); target_arg.visit([&](auto ta) { rms_tol = verify::get_rms_tol(ta, tolerance); });
verify::tolerance tols{rms_tol}; verify::tolerance tols{rms_tol};
return verify_args_with_threshold(name, target_arg, ref_arg, tols); return verify_args(name, target_arg, ref_arg, tols);
} }
} // namespace MIGRAPHX_INLINE_NS } // namespace MIGRAPHX_INLINE_NS
......
...@@ -133,7 +133,7 @@ bool verify_mlir(const migraphx::module& mmlir) ...@@ -133,7 +133,7 @@ bool verify_mlir(const migraphx::module& mmlir)
auto inputs = generate_params(ref); auto inputs = generate_params(ref);
auto mlir = create_program_from_mlir(mmlir); auto mlir = create_program_from_mlir(mmlir);
return migraphx::verify_args( return migraphx::verify_args_with_tolerance(
"mlir", run_gpu(mlir, inputs), migraphx::verify::expected{run_ref(ref, inputs)}); "mlir", run_gpu(mlir, inputs), migraphx::verify::expected{run_ref(ref, inputs)});
} }
......
...@@ -252,7 +252,7 @@ void run_verify::verify(const std::string& name, ...@@ -252,7 +252,7 @@ void run_verify::verify(const std::string& name,
for(std::size_t i = 0; ((i < num) and passed); ++i) for(std::size_t i = 0; ((i < num) and passed); ++i)
{ {
passed &= passed &=
migraphx::verify_args(tname, result[i], migraphx::verify::expected{gold[i]}); migraphx::verify_args_with_tolerance(tname, result[i], migraphx::verify::expected{gold[i]});
} }
if(not passed or migraphx::enabled(MIGRAPHX_TRACE_TEST{})) if(not passed or migraphx::enabled(MIGRAPHX_TRACE_TEST{}))
......
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