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
e18aa2fa
Commit
e18aa2fa
authored
Jul 20, 2018
by
Nick Korovaiko
Committed by
Scott Cyphers
Jul 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extra checks from CPUAssigment (#1241)
* simplify inplace reshape * relax check in emitter
parent
fe894895
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
cpu_emitter.cpp
src/ngraph/runtime/cpu/cpu_emitter.cpp
+1
-3
cpu_assignment.cpp
src/ngraph/runtime/cpu/pass/cpu_assignment.cpp
+1
-7
No files found.
src/ngraph/runtime/cpu/cpu_emitter.cpp
View file @
e18aa2fa
...
@@ -1652,9 +1652,7 @@ namespace ngraph
...
@@ -1652,9 +1652,7 @@ namespace ngraph
void
CPU_Emitter
::
EMITTER_DECL
(
ngraph
::
op
::
Reshape
)
void
CPU_Emitter
::
EMITTER_DECL
(
ngraph
::
op
::
Reshape
)
{
{
auto
reshape
=
static_cast
<
const
ngraph
::
op
::
Reshape
*>
(
node
);
auto
reshape
=
static_cast
<
const
ngraph
::
op
::
Reshape
*>
(
node
);
auto
annotation
=
reshape
->
get_op_annotations
();
if
(
!
reshape
->
get_is_transpose
()
&&
out
[
0
].
get_name
()
==
args
[
0
].
get_name
())
if
(
annotation
&&
annotation
->
get_in_place_oi_pairs
().
size
()
>
0
&&
out
[
0
].
get_name
()
==
args
[
0
].
get_name
())
{
{
writer
.
block_begin
();
writer
.
block_begin
();
writer
<<
"// Stride change only, skipping.
\n
"
;
writer
<<
"// Stride change only, skipping.
\n
"
;
...
...
src/ngraph/runtime/cpu/pass/cpu_assignment.cpp
View file @
e18aa2fa
...
@@ -548,13 +548,7 @@ namespace ngraph
...
@@ -548,13 +548,7 @@ namespace ngraph
// not in the memory pool, or has output users.
// not in the memory pool, or has output users.
bool
need_copy
=
bool
need_copy
=
reshape
->
get_is_transpose
()
||
arg
->
is_parameter
()
||
arg
->
is_constant
();
reshape
->
get_is_transpose
()
||
arg
->
is_parameter
()
||
arg
->
is_constant
();
for
(
auto
n
=
users
.
begin
();
!
need_copy
&&
n
!=
users
.
end
();
++
n
)
{
if
((
*
n
)
->
is_output
())
{
need_copy
=
true
;
}
}
if
(
!
need_copy
)
if
(
!
need_copy
)
{
{
// map output to the input memory
// map output to the input memory
...
...
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