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
66af5158
Commit
66af5158
authored
Oct 11, 2023
by
charlie
Browse files
Review updates
parent
9c2bd91d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/driver/main.cpp
src/driver/main.cpp
+8
-9
No files found.
src/driver/main.cpp
View file @
66af5158
...
...
@@ -537,9 +537,9 @@ struct verify : command<verify>
{
compiler
c
;
// Set to -1. as nonsense initial value
double
rms_tol
=
-
1.
;
double
atol
=
-
1.
;
double
rtol
=
-
1.
;
double
rms_tol
=
-
1.
0
;
double
atol
=
-
1.
0
;
double
rtol
=
-
1.
0
;
bool
per_instruction
=
false
;
bool
reduce
=
false
;
void
parse
(
argument_parser
&
ap
)
...
...
@@ -579,22 +579,21 @@ struct verify : command<verify>
{
tols
=
migraphx
::
verify
::
tolerance
{
8e-2
,
4e-2
,
4e-2
};
}
auto
dbl_comp
=
[
&
](
double
a
,
double
b
){
return
(
std
::
abs
(
a
-
b
)
<=
std
::
numeric_limits
<
double
>::
epsilon
());
};
if
(
not
dbl_comp
(
this
->
rms_tol
,
-
1.
))
if
(
not
float_equal
(
this
->
rms_tol
,
-
1.0
))
{
tols
.
rms_tol
=
this
->
rms_tol
;
}
if
(
not
dbl_comp
(
this
->
atol
,
-
1.
))
if
(
not
float_equal
(
this
->
atol
,
-
1.
0
))
{
tols
.
atol
=
this
->
atol
;
}
if
(
not
dbl_comp
(
this
->
rtol
,
-
1.
))
if
(
not
float_equal
(
this
->
rtol
,
-
1.
0
))
{
tols
.
rtol
=
this
->
rtol
;
}
std
::
cout
<<
"rms_tol: "
<<
tols
.
rms_tol
<<
std
::
endl
;
auto
quantize
=
precision
::
fp32
;
if
(
c
.
to_fp16
)
{
...
...
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