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
b27c2461
Commit
b27c2461
authored
Aug 12, 2022
by
Paul
Browse files
Return bool from verify_program
parent
5bf4dee6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
src/driver/verify.cpp
src/driver/verify.cpp
+4
-2
src/driver/verify.hpp
src/driver/verify.hpp
+1
-1
No files found.
src/driver/verify.cpp
View file @
b27c2461
...
@@ -70,7 +70,7 @@ std::vector<argument> run_target(program p,
...
@@ -70,7 +70,7 @@ std::vector<argument> run_target(program p,
return
output
;
return
output
;
}
}
void
verify_program
(
const
std
::
string
&
name
,
bool
verify_program
(
const
std
::
string
&
name
,
const
program
&
p
,
const
program
&
p
,
const
target
&
t
,
const
target
&
t
,
compile_options
options
,
compile_options
options
,
...
@@ -81,11 +81,13 @@ void verify_program(const std::string& name,
...
@@ -81,11 +81,13 @@ void verify_program(const std::string& name,
auto
x
=
run_ref
(
p
,
inputs
);
auto
x
=
run_ref
(
p
,
inputs
);
auto
y
=
run_target
(
p
,
t
,
options
,
quantize
,
inputs
);
auto
y
=
run_target
(
p
,
t
,
options
,
quantize
,
inputs
);
bool
passed
=
true
;
std
::
size_t
output_num
=
x
.
size
();
std
::
size_t
output_num
=
x
.
size
();
for
(
std
::
size_t
i
=
0
;
i
<
output_num
;
++
i
)
for
(
std
::
size_t
i
=
0
;
i
<
output_num
;
++
i
)
{
{
verify_args
(
name
,
x
[
i
],
y
[
i
],
tolerance
);
passed
&=
verify_args
(
name
,
x
[
i
],
y
[
i
],
tolerance
);
}
}
return
passed
;
}
}
void
verify_instructions
(
const
program
&
prog
,
void
verify_instructions
(
const
program
&
prog
,
...
...
src/driver/verify.hpp
View file @
b27c2461
...
@@ -31,7 +31,7 @@ namespace migraphx {
...
@@ -31,7 +31,7 @@ namespace migraphx {
namespace
driver
{
namespace
driver
{
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
void
verify_program
(
const
std
::
string
&
name
,
bool
verify_program
(
const
std
::
string
&
name
,
const
program
&
p
,
const
program
&
p
,
const
target
&
t
,
const
target
&
t
,
compile_options
options
=
compile_options
{},
compile_options
options
=
compile_options
{},
...
...
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