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
c8188db0
Commit
c8188db0
authored
Jan 06, 2019
by
Paul
Browse files
Formatting
parent
3e15b7a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test/const_eval_test.cpp
test/const_eval_test.cpp
+5
-5
No files found.
test/const_eval_test.cpp
View file @
c8188db0
...
@@ -7,8 +7,7 @@
...
@@ -7,8 +7,7 @@
struct
sum_cf_op
struct
sum_cf_op
{
{
std
::
string
name
()
const
{
return
"sum_cf"
;
}
std
::
string
name
()
const
{
return
"sum_cf"
;
}
migraphx
::
argument
migraphx
::
argument
compute
(
const
migraphx
::
shape
&
,
std
::
vector
<
migraphx
::
argument
>
args
)
const
compute
(
const
migraphx
::
shape
&
,
std
::
vector
<
migraphx
::
argument
>
args
)
const
{
{
migraphx
::
argument
result
;
migraphx
::
argument
result
;
if
(
args
.
size
()
!=
2
)
if
(
args
.
size
()
!=
2
)
...
@@ -60,7 +59,8 @@ TEST_CASE(op_test1)
...
@@ -60,7 +59,8 @@ TEST_CASE(op_test1)
TEST_CASE
(
op_test2
)
TEST_CASE
(
op_test2
)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
x
=
p
.
add_parameter
(
"param"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
}});;
auto
x
=
p
.
add_parameter
(
"param"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
}});
;
auto
two
=
p
.
add_literal
(
2
);
auto
two
=
p
.
add_literal
(
2
);
auto
sum
=
p
.
add_instruction
(
sum_cf_op
{},
x
,
two
);
auto
sum
=
p
.
add_instruction
(
sum_cf_op
{},
x
,
two
);
CHECK
(
sum
->
eval
().
empty
());
CHECK
(
sum
->
eval
().
empty
());
...
@@ -69,8 +69,8 @@ TEST_CASE(op_test2)
...
@@ -69,8 +69,8 @@ TEST_CASE(op_test2)
TEST_CASE
(
op_test3
)
TEST_CASE
(
op_test3
)
{
{
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
one
=
p
.
add_literal
(
1
);
auto
one
=
p
.
add_literal
(
1
);
auto
two
=
p
.
add_literal
(
2
);
auto
two
=
p
.
add_literal
(
2
);
auto
sum1
=
p
.
add_instruction
(
sum_op
{},
one
,
two
);
auto
sum1
=
p
.
add_instruction
(
sum_op
{},
one
,
two
);
auto
sum2
=
p
.
add_instruction
(
sum_cf_op
{},
sum1
,
two
);
auto
sum2
=
p
.
add_instruction
(
sum_cf_op
{},
sum1
,
two
);
CHECK
(
sum2
->
eval
().
empty
());
CHECK
(
sum2
->
eval
().
empty
());
...
...
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