Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
0c5d5a65
Commit
0c5d5a65
authored
Oct 23, 2017
by
Jaikrishnan Menon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: Enable more concatenation tests
parent
1e73a52c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
17 deletions
+8
-17
emitter.cpp
src/ngraph/runtime/cpu/emitter.cpp
+1
-10
cpu.cpp
test/cpu.cpp
+7
-7
No files found.
src/ngraph/runtime/cpu/emitter.cpp
View file @
0c5d5a65
...
...
@@ -195,7 +195,7 @@ void Emitter::EMITTER_DECL(EmitConcat)
to_string
(
inputs
[
i
].
get_tensor_view_layout
()
->
get_shape
().
at
(
0
))
+
") << "
"EigenVector<"
+
element_type_names
[
TI
(
result_element_type
)]
+
">(call_frame->"
"get_tensor_view_data<"
+
element_type_names
[
TI
(
result_element_type
)]
+
">("
+
to_string
(
outputs
[
0
].
get_index
())
+
"), "
to_string
(
inputs
[
i
].
get_index
())
+
"), "
EIGEN_VECTOR_FORMAT
(
inputs
[
i
].
get_layout
<
DenseTensorViewLayout
>
()
->
get_size
())
");
\n
"
;
concat_pos
+=
inputs
[
i
].
get_tensor_view_layout
()
->
get_shape
().
at
(
0
);
}
...
...
@@ -204,15 +204,6 @@ void Emitter::EMITTER_DECL(EmitConcat)
}
else
if
(
result_shape
.
size
()
==
2
)
{
/*
PUSH_POLYMORPHIC_INSTRUCTION(
result_element_type,
"Concat has unhandled element type",
eigen::ConcatMatrixInstruction,
in,
(dynamic_cast<const op::Concat*>(n))->get_concatenation_axis(),
out[0]);
*/
auto
out_layout
=
outputs
[
0
].
get_layout
<
DenseTensorViewLayout
>
();
auto
axis
=
(
dynamic_cast
<
const
op
::
Concat
*>
(
n
))
->
get_concatenation_axis
();
...
...
test/cpu.cpp
View file @
0c5d5a65
...
...
@@ -293,8 +293,7 @@ TEST(cpu, concat_matrix_colwise)
result
->
get_vector
());
}
/*
TEST(execute, concat_matrix_rowwise)
TEST
(
cpu
,
concat_matrix_rowwise
)
{
auto
shape_a
=
Shape
{
2
,
2
};
auto
A
=
make_shared
<
op
::
Parameter
>
(
element
::
Float32
::
element_type
(),
shape_a
);
...
...
@@ -307,7 +306,7 @@ TEST(execute, concat_matrix_rowwise)
auto
f
=
make_shared
<
Function
>
(
make_shared
<
op
::
Concat
>
(
Nodes
{
A
,
B
,
C
},
0
),
rt
,
op
::
Parameters
{
A
,
B
,
C
});
auto manager = runtime::Manager::get("
NGVM
");
auto
manager
=
runtime
::
Manager
::
get
(
"
CPU
"
);
auto
external
=
manager
->
compile
(
f
);
auto
backend
=
manager
->
allocate_backend
();
auto
cf
=
backend
->
make_call_frame
(
external
);
...
...
@@ -326,7 +325,7 @@ TEST(execute, concat_matrix_rowwise)
result
->
get_vector
());
}
TEST(
execute
, concat_matrix_int64)
TEST
(
cpu
,
concat_matrix_int64
)
{
auto
shape_a
=
Shape
{
2
,
2
};
auto
A
=
make_shared
<
op
::
Parameter
>
(
element
::
Int64
::
element_type
(),
shape_a
);
...
...
@@ -339,7 +338,7 @@ TEST(execute, concat_matrix_int64)
auto
f
=
make_shared
<
Function
>
(
make_shared
<
op
::
Concat
>
(
Nodes
{
A
,
B
,
C
},
0
),
rt
,
op
::
Parameters
{
A
,
B
,
C
});
auto manager = runtime::Manager::get("
NGVM
");
auto
manager
=
runtime
::
Manager
::
get
(
"
CPU
"
);
auto
external
=
manager
->
compile
(
f
);
auto
backend
=
manager
->
allocate_backend
();
auto
cf
=
backend
->
make_call_frame
(
external
);
...
...
@@ -358,7 +357,7 @@ TEST(execute, concat_matrix_int64)
result
->
get_vector
());
}
TEST(
execute
, concat_vector)
TEST
(
cpu
,
concat_vector
)
{
auto
shape_a
=
Shape
{
4
};
auto
A
=
make_shared
<
op
::
Parameter
>
(
element
::
Float32
::
element_type
(),
shape_a
);
...
...
@@ -371,7 +370,7 @@ TEST(execute, concat_vector)
auto
f
=
make_shared
<
Function
>
(
make_shared
<
op
::
Concat
>
(
Nodes
{
A
,
B
,
C
},
0
),
rt
,
op
::
Parameters
{
A
,
B
,
C
});
auto manager = runtime::Manager::get("
NGVM
");
auto
manager
=
runtime
::
Manager
::
get
(
"
CPU
"
);
auto
external
=
manager
->
compile
(
f
);
auto
backend
=
manager
->
allocate_backend
();
auto
cf
=
backend
->
make_call_frame
(
external
);
...
...
@@ -389,6 +388,7 @@ TEST(execute, concat_vector)
ASSERT_EQ
((
vector
<
float
>
{
2
,
4
,
8
,
16
,
1
,
2
,
4
,
8
,
16
,
32
,
18
,
19
}),
result
->
get_vector
());
}
/*
TEST(execute, divide)
{
auto manager = runtime::Manager::get("NGVM");
...
...
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