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
09c1d3b1
Commit
09c1d3b1
authored
Aug 17, 2018
by
Jayaram Bobba
Committed by
Scott Cyphers
Aug 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix to TBB functor capture logic while using DEX (#1437)
parent
d5641c18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
cpu_external_function.cpp
src/ngraph/runtime/cpu/cpu_external_function.cpp
+9
-5
No files found.
src/ngraph/runtime/cpu/cpu_external_function.cpp
View file @
09c1d3b1
...
...
@@ -1372,10 +1372,17 @@ void runtime::cpu::CPU_ExternalFunction::build()
auto
it
=
enable_nodename_list
.
begin
();
for
(
const
auto
&
p
:
enables
)
{
std
::
vector
<
std
::
function
<
void
(
CPURuntimeContext
*
)
>>
ftrs
;
for
(
size_t
j
=
0
;
j
<
p
.
second
;
j
++
)
{
ftrs
.
push_back
(
*
functor
);
std
::
advance
(
functor
,
1
);
}
tbb
::
flow
::
continue_node
<
tbb
::
flow
::
continue_msg
,
tbb
::
flow
::
lightweight
>*
flowgraph_node
=
new
tbb
::
flow
::
continue_node
<
tbb
::
flow
::
continue_msg
,
tbb
::
flow
::
lightweight
>
(
*
(
ctx
->
G
),
[
&
](
const
tbb
::
flow
::
continue_msg
&
msg
)
{
*
(
ctx
->
G
),
[
&
,
ftrs
](
const
tbb
::
flow
::
continue_msg
&
msg
)
{
if
(
p
.
first
(
ctx
)
||
ctx
->
first_iteration
)
{
for
(
size_t
j
=
0
;
j
<
p
.
second
;
j
++
)
...
...
@@ -1384,7 +1391,7 @@ void runtime::cpu::CPU_ExternalFunction::build()
{
start_ts
=
cpu
::
Clock
::
now
();
}
(
*
functor
)
(
ctx
);
ftrs
[
j
]
(
ctx
);
if
(
runtime
::
cpu
::
IsTracingEnabled
())
{
ctx
->
op_durations
[
profiler_count
++
]
=
...
...
@@ -1392,8 +1399,6 @@ void runtime::cpu::CPU_ExternalFunction::build()
cpu
::
Clock
::
now
()
-
start_ts
))
.
count
();
}
std
::
advance
(
functor
,
1
);
}
}
else
...
...
@@ -1405,7 +1410,6 @@ void runtime::cpu::CPU_ExternalFunction::build()
ctx
->
op_durations
[
profiler_count
++
]
=
0
;
}
}
std
::
advance
(
functor
,
p
.
second
);
}
});
nodename_tbbnode_map
.
insert
({
it
->
second
,
flowgraph_node
});
...
...
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