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
fa0dc35f
Unverified
Commit
fa0dc35f
authored
Nov 13, 2023
by
Paul Fultz II
Committed by
GitHub
Nov 13, 2023
Browse files
Only print verification passed when it passes all verification (#2437)
parent
4ae80d98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/driver/verify.cpp
src/driver/verify.cpp
+4
-1
src/verify_args.cpp
src/verify_args.cpp
+0
-1
No files found.
src/driver/verify.cpp
View file @
fa0dc35f
...
@@ -119,6 +119,7 @@ void verify_program(const std::string& name,
...
@@ -119,6 +119,7 @@ void verify_program(const std::string& name,
auto
target_outs
=
run_target
(
p
,
t
,
options
,
quantize
,
inputs
);
auto
target_outs
=
run_target
(
p
,
t
,
options
,
quantize
,
inputs
);
std
::
size_t
output_num
=
ref_outs
.
size
();
std
::
size_t
output_num
=
ref_outs
.
size
();
bool
passed
=
true
;
for
(
std
::
size_t
i
=
0
;
i
<
output_num
;
++
i
)
for
(
std
::
size_t
i
=
0
;
i
<
output_num
;
++
i
)
{
{
if
(
ref_outs
[
i
].
get_shape
().
type
()
!=
target_outs
[
i
].
get_shape
().
type
()
or
if
(
ref_outs
[
i
].
get_shape
().
type
()
!=
target_outs
[
i
].
get_shape
().
type
()
or
...
@@ -130,9 +131,11 @@ void verify_program(const std::string& name,
...
@@ -130,9 +131,11 @@ void verify_program(const std::string& name,
}
}
else
else
{
{
verify_args
(
name
,
target_outs
[
i
],
verify
::
expected
{
ref_outs
[
i
]},
tols
);
passed
&=
verify_args
(
name
,
target_outs
[
i
],
verify
::
expected
{
ref_outs
[
i
]},
tols
);
}
}
}
}
if
(
passed
)
std
::
cout
<<
"MIGraphX verification passed successfully."
<<
std
::
endl
;
}
}
void
verify_instructions
(
const
program
&
prog
,
void
verify_instructions
(
const
program
&
prog
,
...
...
src/verify_args.cpp
View file @
fa0dc35f
...
@@ -88,7 +88,6 @@ bool verify_args(const std::string& name,
...
@@ -88,7 +88,6 @@ bool verify_args(const std::string& name,
if
(
target_nan_idx
>=
0
)
if
(
target_nan_idx
>=
0
)
std
::
cout
<<
"Non finite number found in target at "
<<
target_nan_idx
<<
": "
std
::
cout
<<
"Non finite number found in target at "
<<
target_nan_idx
<<
": "
<<
target
[
target_nan_idx
]
<<
std
::
endl
;
<<
target
[
target_nan_idx
]
<<
std
::
endl
;
std
::
cout
<<
"MIGraphX verification passed successfully."
<<
std
::
endl
;
}
}
});
});
return
passed
;
return
passed
;
...
...
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