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
4b7a267a
Commit
4b7a267a
authored
Apr 08, 2019
by
Paul
Browse files
Merge from develop
parents
92803edf
af00eea8
Changes
124
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
2 deletions
+43
-2
test/schedule_test.cpp
test/schedule_test.cpp
+1
-1
test/tf/pack_test.pb
test/tf/pack_test.pb
+19
-0
test/tf/tf_test.cpp
test/tf/tf_test.cpp
+22
-0
tools/include/concat_opt.hpp
tools/include/concat_opt.hpp
+1
-1
No files found.
test/schedule_test.cpp
View file @
4b7a267a
#include <migraphx/schedule.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/identity
.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/iterator_for.hpp>
...
...
test/tf/pack_test.pb
0 → 100644
View file @
4b7a267a
.
0Placeholder*
shape:*
dtype0
.
1Placeholder*
dtype0*
shape:
.
2Placeholder*
dtype0*
shape:
4
pack1Pack012*
T0*
axis*
N"
\ No newline at end of file
test/tf/tf_test.cpp
View file @
4b7a267a
...
...
@@ -129,6 +129,28 @@ TEST_CASE(identity_test)
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
pack_test
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
}});
auto
l1
=
p
.
add_parameter
(
"1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
}});
auto
l2
=
p
.
add_parameter
(
"2"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
}});
std
::
vector
<
migraphx
::
instruction_ref
>
args
{
l0
,
l1
,
l2
};
std
::
vector
<
migraphx
::
instruction_ref
>
unsqueezed_args
;
int64_t
axis
=
1
;
std
::
transform
(
args
.
begin
(),
args
.
end
(),
std
::
back_inserter
(
unsqueezed_args
),
[
&
](
migraphx
::
instruction_ref
arg
)
{
return
p
.
add_instruction
(
migraphx
::
op
::
unsqueeze
{{
axis
}},
arg
);
});
p
.
add_instruction
(
migraphx
::
op
::
concat
{
static_cast
<
size_t
>
(
axis
)},
unsqueezed_args
);
auto
prog
=
migraphx
::
parse_tf
(
"pack_test.pb"
,
false
);
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
pooling_test
)
{
migraphx
::
program
p
;
...
...
tools/include/concat_opt.hpp
View file @
4b7a267a
...
...
@@ -9,7 +9,7 @@
#include <utility>
#include <migraphx/operation.hpp>
#include <migraphx/op
erators
.hpp>
#include <migraphx/op
/concat
.hpp>
#include <migraphx/config.hpp>
namespace
migraphx
{
...
...
Prev
1
…
3
4
5
6
7
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