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
db2de1b3
Unverified
Commit
db2de1b3
authored
Jun 26, 2019
by
Fenglei Tian
Committed by
GitHub
Jun 26, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into tfl/send_recv_op
parents
c1680ce3
1960a44d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
node.hpp
src/ngraph/node.hpp
+1
-0
generate_mask.hpp
src/ngraph/op/experimental/generate_mask.hpp
+2
-0
cpu_external_function.cpp
src/ngraph/runtime/cpu/cpu_external_function.cpp
+3
-2
No files found.
src/ngraph/node.hpp
View file @
db2de1b3
...
...
@@ -216,6 +216,7 @@ namespace ngraph
virtual
bool
is_op
()
const
{
return
false
;
}
virtual
bool
is_commutative
()
{
return
false
;
}
virtual
bool
is_dynamic
()
const
;
virtual
bool
has_state
()
const
{
return
false
;
}
size_t
get_instance_id
()
const
{
return
m_instance_id
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
,
const
Node
&
);
virtual
std
::
ostream
&
write_short_description
(
std
::
ostream
&
)
const
;
...
...
src/ngraph/op/experimental/generate_mask.hpp
View file @
db2de1b3
...
...
@@ -72,6 +72,8 @@ namespace ngraph
/// \brief Returns the seed value supplied to a random generator
uint64_t
get_seed
()
const
{
return
m_seed
;
}
bool
get_use_seed
()
const
{
return
m_use_seed
;
}
/// GenerateMask has state.
bool
has_state
()
const
override
{
return
true
;
}
protected
:
virtual
void
generate_adjoints
(
autodiff
::
Adjoints
&
adjoints
,
const
NodeVector
&
deltas
)
override
...
...
src/ngraph/runtime/cpu/cpu_external_function.cpp
View file @
db2de1b3
...
...
@@ -924,7 +924,8 @@ using namespace ngraph::runtime;
// Always enable nodes computing output tensors or nodes whose outputs might get
// overwritten due to inplace kernels
// TODO (jbobba) - Do we need to handle cacheability
if
(
computes_result
(
node
.
get
())
||
possibly_overwritten
(
node
.
get
()))
if
(
computes_result
(
node
.
get
())
||
possibly_overwritten
(
node
.
get
())
||
node
->
has_state
())
{
writer
<<
" || 1"
;
}
...
...
@@ -1423,7 +1424,7 @@ void runtime::cpu::CPU_ExternalFunction::build(ngraph::pass::PassConfig& pass_co
bool
disable_caching
=
(
reuse_memory
&&
!
cacheable
)
// Check cacheability only if we are reusing intermediate tensors
||
computes_result
(
node
.
get
())
||
possibly_overwritten
(
node
.
get
());
||
computes_result
(
node
.
get
())
||
possibly_overwritten
(
node
.
get
())
||
node
->
has_state
()
;
vector
<
reference_wrapper
<
bool
>>
in_stale
,
out_stale
;
for
(
const
auto
&
name
:
in_names
)
...
...
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