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
bd50f338
Unverified
Commit
bd50f338
authored
Oct 09, 2019
by
Scott Cyphers
Committed by
GitHub
Oct 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move annotations from Op to Node (#3738)
parent
a4bf1c43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
node.hpp
src/ngraph/node.hpp
+11
-0
op.hpp
src/ngraph/op/op.hpp
+0
-14
No files found.
src/ngraph/node.hpp
View file @
bd50f338
...
...
@@ -37,6 +37,7 @@
#include "ngraph/descriptor/output.hpp"
#include "ngraph/descriptor/tensor.hpp"
#include "ngraph/op/util/attr_types.hpp"
#include "ngraph/op/util/op_annotations.hpp"
#include "ngraph/placement.hpp"
#include "ngraph/strides.hpp"
#include "ngraph/type.hpp"
...
...
@@ -485,6 +486,15 @@ namespace ngraph
/// \throw std::out_of_range if the node does not have at least `output_index+1` outputs.
Output
<
const
Node
>
output
(
size_t
output_index
)
const
;
void
set_op_annotations
(
std
::
shared_ptr
<
ngraph
::
op
::
util
::
OpAnnotations
>
op_annotations
)
{
m_op_annotations
=
op_annotations
;
}
std
::
shared_ptr
<
ngraph
::
op
::
util
::
OpAnnotations
>
get_op_annotations
()
const
{
return
m_op_annotations
;
}
private
:
descriptor
::
Input
&
get_input_descriptor
(
size_t
position
);
descriptor
::
Output
&
get_output_descriptor
(
size_t
position
);
...
...
@@ -504,6 +514,7 @@ namespace ngraph
std
::
unordered_map
<
Node
*
,
autodiff
::
Adjoints
>
m_adjoint_map
;
Placement
m_placement
=
Placement
::
DEFAULT
;
size_t
m_placement_index
=
placement_invalid
;
std
::
shared_ptr
<
ngraph
::
op
::
util
::
OpAnnotations
>
m_op_annotations
;
};
/// \brief A handle for one of a node's inputs.
...
...
src/ngraph/op/op.hpp
View file @
bd50f338
...
...
@@ -18,9 +18,7 @@
#include <string>
#include "ngraph/autodiff/adjoints.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/util/op_annotations.hpp"
namespace
ngraph
{
...
...
@@ -30,15 +28,6 @@ namespace ngraph
class
Op
:
public
Node
{
public
:
void
set_op_annotations
(
std
::
shared_ptr
<
ngraph
::
op
::
util
::
OpAnnotations
>
op_annotations
)
{
m_op_annotations
=
op_annotations
;
}
std
::
shared_ptr
<
ngraph
::
op
::
util
::
OpAnnotations
>
get_op_annotations
()
const
{
return
m_op_annotations
;
}
virtual
bool
is_op
()
const
override
{
return
true
;
}
protected
:
Op
()
...
...
@@ -48,9 +37,6 @@ namespace ngraph
Op
(
const
NodeVector
&
arguments
);
Op
(
const
OutputVector
&
arguments
);
Op
(
const
std
::
string
&
node_type
,
const
NodeVector
&
arguments
);
private
:
std
::
shared_ptr
<
ngraph
::
op
::
util
::
OpAnnotations
>
m_op_annotations
;
};
}
}
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