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
05a0e86e
Commit
05a0e86e
authored
Nov 15, 2018
by
Khalique
Browse files
rename migraph in identity test
parent
65c5581f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test/cpu_ops_test.cpp
test/cpu_ops_test.cpp
+5
-5
No files found.
test/cpu_ops_test.cpp
View file @
05a0e86e
...
@@ -1093,12 +1093,12 @@ TEST_CASE(contiguous_test)
...
@@ -1093,12 +1093,12 @@ TEST_CASE(contiguous_test)
TEST_CASE
(
identity_test
)
TEST_CASE
(
identity_test
)
{
{
migraph
::
program
p
;
migraph
x
::
program
p
;
migraph
::
shape
s
{
migraph
::
shape
::
float_type
,
{
2
,
2
}};
migraph
x
::
shape
s
{
migraph
x
::
shape
::
float_type
,
{
2
,
2
}};
std
::
vector
<
int
>
data
{
1
,
2
,
3
,
4
};
std
::
vector
<
int
>
data
{
1
,
2
,
3
,
4
};
auto
l
=
p
.
add_literal
(
migraph
::
literal
{
s
,
data
});
auto
l
=
p
.
add_literal
(
migraph
x
::
literal
{
s
,
data
});
p
.
add_instruction
(
migraph
::
op
::
identity
{},
l
);
p
.
add_instruction
(
migraph
x
::
op
::
identity
{},
l
);
p
.
compile
(
migraph
::
cpu
::
target
{});
p
.
compile
(
migraph
x
::
cpu
::
target
{});
auto
result
=
p
.
eval
({});
auto
result
=
p
.
eval
({});
std
::
vector
<
int
>
results_vector
(
4
);
std
::
vector
<
int
>
results_vector
(
4
);
result
.
visit
([
&
](
auto
output
)
{
results_vector
.
assign
(
output
.
begin
(),
output
.
end
());
});
result
.
visit
([
&
](
auto
output
)
{
results_vector
.
assign
(
output
.
begin
(),
output
.
end
());
});
...
...
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