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
af889535
Commit
af889535
authored
Nov 07, 2018
by
Adam Procter
Committed by
Scott Cyphers
Nov 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pattern ops to propagate partial shapes (#1986)
parent
4918449c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
any.hpp
src/ngraph/pattern/op/any.hpp
+5
-2
label.hpp
src/ngraph/pattern/op/label.hpp
+5
-2
skip.hpp
src/ngraph/pattern/op/skip.hpp
+1
-1
No files found.
src/ngraph/pattern/op/any.hpp
View file @
af889535
...
...
@@ -31,7 +31,7 @@ namespace ngraph
public
:
/// \brief creates a Any node containing a sub-pattern described by \sa type and \sa shape.
Any
(
const
element
::
Type
&
type
,
const
Shape
s
,
const
PartialShape
&
s
,
Predicate
pred
,
const
NodeVector
&
wrapped_nodes
)
:
Pattern
(
"Any"
,
wrapped_nodes
,
pred
)
...
...
@@ -45,7 +45,10 @@ namespace ngraph
/// \brief creates a Any node containing a sub-pattern described by the type and shape of \sa node.
Any
(
std
::
shared_ptr
<
Node
>
node
,
Predicate
pred
,
const
NodeVector
&
wrapped_nodes
)
:
Any
(
node
->
get_element_type
(),
node
->
get_shape
(),
pred
,
wrapped_nodes
)
:
Any
(
node
->
get_element_type
(),
node
->
get_output_partial_shape
(
0
),
pred
,
wrapped_nodes
)
{
}
};
...
...
src/ngraph/pattern/op/label.hpp
View file @
af889535
...
...
@@ -41,7 +41,7 @@ namespace ngraph
/// auto label = std::make_shared<pattern::op::Label>(element::f32, Shape{2,2} , nullptr, NodeVector{add});
/// \endcode
Label
(
const
element
::
Type
&
type
,
const
Shape
s
,
const
PartialShape
&
s
,
Predicate
pred
=
nullptr
,
const
NodeVector
&
wrapped_nodes
=
NodeVector
{})
:
Pattern
(
"Label"
,
wrapped_nodes
,
pred
)
...
...
@@ -61,7 +61,10 @@ namespace ngraph
Label
(
std
::
shared_ptr
<
Node
>
node
,
Predicate
pred
=
nullptr
,
const
NodeVector
&
wrapped_nodes
=
NodeVector
{})
:
Label
(
node
->
get_element_type
(),
node
->
get_shape
(),
pred
,
wrapped_nodes
)
:
Label
(
node
->
get_element_type
(),
node
->
get_output_partial_shape
(
0
),
pred
,
wrapped_nodes
)
{
}
};
...
...
src/ngraph/pattern/op/skip.hpp
View file @
af889535
...
...
@@ -34,7 +34,7 @@ namespace ngraph
Skip
(
const
std
::
shared_ptr
<
Node
>&
arg
,
Predicate
predicate
=
nullptr
)
:
Pattern
(
"Skip"
,
NodeVector
{
arg
},
predicate
)
{
set_output_type
(
0
,
arg
->
get_element_type
(),
arg
->
get_
shape
(
));
set_output_type
(
0
,
arg
->
get_element_type
(),
arg
->
get_
output_partial_shape
(
0
));
}
};
}
...
...
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