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
2cdb76cc
Commit
2cdb76cc
authored
Jun 24, 2019
by
Jayaram Bobba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove static cache in unit test since backends keep cache of compiled functions already
parent
5b113919
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
28 deletions
+2
-28
backprop_derivative.hpp
test/util/autodiff/backprop_derivative.hpp
+2
-28
No files found.
test/util/autodiff/backprop_derivative.hpp
View file @
2cdb76cc
...
...
@@ -90,20 +90,7 @@ namespace ngraph
auto
c_vec
=
read_vector
<
T
>
(
c_arg
);
fill
(
c_vec
.
begin
(),
c_vec
.
end
(),
static_cast
<
T
>
(
0
));
static
std
::
unordered_map
<
std
::
shared_ptr
<
Function
>
,
std
::
shared_ptr
<
runtime
::
Executable
>>
s_compiled_functions
;
auto
it
=
s_compiled_functions
.
find
(
df
);
std
::
shared_ptr
<
runtime
::
Executable
>
df_handle
;
if
(
it
==
s_compiled_functions
.
end
())
{
df_handle
=
backend
->
compile
(
df
);
s_compiled_functions
.
insert
({
df
,
df_handle
});
}
else
{
df_handle
=
it
->
second
;
}
auto
df_handle
=
backend
->
compile
(
df
);
// for each element of the adjoint
// same as saying for each element of y
...
...
@@ -212,20 +199,7 @@ namespace ngraph
s_clone_fwd_map
[
f
]
=
clone_function
(
*
fprop_cache
.
fprop
);
}
auto
clone_fwd
=
s_clone_fwd_map
[
f
];
static
std
::
unordered_map
<
std
::
shared_ptr
<
Function
>
,
std
::
shared_ptr
<
runtime
::
Executable
>>
s_compiled_functions
;
auto
it
=
s_compiled_functions
.
find
(
clone_fwd
);
std
::
shared_ptr
<
runtime
::
Executable
>
clone_fwd_handle
;
if
(
it
==
s_compiled_functions
.
end
())
{
clone_fwd_handle
=
backend
->
compile
(
clone_fwd
);
s_compiled_functions
.
insert
({
clone_fwd
,
clone_fwd_handle
});
}
else
{
clone_fwd_handle
=
it
->
second
;
}
auto
clone_fwd_handle
=
backend
->
compile
(
clone_fwd
);
clone_fwd_handle
->
call_with_validate
(
mod_f_output_args
,
f_input_args
);
...
...
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