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
e873255d
Commit
e873255d
authored
Jan 27, 2019
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add backend remove_compiled_function
parent
1132afe5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
3 deletions
+30
-3
backend.cpp
src/ngraph/runtime/backend.cpp
+4
-0
backend.hpp
src/ngraph/runtime/backend.hpp
+2
-0
cpu_backend.cpp
src/ngraph/runtime/cpu/cpu_backend.cpp
+12
-0
cpu_backend.hpp
src/ngraph/runtime/cpu/cpu_backend.hpp
+2
-0
intelgpu_backend.cpp
src/ngraph/runtime/intelgpu/intelgpu_backend.cpp
+9
-2
intelgpu_backend.hpp
src/ngraph/runtime/intelgpu/intelgpu_backend.hpp
+1
-1
No files found.
src/ngraph/runtime/backend.cpp
View file @
e873255d
...
...
@@ -144,6 +144,10 @@ bool runtime::Backend::is_supported_property(const Property prop) const
return
false
;
}
void
runtime
::
Backend
::
remove_compiled_function
(
std
::
shared_ptr
<
Executable
>
exec
)
{
}
bool
runtime
::
Backend
::
call_with_validate
(
std
::
shared_ptr
<
Executable
>
exec
,
const
std
::
vector
<
std
::
shared_ptr
<
runtime
::
Tensor
>>&
outputs
,
...
...
src/ngraph/runtime/backend.hpp
View file @
e873255d
...
...
@@ -101,6 +101,8 @@ public:
/// \returns true if the property is supported, false otherwise.
virtual
bool
is_supported_property
(
const
Property
prop
)
const
;
virtual
void
remove_compiled_function
(
std
::
shared_ptr
<
Executable
>
exec
);
/// The following methods are temporary hacks to reduce the number of changes in this PR
/// They will be removed in a follow-on PR
bool
call_with_validate
(
std
::
shared_ptr
<
Executable
>
handle
,
...
...
src/ngraph/runtime/cpu/cpu_backend.cpp
View file @
e873255d
...
...
@@ -121,6 +121,18 @@ bool runtime::cpu::CPU_Executable::call(const vector<shared_ptr<runtime::Tensor>
return
rc
;
}
void
runtime
::
cpu
::
CPU_Backend
::
remove_compiled_function
(
shared_ptr
<
Executable
>
exec
)
{
for
(
auto
it
=
m_exec_map
.
begin
();
it
!=
m_exec_map
.
end
();
++
it
)
{
if
(
it
->
second
==
exec
)
{
m_exec_map
.
erase
(
it
);
break
;
}
}
}
vector
<
runtime
::
PerformanceCounter
>
runtime
::
cpu
::
CPU_Executable
::
get_performance_data
()
const
{
vector
<
runtime
::
PerformanceCounter
>
rc
;
...
...
src/ngraph/runtime/cpu/cpu_backend.hpp
View file @
e873255d
...
...
@@ -49,6 +49,8 @@ namespace ngraph
compile
(
std
::
shared_ptr
<
Function
>
func
,
bool
enable_performance_counters
=
false
)
override
;
void
remove_compiled_function
(
shared_ptr
<
Executable
>
exec
)
override
;
bool
is_supported
(
const
Node
&
node
)
const
override
;
bool
is_supported_property
(
const
Property
prop
)
const
override
;
...
...
src/ngraph/runtime/intelgpu/intelgpu_backend.cpp
View file @
e873255d
...
...
@@ -1903,9 +1903,16 @@ bool runtime::intelgpu::IntelGPUExecutable::call(const vector<shared_ptr<runtime
return
true
;
}
void
runtime
::
intelgpu
::
IntelGPUBackend
::
remove_compiled_function
(
shared_ptr
<
Function
>
fun
c
)
void
runtime
::
intelgpu
::
IntelGPUBackend
::
remove_compiled_function
(
shared_ptr
<
Executable
>
exe
c
)
{
ocl_networks
.
erase
(
func
);
for
(
auto
it
=
ocl_networks
.
begin
();
it
!=
ocl_networks
.
end
();
++
it
)
{
if
(
it
->
second
==
exec
)
{
ocl_networks
.
erase
(
it
);
break
;
}
}
}
// The cldnn::network contains something like "generic_layer_0_Parameter_254_0" names
...
...
src/ngraph/runtime/intelgpu/intelgpu_backend.hpp
View file @
e873255d
...
...
@@ -50,7 +50,7 @@ public:
std
::
shared_ptr
<
runtime
::
Executable
>
compile
(
std
::
shared_ptr
<
Function
>
func
,
bool
enable_timing
=
false
)
override
;
void
remove_compiled_function
(
std
::
shared_ptr
<
Function
>
func
)
;
void
remove_compiled_function
(
std
::
shared_ptr
<
runtime
::
Executable
>
exec
)
override
;
bool
is_supported_property
(
const
Property
prop
)
const
override
;
...
...
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