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
c70c2798
Unverified
Commit
c70c2798
authored
5 years ago
by
Scott Cyphers
Committed by
GitHub
5 years ago
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3371 from NervanaSystems/cyphers/patterndesc
Convert pattern ops to type_name
parents
e7e4e860
13de24d6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
6 deletions
+30
-6
any.hpp
src/ngraph/pattern/op/any.hpp
+7
-1
any_of.hpp
src/ngraph/pattern/op/any_of.hpp
+7
-1
label.hpp
src/ngraph/pattern/op/label.hpp
+7
-1
pattern.hpp
src/ngraph/pattern/op/pattern.hpp
+2
-2
skip.hpp
src/ngraph/pattern/op/skip.hpp
+7
-1
No files found.
src/ngraph/pattern/op/any.hpp
View file @
c70c2798
...
@@ -34,7 +34,7 @@ namespace ngraph
...
@@ -34,7 +34,7 @@ namespace ngraph
const
PartialShape
&
s
,
const
PartialShape
&
s
,
Predicate
pred
,
Predicate
pred
,
const
NodeVector
&
wrapped_nodes
)
const
NodeVector
&
wrapped_nodes
)
:
Pattern
(
"Any"
,
wrapped_nodes
,
pred
)
:
Pattern
(
wrapped_nodes
,
pred
)
{
{
if
(
!
pred
)
if
(
!
pred
)
{
{
...
@@ -51,6 +51,12 @@ namespace ngraph
...
@@ -51,6 +51,12 @@ namespace ngraph
wrapped_nodes
)
wrapped_nodes
)
{
{
}
}
const
std
::
string
&
description
()
const
override
{
static
std
::
string
desc
=
"Any"
;
return
desc
;
}
};
};
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/pattern/op/any_of.hpp
View file @
c70c2798
...
@@ -40,7 +40,7 @@ namespace ngraph
...
@@ -40,7 +40,7 @@ namespace ngraph
const
PartialShape
&
s
,
const
PartialShape
&
s
,
Predicate
pred
,
Predicate
pred
,
const
NodeVector
&
wrapped_nodes
)
const
NodeVector
&
wrapped_nodes
)
:
Pattern
(
"AnyOf"
,
wrapped_nodes
,
pred
)
:
Pattern
(
wrapped_nodes
,
pred
)
{
{
if
(
!
pred
)
if
(
!
pred
)
{
{
...
@@ -62,6 +62,12 @@ namespace ngraph
...
@@ -62,6 +62,12 @@ namespace ngraph
wrapped_nodes
)
wrapped_nodes
)
{
{
}
}
const
std
::
string
&
description
()
const
override
{
static
std
::
string
desc
=
"AnyOf"
;
return
desc
;
}
};
};
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/pattern/op/label.hpp
View file @
c70c2798
...
@@ -44,7 +44,7 @@ namespace ngraph
...
@@ -44,7 +44,7 @@ namespace ngraph
const
PartialShape
&
s
,
const
PartialShape
&
s
,
Predicate
pred
=
nullptr
,
Predicate
pred
=
nullptr
,
const
NodeVector
&
wrapped_nodes
=
NodeVector
{})
const
NodeVector
&
wrapped_nodes
=
NodeVector
{})
:
Pattern
(
"Label"
,
wrapped_nodes
,
pred
)
:
Pattern
(
wrapped_nodes
,
pred
)
{
{
set_output_type
(
0
,
type
,
s
);
set_output_type
(
0
,
type
,
s
);
}
}
...
@@ -67,6 +67,12 @@ namespace ngraph
...
@@ -67,6 +67,12 @@ namespace ngraph
wrapped_nodes
)
wrapped_nodes
)
{
{
}
}
const
std
::
string
&
description
()
const
override
{
static
std
::
string
desc
=
"Label"
;
return
desc
;
}
};
};
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/pattern/op/pattern.hpp
View file @
c70c2798
...
@@ -33,8 +33,8 @@ namespace ngraph
...
@@ -33,8 +33,8 @@ namespace ngraph
public
:
public
:
/// \brief \p a base class for \sa Skip and \sa Label
/// \brief \p a base class for \sa Skip and \sa Label
///
///
Pattern
(
const
std
::
string
&
type_name
,
const
NodeVector
&
nodes
,
Predicate
pred
)
Pattern
(
const
NodeVector
&
nodes
,
Predicate
pred
)
:
Node
(
type_name
,
nodes
)
:
Node
(
nodes
)
,
m_predicate
(
pred
)
,
m_predicate
(
pred
)
{
{
}
}
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/pattern/op/skip.hpp
View file @
c70c2798
...
@@ -32,10 +32,16 @@ namespace ngraph
...
@@ -32,10 +32,16 @@ namespace ngraph
{
{
public
:
public
:
Skip
(
const
std
::
shared_ptr
<
Node
>&
arg
,
Predicate
predicate
=
nullptr
)
Skip
(
const
std
::
shared_ptr
<
Node
>&
arg
,
Predicate
predicate
=
nullptr
)
:
Pattern
(
"Skip"
,
NodeVector
{
arg
},
predicate
)
:
Pattern
(
NodeVector
{
arg
},
predicate
)
{
{
set_output_type
(
0
,
arg
->
get_element_type
(),
arg
->
get_output_partial_shape
(
0
));
set_output_type
(
0
,
arg
->
get_element_type
(),
arg
->
get_output_partial_shape
(
0
));
}
}
const
std
::
string
&
description
()
const
override
{
static
std
::
string
desc
=
"Skip"
;
return
desc
;
}
};
};
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
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