Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
1af842c6
"composable_kernel/include/utility/array.hpp" did not exist on "05e046654c9a226444091806a418a77fe0e4a4c2"
Commit
1af842c6
authored
Sep 21, 2023
by
Umang Yadav
Browse files
add env var for allclose
parent
be33669b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/include/migraphx/verify.hpp
src/include/migraphx/verify.hpp
+9
-2
No files found.
src/include/migraphx/verify.hpp
View file @
1af842c6
...
...
@@ -24,6 +24,7 @@
#ifndef MIGRAPHX_GUARD_VERIFY_HPP
#define MIGRAPHX_GUARD_VERIFY_HPP
#include "migraphx/env.hpp"
#include <algorithm>
#include <cmath>
#include <functional>
...
...
@@ -33,7 +34,9 @@
#include <migraphx/float_equal.hpp>
#include <migraphx/config.hpp>
#include <migraphx/env.hpp>
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_VERIFY_ENABLE_ALLCLOSE
)
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
verify
{
...
...
@@ -264,10 +267,14 @@ bool verify_range_with_tolerance(const R1& r1,
{
auto
rms_error
=
rms_range
(
r1
,
r2
.
data
());
// disable ewise_verify for now, it requires lot of tests to be fixed
// auto ewise_verify = allclose(r1, r2.data(), tols);
bool
ewise_verify
=
true
;
if
(
enabled
(
MIGRAPHX_VERIFY_ENABLE_ALLCLOSE
{}))
{
ewise_verify
=
allclose
(
r1
,
r2
.
data
(),
tols
);
}
if
(
out_rms_error
!=
nullptr
)
*
out_rms_error
=
rms_error
;
return
rms_error
<=
tols
.
rms_tol
;
return
rms_error
<=
tols
.
rms_tol
and
ewise_verify
;
}
// expected argument should be passed as second, but if it is passed as the first by mistake then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment