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
7a7040aa
Unverified
Commit
7a7040aa
authored
Mar 18, 2023
by
Umang Yadav
Committed by
GitHub
Mar 18, 2023
Browse files
Dynamically plug-in backend target libs (#1608)
Fixes #1595
parent
9ef6801e
Changes
50
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
95 additions
and
94 deletions
+95
-94
test/ref_rnn_ops_test.cpp
test/ref_rnn_ops_test.cpp
+75
-75
test/rewrite_gelu_test.cpp
test/rewrite_gelu_test.cpp
+1
-1
test/rewrite_pooling_test.cpp
test/rewrite_pooling_test.cpp
+3
-3
test/rewrite_quantization_test.cpp
test/rewrite_quantization_test.cpp
+1
-1
test/run_loop_test.cpp
test/run_loop_test.cpp
+2
-2
test/serialize_program.cpp
test/serialize_program.cpp
+2
-2
test/simplify_qdq_test.cpp
test/simplify_qdq_test.cpp
+5
-5
test/targets.cpp
test/targets.cpp
+4
-2
test/verify/run_verify.cpp
test/verify/run_verify.cpp
+2
-2
tools/api/api.cpp
tools/api/api.cpp
+0
-1
No files found.
test/ref_rnn_ops_test.cpp
View file @
7a7040aa
...
...
@@ -26,7 +26,7 @@
#include <migraphx/literal.hpp>
#include <migraphx/op/common.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/verify.hpp>
#include <migraphx/onnx.hpp>
#include <migraphx/make_op.hpp>
...
...
@@ -113,7 +113,7 @@ TEST_CASE(rnn_forward)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
mm
->
add_return
({
hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
res_hs
=
outputs
.
front
();
...
...
@@ -185,7 +185,7 @@ TEST_CASE(rnn_forward)
ih
);
auto
last_out
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
mm
->
add_return
({
out_hs
,
last_out
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
...
...
@@ -242,7 +242,7 @@ TEST_CASE(rnn_forward)
ih
);
auto
last_out
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
mm
->
add_return
({
out_hs
,
last_out
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
...
...
@@ -294,7 +294,7 @@ TEST_CASE(rnn_forward)
w
,
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_output
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
last_output_data
;
...
...
@@ -336,7 +336,7 @@ TEST_CASE(rnn_forward)
bias
,
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -423,7 +423,7 @@ TEST_CASE(rnn_reverse)
bias
,
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -473,7 +473,7 @@ TEST_CASE(rnn_reverse)
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_output
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
last_output_data
;
...
...
@@ -523,7 +523,7 @@ TEST_CASE(rnn_reverse)
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
mm
->
add_return
({
out_hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
std
::
vector
<
float
>
hs_data
;
...
...
@@ -583,7 +583,7 @@ TEST_CASE(rnn_reverse)
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
mm
->
add_return
({
out_hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
std
::
vector
<
float
>
hs_data
;
...
...
@@ -688,7 +688,7 @@ TEST_CASE(rnn_bidirectional)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
mm
->
add_return
({
out_hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
arg_hs
=
outputs
.
front
();
...
...
@@ -757,7 +757,7 @@ TEST_CASE(rnn_bidirectional)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
mm
->
add_return
({
out_hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
arg_hs
=
outputs
.
front
();
...
...
@@ -818,7 +818,7 @@ TEST_CASE(rnn_bidirectional)
bias
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_output
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
last_output_data
;
...
...
@@ -864,7 +864,7 @@ TEST_CASE(rnn_bidirectional)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_output
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
last_output_data
;
...
...
@@ -907,7 +907,7 @@ TEST_CASE(rnn_bidirectional)
bias
,
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1006,7 +1006,7 @@ TEST_CASE(rnn_fp16)
r_half
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_output
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
last_output_data
;
...
...
@@ -1100,7 +1100,7 @@ TEST_CASE(gru_forward)
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1142,7 +1142,7 @@ TEST_CASE(gru_forward)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1189,7 +1189,7 @@ TEST_CASE(gru_forward)
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1235,7 +1235,7 @@ TEST_CASE(gru_forward)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1324,7 +1324,7 @@ TEST_CASE(gru_forward_args)
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1367,7 +1367,7 @@ TEST_CASE(gru_forward_args)
r
,
bias
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1411,7 +1411,7 @@ TEST_CASE(gru_forward_args)
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1509,7 +1509,7 @@ TEST_CASE(gru_forward_actv_funcs)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1554,7 +1554,7 @@ TEST_CASE(gru_forward_actv_funcs)
bias
,
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1595,7 +1595,7 @@ TEST_CASE(gru_forward_actv_funcs)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1645,7 +1645,7 @@ TEST_CASE(gru_forward_actv_funcs)
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1750,7 +1750,7 @@ TEST_CASE(gru_reverse)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
mm
->
add_return
({
lho
,
hs
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
res_hs
=
outputs
.
back
();
...
...
@@ -1812,7 +1812,7 @@ TEST_CASE(gru_reverse)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
mm
->
add_return
({
lho
,
hs
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
res_hs
=
outputs
.
back
();
...
...
@@ -1869,7 +1869,7 @@ TEST_CASE(gru_reverse)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1912,7 +1912,7 @@ TEST_CASE(gru_reverse)
bias
,
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -1958,7 +1958,7 @@ TEST_CASE(gru_reverse)
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2081,7 +2081,7 @@ TEST_CASE(gru_bidirectional)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
mm
->
add_return
({
hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
hs_concat
=
outputs
.
front
();
auto
res_lho
=
outputs
.
back
();
...
...
@@ -2144,7 +2144,7 @@ TEST_CASE(gru_bidirectional)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
mm
->
add_return
({
concat_hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
hs_concat
=
outputs
.
front
();
auto
res_lho
=
outputs
.
back
();
...
...
@@ -2209,7 +2209,7 @@ TEST_CASE(gru_bidirectional)
ih
);
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
mm
->
add_return
({
concat_hs
,
lho
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
hs_concat
=
outputs
.
front
();
auto
res_lho
=
outputs
.
back
();
...
...
@@ -2264,7 +2264,7 @@ TEST_CASE(gru_bidirectional)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2360,7 +2360,7 @@ TEST_CASE(gru_bidirectional_args)
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2411,7 +2411,7 @@ TEST_CASE(gru_bidirectional_args)
r
,
bias
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2460,7 +2460,7 @@ TEST_CASE(gru_bidirectional_args)
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2579,7 +2579,7 @@ TEST_CASE(gru_bidirectional_actv_funcs)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2618,7 +2618,7 @@ TEST_CASE(gru_bidirectional_actv_funcs)
bias
,
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2660,7 +2660,7 @@ TEST_CASE(gru_bidirectional_actv_funcs)
bias
,
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2707,7 +2707,7 @@ TEST_CASE(gru_bidirectional_actv_funcs)
und
,
ih
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
concat_hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2748,7 +2748,7 @@ TEST_CASE(gru_bidirectional_actv_funcs)
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2869,7 +2869,7 @@ TEST_CASE(gru_bidirectional_seq_1)
und
,
ih
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -2977,7 +2977,7 @@ TEST_CASE(gru_fp16)
und_half
,
ih_half
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
hs_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -3106,7 +3106,7 @@ TEST_CASE(lstm_forward)
ih
,
ic
,
und
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
...
...
@@ -3155,7 +3155,7 @@ TEST_CASE(lstm_forward)
ic
,
und
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_hs
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
...
...
@@ -3208,7 +3208,7 @@ TEST_CASE(lstm_forward)
ic
,
und
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_cell_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_hs
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
...
...
@@ -3334,7 +3334,7 @@ TEST_CASE(lstm_forward_more)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_hs
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
...
...
@@ -3383,7 +3383,7 @@ TEST_CASE(lstm_forward_more)
ih
,
ic
,
pph
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
...
...
@@ -3441,7 +3441,7 @@ TEST_CASE(lstm_forward_more)
ic
,
und
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
last_hs
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
...
...
@@ -3499,7 +3499,7 @@ TEST_CASE(lstm_forward_more)
ic
,
pph
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
...
...
@@ -3635,7 +3635,7 @@ TEST_CASE(lstm_reverse)
ih
,
ic
,
pph
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -3689,7 +3689,7 @@ TEST_CASE(lstm_reverse)
ih
,
ic
,
pph
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -3743,7 +3743,7 @@ TEST_CASE(lstm_reverse)
ih
,
ic
,
pph
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -3781,7 +3781,7 @@ TEST_CASE(lstm_reverse)
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_cell_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -3820,7 +3820,7 @@ TEST_CASE(lstm_reverse)
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_cell_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -3943,7 +3943,7 @@ TEST_CASE(lstm_reverse_actv)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -3979,7 +3979,7 @@ TEST_CASE(lstm_reverse_actv)
w
,
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4025,7 +4025,7 @@ TEST_CASE(lstm_reverse_actv)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4149,7 +4149,7 @@ TEST_CASE(lstm_bidirectional)
ih
,
ic
,
pph
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4203,7 +4203,7 @@ TEST_CASE(lstm_bidirectional)
ic
,
pph
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4246,7 +4246,7 @@ TEST_CASE(lstm_bidirectional)
ic
,
pph
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_cell_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4278,7 +4278,7 @@ TEST_CASE(lstm_bidirectional)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4325,7 +4325,7 @@ TEST_CASE(lstm_bidirectional)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4448,7 +4448,7 @@ TEST_CASE(lstm_bidirectional_var_seq_lens)
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
out_hs
);
auto
lco
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_cell_output"
),
out_hs
);
mm
->
add_return
({
out_hs
,
lho
,
lco
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
arg_hs
=
outputs
.
front
();
...
...
@@ -4532,7 +4532,7 @@ TEST_CASE(lstm_bidirectional_var_seq_lens)
auto
lho
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
auto
lco
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_cell_output"
),
hs
);
mm
->
add_return
({
hs
,
lho
,
lco
});
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
outputs
=
p
.
eval
({});
auto
res_hs
=
outputs
.
at
(
0
);
auto
res_lho
=
outputs
.
at
(
1
);
...
...
@@ -4641,7 +4641,7 @@ TEST_CASE(lstm_bidirectional_actv_func)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4683,7 +4683,7 @@ TEST_CASE(lstm_bidirectional_actv_func)
seq
,
w
,
r
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4724,7 +4724,7 @@ TEST_CASE(lstm_bidirectional_actv_func)
w
,
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4760,7 +4760,7 @@ TEST_CASE(lstm_bidirectional_actv_func)
w
,
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4796,7 +4796,7 @@ TEST_CASE(lstm_bidirectional_actv_func)
w
,
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4833,7 +4833,7 @@ TEST_CASE(lstm_bidirectional_actv_func)
w
,
r
);
mm
->
add_instruction
(
migraphx
::
make_op
(
"rnn_last_hs_output"
),
hs
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
output_data
;
hs_concat
.
visit
([
&
](
auto
output
)
{
output_data
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
@@ -4973,7 +4973,7 @@ TEST_CASE(lstm_fp16)
ih_half
,
ic_half
,
und_half
);
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
hs_concat
=
p
.
eval
({}).
back
();
std
::
vector
<
float
>
hs_data
;
...
...
test/rewrite_gelu_test.cpp
View file @
7a7040aa
...
...
@@ -24,7 +24,7 @@
#include <migraphx/rewrite_gelu.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/program.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/op/convolution.hpp>
#include <migraphx/op/reshape.hpp>
#include <migraphx/instruction.hpp>
...
...
test/rewrite_pooling_test.cpp
View file @
7a7040aa
...
...
@@ -25,7 +25,7 @@
#include <migraphx/op/pooling.hpp>
#include <migraphx/dead_code_elimination.hpp>
#include <migraphx/program.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/ranges.hpp>
...
...
@@ -194,8 +194,8 @@ TEST_CASE(literal_rewrite_pooling_test)
const
migraphx
::
operation
&
op
)
{
migraphx
::
program
p1
=
pooling_program
(
mode
);
migraphx
::
program
p2
=
opt_program
(
op
);
p1
.
compile
(
migraphx
::
ref
::
target
{}
);
p2
.
compile
(
migraphx
::
ref
::
target
{}
);
p1
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
p2
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
auto
result1
=
p1
.
eval
({}).
back
();
auto
result2
=
p2
.
eval
({}).
back
();
visit_all
(
result1
,
...
...
test/rewrite_quantization_test.cpp
View file @
7a7040aa
...
...
@@ -23,7 +23,7 @@
*/
#include <migraphx/rewrite_quantization.hpp>
#include <migraphx/program.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/op/convolution.hpp>
#include <migraphx/op/reshape.hpp>
#include <migraphx/instruction.hpp>
...
...
test/run_loop_test.cpp
View file @
7a7040aa
...
...
@@ -27,7 +27,7 @@
#include <migraphx/literal.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/quantization.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/verify.hpp>
#include <migraphx/make_op.hpp>
...
...
@@ -207,7 +207,7 @@ static auto run_prog(migraphx::program p, int64_t iter_num, bool cond, int64_t i
migraphx
::
shape
s
{
migraphx
::
shape
::
int64_type
,
{
1
}};
migraphx
::
shape
sc
{
migraphx
::
shape
::
bool_type
};
p
.
compile
(
migraphx
::
ref
::
target
{}
);
p
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
migraphx
::
parameter_map
pp
;
pp
[
"iter_num"
]
=
migraphx
::
argument
(
si
,
&
iter_num
);
pp
[
"ccond"
]
=
migraphx
::
argument
(
sc
,
&
cond
);
...
...
test/serialize_program.cpp
View file @
7a7040aa
...
...
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include <migraphx/program.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/load_save.hpp>
#include "test.hpp"
#include <migraphx/make_op.hpp>
...
...
@@ -82,7 +82,7 @@ TEST_CASE(as_file)
TEST_CASE
(
compiled
)
{
migraphx
::
program
p1
=
create_program
();
p1
.
compile
(
migraphx
::
ref
::
target
{}
);
p1
.
compile
(
migraphx
::
make_
target
(
"ref"
)
);
std
::
vector
<
char
>
buffer
=
migraphx
::
save_buffer
(
p1
);
migraphx
::
program
p2
=
migraphx
::
load_buffer
(
buffer
);
EXPECT
(
p1
.
sort
()
==
p2
.
sort
());
...
...
test/simplify_qdq_test.cpp
View file @
7a7040aa
...
...
@@ -23,7 +23,7 @@
*/
#include <migraphx/simplify_qdq.hpp>
#include <migraphx/program.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/instruction.hpp>
#include <test.hpp>
#include <migraphx/make_op.hpp>
...
...
@@ -686,8 +686,8 @@ TEST_CASE(conv_correctness)
auto
input
=
migraphx
::
argument
(
si
,
iv
.
data
());
std
::
vector
<
float
>
wv
(
sw
.
elements
(),
10
);
auto
weights
=
migraphx
::
argument
(
sw
,
wv
.
data
());
p1
.
compile
(
migraphx
::
target
(
migraphx
::
ref
::
target
{}
));
p2
.
compile
(
migraphx
::
target
(
migraphx
::
ref
::
target
{}
));
p1
.
compile
(
migraphx
::
target
(
migraphx
::
make_
target
(
"ref"
)
));
p2
.
compile
(
migraphx
::
target
(
migraphx
::
make_
target
(
"ref"
)
));
auto
result1
=
p1
.
eval
({{
"input"
,
input
},
{
"weights"
,
weights
}}).
back
();
std
::
vector
<
float
>
rv1
(
16
);
...
...
@@ -736,8 +736,8 @@ TEST_CASE(dot_correctness)
auto
a
=
migraphx
::
argument
(
sh1
,
av
.
data
());
std
::
vector
<
float
>
bv
(
sh2
.
elements
(),
10
);
auto
b
=
migraphx
::
argument
(
sh2
,
bv
.
data
());
p1
.
compile
(
migraphx
::
target
(
migraphx
::
ref
::
target
{}
));
p2
.
compile
(
migraphx
::
target
(
migraphx
::
ref
::
target
{}
));
p1
.
compile
(
migraphx
::
target
(
migraphx
::
make_
target
(
"ref"
)
));
p2
.
compile
(
migraphx
::
target
(
migraphx
::
make_
target
(
"ref"
)
));
auto
result1
=
p1
.
eval
({{
"a"
,
a
},
{
"b"
,
b
}}).
back
();
std
::
vector
<
float
>
rv1
(
sh3
.
elements
());
...
...
test/targets.cpp
View file @
7a7040aa
...
...
@@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#include <migraphx/register_target.hpp>
#include <migraphx/ref/target.hpp>
#include <migraphx/target.hpp>
#include "test.hpp"
...
...
@@ -43,7 +42,10 @@ TEST_CASE(make_invalid_target)
TEST_CASE
(
targets
)
{
auto
ts
=
migraphx
::
get_targets
();
EXPECT
(
ts
.
size
()
>
0
);
EXPECT
(
ts
.
size
()
==
0
);
auto
ref_t
=
migraphx
::
make_target
(
"ref"
);
ts
=
migraphx
::
get_targets
();
EXPECT
(
ts
.
size
()
==
1
);
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
test/verify/run_verify.cpp
View file @
7a7040aa
...
...
@@ -26,7 +26,7 @@
#include "verify_program.hpp"
#include "test.hpp"
#include <migraphx/env.hpp>
#include <migraphx/re
f/
target.hpp>
#include <migraphx/re
gister_
target.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/load_save.hpp>
...
...
@@ -117,7 +117,7 @@ void run_verify::validate(const migraphx::target& t,
std
::
vector
<
migraphx
::
argument
>
run_verify
::
run_ref
(
migraphx
::
program
p
,
migraphx
::
parameter_map
inputs
)
const
{
migraphx
::
ref
::
target
t
{}
;
migraphx
::
target
t
=
migraphx
::
make_target
(
"ref"
)
;
auto_print
pp
{
p
,
t
.
name
()};
compile_check
(
p
,
t
);
return
p
.
eval
(
std
::
move
(
inputs
));
...
...
tools/api/api.cpp
View file @
7a7040aa
...
...
@@ -32,7 +32,6 @@
#include <migraphx/register_target.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/quantization.hpp>
#include <migraphx/ref/target.hpp>
#include <migraphx/load_save.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/register_op.hpp>
...
...
Prev
1
2
3
Next
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