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
60ca608c
Commit
60ca608c
authored
6 years ago
by
Diego Caballero
Committed by
Scott Cyphers
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make 'use_mkldnn_kernel' properly deal with non-ops nodes (#2602)
Previous code silently crashes when node is not a op.
parent
6e877f6c
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
mkldnn_utils.cpp
src/ngraph/runtime/cpu/mkldnn_utils.cpp
+9
-4
No files found.
src/ngraph/runtime/cpu/mkldnn_utils.cpp
View file @
60ca608c
...
...
@@ -678,10 +678,15 @@ bool runtime::cpu::mkldnn_utils::is_mkldnn_padded_layout(const mkldnn::memory::d
bool
runtime
::
cpu
::
mkldnn_utils
::
use_mkldnn_kernel
(
const
ngraph
::
Node
*
node
)
{
auto
op_annotations
=
static_cast
<
const
ngraph
::
op
::
Op
*>
(
node
)
->
get_op_annotations
();
return
(
op_annotations
&&
static_pointer_cast
<
ngraph
::
runtime
::
cpu
::
CPUOpAnnotations
>
(
op_annotations
)
->
is_mkldnn_op
());
if
(
auto
*
op_node
=
dynamic_cast
<
const
ngraph
::
op
::
Op
*>
(
node
))
{
auto
op_annotations
=
op_node
->
get_op_annotations
();
return
(
op_annotations
&&
static_pointer_cast
<
ngraph
::
runtime
::
cpu
::
CPUOpAnnotations
>
(
op_annotations
)
->
is_mkldnn_op
());
}
return
false
;
}
void
runtime
::
cpu
::
mkldnn_utils
::
assign_mkldnn_kernel
(
Node
*
node
)
...
...
This diff is collapsed.
Click to expand it.
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