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
ec5b7278
Commit
ec5b7278
authored
Nov 05, 2018
by
wsttiger
Browse files
Formatting
parent
d514c947
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
src/eliminate_concat.cpp
src/eliminate_concat.cpp
+1
-1
test/eliminate_concat_test.cpp
test/eliminate_concat_test.cpp
+2
-1
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+1
-1
No files found.
src/eliminate_concat.cpp
View file @
ec5b7278
...
@@ -56,7 +56,7 @@ void eliminate_concat::apply(program& p) const
...
@@ -56,7 +56,7 @@ void eliminate_concat::apply(program& p) const
for
(
auto
x
:
allocations
)
for
(
auto
x
:
allocations
)
{
{
migraph
::
op
::
load
op
{
x
->
get_shape
(),
offset
};
migraph
::
op
::
load
op
{
x
->
get_shape
(),
offset
};
//migraph::op::load op{x->get_shape(), 0};
//
migraph::op::load op{x->get_shape(), 0};
p
.
replace_instruction
(
x
,
op
,
{
super
});
p
.
replace_instruction
(
x
,
op
,
{
super
});
offset
+=
x
->
get_shape
().
bytes
();
offset
+=
x
->
get_shape
().
bytes
();
}
}
...
...
test/eliminate_concat_test.cpp
View file @
ec5b7278
...
@@ -109,7 +109,8 @@ void basic()
...
@@ -109,7 +109,8 @@ void basic()
migraph
::
op
::
load
{
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
1
,
3
,
8
,
8
}},
512
},
{
a1
});
migraph
::
op
::
load
{
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
1
,
3
,
8
,
8
}},
512
},
{
a1
});
auto
p2
=
p
.
add_instruction
(
fred_op
{},
l2
);
auto
p2
=
p
.
add_instruction
(
fred_op
{},
l2
);
auto
l3
=
p
.
add_instruction
(
auto
l3
=
p
.
add_instruction
(
migraph
::
op
::
load
{
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
1
,
5
,
8
,
8
}},
1280
},
{
a1
});
migraph
::
op
::
load
{
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
1
,
5
,
8
,
8
}},
1280
},
{
a1
});
auto
p3
=
p
.
add_instruction
(
fred_op
{},
l3
);
auto
p3
=
p
.
add_instruction
(
fred_op
{},
l3
);
auto
i1
=
p
.
add_instruction
(
migraph
::
op
::
identity
{},
{
a1
,
p1
,
p2
,
p3
});
auto
i1
=
p
.
add_instruction
(
migraph
::
op
::
identity
{},
{
a1
,
p1
,
p2
,
p3
});
return
p
;
return
p
;
...
...
test/gpu/miopen.cpp
View file @
ec5b7278
...
@@ -652,7 +652,7 @@ void manual_identity()
...
@@ -652,7 +652,7 @@ void manual_identity()
void
manual_test_concat_relu
()
void
manual_test_concat_relu
()
{
{
migraph
::
program
p
;
migraph
::
program
p
;
std
::
size_t
axis
=
0
;
std
::
size_t
axis
=
0
;
std
::
vector
<
float
>
data0
=
{
0
,
1
,
2
,
3
};
std
::
vector
<
float
>
data0
=
{
0
,
1
,
2
,
3
};
std
::
vector
<
float
>
data1
=
{
4
,
5
,
6
,
7
,
8
,
9
};
std
::
vector
<
float
>
data1
=
{
4
,
5
,
6
,
7
,
8
,
9
};
std
::
vector
<
float
>
data2
=
{
10
,
11
};
std
::
vector
<
float
>
data2
=
{
10
,
11
};
...
...
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