MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / verify_args_with_tolerance

Function verify_args_with_tolerance

src/verify_args.cpp:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108bool verify_args_with_tolerance(const std::string& name,
109 const argument& target_arg,
110 const verify::expected<argument>& ref_arg,
111 std::size_t tolerance)
112{
113 double rms_tol = 0.001;
114 argument t_arg = target_arg;
115 if(not t_arg.get_shape().computable())
116 {
117 shape o_t_shape = t_arg.get_shape();
118 t_arg = t_arg.reshape(shape{shape::uint8_type, o_t_shape.lens(), o_t_shape.strides()});
119 }
120 t_arg.visit([&](auto ta) { rms_tol = verify::get_rms_tol(ta, tolerance); });
121 verify::tolerance tols{rms_tol};
122 return verify_args(name, target_arg, ref_arg, tols);
123}
124
125} // namespace MIGRAPHX_INLINE_NS
126} // namespace migraphx

Callers 2

verify_mlirFunction · 0.85
verifyMethod · 0.85

Calls 7

get_rms_tolFunction · 0.85
verify_argsFunction · 0.85
computableMethod · 0.80
reshapeMethod · 0.80
lensMethod · 0.80
get_shapeMethod · 0.45
visitMethod · 0.45

Tested by

no test coverage detected