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
a3357bc3
Commit
a3357bc3
authored
Oct 12, 2023
by
charlie
Browse files
FOrmatting
parent
e6e42359
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
src/driver/main.cpp
src/driver/main.cpp
+9
-10
No files found.
src/driver/main.cpp
View file @
a3357bc3
...
@@ -541,9 +541,9 @@ struct verify : command<verify>
...
@@ -541,9 +541,9 @@ struct verify : command<verify>
{
{
compiler
c
;
compiler
c
;
// Set to -1. as nonsense initial value
// Set to -1. as nonsense initial value
double
rms_tol
=
-
1.0
;
double
rms_tol
=
-
1.0
;
double
atol
=
-
1.0
;
double
atol
=
-
1.0
;
double
rtol
=
-
1.0
;
double
rtol
=
-
1.0
;
bool
per_instruction
=
false
;
bool
per_instruction
=
false
;
bool
reduce
=
false
;
bool
reduce
=
false
;
void
parse
(
argument_parser
&
ap
)
void
parse
(
argument_parser
&
ap
)
...
@@ -572,12 +572,11 @@ struct verify : command<verify>
...
@@ -572,12 +572,11 @@ struct verify : command<verify>
auto
t
=
c
.
ct
.
get_target
();
auto
t
=
c
.
ct
.
get_target
();
auto
m
=
c
.
parameters
.
generate
(
p
,
t
,
true
,
c
.
l
.
batch
);
auto
m
=
c
.
parameters
.
generate
(
p
,
t
,
true
,
c
.
l
.
batch
);
// TODO remove this and make the driver able to figure out datatype most used in the model
//TODO remove this and make the driver able to figure out datatype most used in the model
// then set the tolerances appropriately. Need to check here because c.to_fp16 only set
// then set the tolerances appropriately. Need to check here because c.to_fp16 only set
// after argument_parser.parse() is run. This code is complicated because there's not a
// after argument_parser.parse() is run. This code is complicated because there's not a good way
// good way to change the default tolerances after reading `--fp16` but before reading
// to change the default tolerances after reading `--fp16` but before reading `--rms-tol`, `--atol`,
// `--rms-tol`, `--atol`, and `--rtol`.
// and `--rtol`.
migraphx
::
verify
::
tolerance
tols
{};
migraphx
::
verify
::
tolerance
tols
{};
if
(
c
.
to_fp16
)
if
(
c
.
to_fp16
)
{
{
...
@@ -604,7 +603,7 @@ struct verify : command<verify>
...
@@ -604,7 +603,7 @@ struct verify : command<verify>
if
(
c
.
to_fp16
)
if
(
c
.
to_fp16
)
{
{
quantize
=
precision
::
fp16
;
quantize
=
precision
::
fp16
;
}
}
if
(
c
.
to_int8
)
if
(
c
.
to_int8
)
{
{
quantize
=
precision
::
int8
;
quantize
=
precision
::
int8
;
...
...
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