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
706e705e
Commit
706e705e
authored
Sep 12, 2019
by
Ashok Emani
Committed by
Scott Cyphers
Sep 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve -wall warnings with clang-8 (#3602)
* resolve -wall warnings with clang-8 * remove -Wno-extra-semi-stmt
parent
b0373e3f
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
152 additions
and
159 deletions
+152
-159
graph_util.cpp
src/ngraph/graph_util.cpp
+2
-2
elu.hpp
src/ngraph/op/fused/elu.hpp
+1
-1
gru_cell.hpp
src/ngraph/op/fused/gru_cell.hpp
+0
-1
lstm_cell.hpp
src/ngraph/op/fused/lstm_cell.hpp
+0
-1
matmul.hpp
src/ngraph/op/fused/matmul.hpp
+2
-2
mvn.hpp
src/ngraph/op/fused/mvn.hpp
+3
-3
shuffle_channels.hpp
src/ngraph/op/fused/shuffle_channels.hpp
+1
-1
recv.hpp
src/ngraph/op/recv.hpp
+1
-1
send.hpp
src/ngraph/op/send.hpp
+1
-1
implicit_broadcast_elimination.cpp
src/ngraph/pass/implicit_broadcast_elimination.cpp
+1
-1
argmax.cpp
src/ngraph/runtime/cpu/builder/argmax.cpp
+6
-6
argmin.cpp
src/ngraph/runtime/cpu/builder/argmin.cpp
+6
-6
avg_pool.cpp
src/ngraph/runtime/cpu/builder/avg_pool.cpp
+2
-3
batch_norm.cpp
src/ngraph/runtime/cpu/builder/batch_norm.cpp
+3
-3
bounded_relu.cpp
src/ngraph/runtime/cpu/builder/bounded_relu.cpp
+1
-1
broadcast.cpp
src/ngraph/runtime/cpu/builder/broadcast.cpp
+1
-1
concat.cpp
src/ngraph/runtime/cpu/builder/concat.cpp
+1
-1
convert.cpp
src/ngraph/runtime/cpu/builder/convert.cpp
+11
-11
convolution.cpp
src/ngraph/runtime/cpu/builder/convolution.cpp
+3
-3
dot.cpp
src/ngraph/runtime/cpu/builder/dot.cpp
+5
-5
erf.cpp
src/ngraph/runtime/cpu/builder/erf.cpp
+1
-1
gather.cpp
src/ngraph/runtime/cpu/builder/gather.cpp
+2
-2
leaky_relu.cpp
src/ngraph/runtime/cpu/builder/leaky_relu.cpp
+1
-1
max_pool.cpp
src/ngraph/runtime/cpu/builder/max_pool.cpp
+2
-3
one_hot.cpp
src/ngraph/runtime/cpu/builder/one_hot.cpp
+3
-3
pad.cpp
src/ngraph/runtime/cpu/builder/pad.cpp
+4
-5
reduction.hpp
src/ngraph/runtime/cpu/builder/reduction.hpp
+1
-1
relu.cpp
src/ngraph/runtime/cpu/builder/relu.cpp
+1
-1
replace_slice.cpp
src/ngraph/runtime/cpu/builder/replace_slice.cpp
+2
-2
reshape.cpp
src/ngraph/runtime/cpu/builder/reshape.cpp
+5
-5
reverse.cpp
src/ngraph/runtime/cpu/builder/reverse.cpp
+1
-1
reverse_sequence.cpp
src/ngraph/runtime/cpu/builder/reverse_sequence.cpp
+1
-1
scatter_add.cpp
src/ngraph/runtime/cpu/builder/scatter_add.cpp
+2
-2
select.cpp
src/ngraph/runtime/cpu/builder/select.cpp
+1
-1
slice.cpp
src/ngraph/runtime/cpu/builder/slice.cpp
+2
-2
softmax.cpp
src/ngraph/runtime/cpu/builder/softmax.cpp
+5
-5
tile.cpp
src/ngraph/runtime/cpu/builder/tile.cpp
+2
-2
update_slice.cpp
src/ngraph/runtime/cpu/builder/update_slice.cpp
+2
-2
cpu_builder.cpp
src/ngraph/runtime/cpu/cpu_builder.cpp
+2
-3
cpu_builder.hpp
src/ngraph/runtime/cpu/cpu_builder.hpp
+4
-4
cpu_external_function.cpp
src/ngraph/runtime/cpu/cpu_external_function.cpp
+34
-35
mkldnn_utils.cpp
src/ngraph/runtime/cpu/mkldnn_utils.cpp
+11
-11
cpu_rnn_fusion.cpp
src/ngraph/runtime/cpu/pass/cpu_rnn_fusion.cpp
+11
-11
cpu_debugger.cpp
test/cpu_debugger.cpp
+1
-1
No files found.
src/ngraph/graph_util.cpp
View file @
706e705e
...
@@ -756,7 +756,7 @@ bool ngraph::check_for_cycles(const ngraph::Function* func,
...
@@ -756,7 +756,7 @@ bool ngraph::check_for_cycles(const ngraph::Function* func,
{
{
is_bkwd_cycle
=
true
;
is_bkwd_cycle
=
true
;
return
true
;
return
true
;
}
;
}
}
}
for
(
auto
param
:
func
->
get_parameters
())
for
(
auto
param
:
func
->
get_parameters
())
...
@@ -768,7 +768,7 @@ bool ngraph::check_for_cycles(const ngraph::Function* func,
...
@@ -768,7 +768,7 @@ bool ngraph::check_for_cycles(const ngraph::Function* func,
{
{
is_bkwd_cycle
=
false
;
is_bkwd_cycle
=
false
;
return
true
;
return
true
;
}
;
}
}
}
// no cycles
// no cycles
return
false
;
return
false
;
...
...
src/ngraph/op/fused/elu.hpp
View file @
706e705e
...
@@ -48,7 +48,7 @@ namespace ngraph
...
@@ -48,7 +48,7 @@ namespace ngraph
double
get_alpha
()
const
{
return
m_alpha
;
}
double
get_alpha
()
const
{
return
m_alpha
;
}
private
:
private
:
const
double
m_alpha
;
double
m_alpha
;
};
};
}
// namespace op
}
// namespace op
}
// namespace ngraph
}
// namespace ngraph
src/ngraph/op/fused/gru_cell.hpp
View file @
706e705e
...
@@ -44,7 +44,6 @@ namespace ngraph
...
@@ -44,7 +44,6 @@ namespace ngraph
NGRAPH_API
NGRAPH_API
static
constexpr
NodeTypeInfo
type_info
{
"GRUCell"
,
0
};
static
constexpr
NodeTypeInfo
type_info
{
"GRUCell"
,
0
};
const
NodeTypeInfo
&
get_type_info
()
const
override
{
return
type_info
;
}
const
NodeTypeInfo
&
get_type_info
()
const
override
{
return
type_info
;
}
GRUCell
()
=
default
;
///
///
/// \brief Constructs GRUCell node.
/// \brief Constructs GRUCell node.
///
///
...
...
src/ngraph/op/fused/lstm_cell.hpp
View file @
706e705e
...
@@ -45,7 +45,6 @@ namespace ngraph
...
@@ -45,7 +45,6 @@ namespace ngraph
NGRAPH_API
NGRAPH_API
static
constexpr
NodeTypeInfo
type_info
{
"LSTMCell"
,
0
};
static
constexpr
NodeTypeInfo
type_info
{
"LSTMCell"
,
0
};
const
NodeTypeInfo
&
get_type_info
()
const
override
{
return
type_info
;
}
const
NodeTypeInfo
&
get_type_info
()
const
override
{
return
type_info
;
}
LSTMCell
()
=
default
;
///
///
/// \brief Constructs LSTMCell node.
/// \brief Constructs LSTMCell node.
///
///
...
...
src/ngraph/op/fused/matmul.hpp
View file @
706e705e
...
@@ -51,8 +51,8 @@ namespace ngraph
...
@@ -51,8 +51,8 @@ namespace ngraph
bool
get_transpose_a
()
const
{
return
m_transpose_a
;
}
bool
get_transpose_a
()
const
{
return
m_transpose_a
;
}
bool
get_transpose_b
()
const
{
return
m_transpose_b
;
}
bool
get_transpose_b
()
const
{
return
m_transpose_b
;
}
private
:
private
:
const
bool
m_transpose_a
;
bool
m_transpose_a
;
const
bool
m_transpose_b
;
bool
m_transpose_b
;
};
};
}
// namespace op
}
// namespace op
}
// namespace ngraph
}
// namespace ngraph
src/ngraph/op/fused/mvn.hpp
View file @
706e705e
...
@@ -70,9 +70,9 @@ namespace ngraph
...
@@ -70,9 +70,9 @@ namespace ngraph
bool
get_normalize_variance
()
const
{
return
m_normalize_variance
;
}
bool
get_normalize_variance
()
const
{
return
m_normalize_variance
;
}
AxisSet
get_reduction_axes
()
const
{
return
m_reduction_axes
;
}
AxisSet
get_reduction_axes
()
const
{
return
m_reduction_axes
;
}
private
:
private
:
const
double
m_eps
;
double
m_eps
;
const
bool
m_across_channels
;
bool
m_across_channels
;
const
bool
m_normalize_variance
;
bool
m_normalize_variance
;
AxisSet
m_reduction_axes
;
AxisSet
m_reduction_axes
;
};
};
}
// namespace op
}
// namespace op
...
...
src/ngraph/op/fused/shuffle_channels.hpp
View file @
706e705e
...
@@ -64,7 +64,7 @@ namespace ngraph
...
@@ -64,7 +64,7 @@ namespace ngraph
Shape
get_pre_shuffle_shape
(
const
Shape
&
data_shape
)
const
;
Shape
get_pre_shuffle_shape
(
const
Shape
&
data_shape
)
const
;
int
m_axis
;
int
m_axis
;
const
size_t
m_groups
;
size_t
m_groups
;
};
};
}
}
}
}
src/ngraph/op/recv.hpp
View file @
706e705e
...
@@ -45,7 +45,7 @@ namespace ngraph
...
@@ -45,7 +45,7 @@ namespace ngraph
int
get_src_id
()
const
;
int
get_src_id
()
const
;
private
:
private
:
const
int
m_src_id
;
int
m_src_id
;
};
};
}
}
}
}
src/ngraph/op/send.hpp
View file @
706e705e
...
@@ -45,7 +45,7 @@ namespace ngraph
...
@@ -45,7 +45,7 @@ namespace ngraph
int
get_dest_id
()
const
;
int
get_dest_id
()
const
;
private
:
private
:
const
int
m_dest_id
;
int
m_dest_id
;
};
};
}
}
}
}
src/ngraph/pass/implicit_broadcast_elimination.cpp
View file @
706e705e
...
@@ -37,7 +37,7 @@ static bool broadcast_and_replace(std::shared_ptr<ngraph::Node>& node)
...
@@ -37,7 +37,7 @@ static bool broadcast_and_replace(std::shared_ptr<ngraph::Node>& node)
op
->
input
(
i
).
replace_source_output
(
new_args
[
i
]
->
output
(
0
));
op
->
input
(
i
).
replace_source_output
(
new_args
[
i
]
->
output
(
0
));
}
}
return
true
;
return
true
;
}
;
}
}
}
return
false
;
return
false
;
}
}
...
...
src/ngraph/runtime/cpu/builder/argmax.cpp
View file @
706e705e
...
@@ -58,7 +58,7 @@ namespace ngraph
...
@@ -58,7 +58,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
float
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
;
kernel
,
float
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -81,7 +81,7 @@ namespace ngraph
...
@@ -81,7 +81,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmax
<
float
,
int
,
1
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmax
<
float
,
int
,
1
>
)
>
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
float
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
;
kernel
,
float
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -108,7 +108,7 @@ namespace ngraph
...
@@ -108,7 +108,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
double
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
;
kernel
,
double
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -132,7 +132,7 @@ namespace ngraph
...
@@ -132,7 +132,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
double
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
;
kernel
,
double
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -159,7 +159,7 @@ namespace ngraph
...
@@ -159,7 +159,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
int
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
;
kernel
,
int
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -182,7 +182,7 @@ namespace ngraph
...
@@ -182,7 +182,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmax
<
int
,
int
,
1
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmax
<
int
,
int
,
1
>
)
>
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
int
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
;
kernel
,
int
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmax
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/argmin.cpp
View file @
706e705e
...
@@ -58,7 +58,7 @@ namespace ngraph
...
@@ -58,7 +58,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
float
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
;
kernel
,
float
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -81,7 +81,7 @@ namespace ngraph
...
@@ -81,7 +81,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmin
<
float
,
int
,
1
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmin
<
float
,
int
,
1
>
)
>
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
float
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
;
kernel
,
float
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -108,7 +108,7 @@ namespace ngraph
...
@@ -108,7 +108,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
double
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
;
kernel
,
double
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -132,7 +132,7 @@ namespace ngraph
...
@@ -132,7 +132,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
double
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
;
kernel
,
double
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -159,7 +159,7 @@ namespace ngraph
...
@@ -159,7 +159,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
int
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
;
kernel
,
int
,
int64_t
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -182,7 +182,7 @@ namespace ngraph
...
@@ -182,7 +182,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmin
<
int
,
int
,
1
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
argmin
<
int
,
int
,
1
>
)
>
kernel
;
SELECT_RANK2
(
SELECT_RANK2
(
kernel
,
int
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
;
kernel
,
int
,
int
,
in_shape
.
size
(),
runtime
::
cpu
::
kernel
::
argmin
)
functor
=
[
&
,
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/avg_pool.cpp
View file @
706e705e
...
@@ -87,8 +87,7 @@ namespace ngraph
...
@@ -87,8 +87,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
avg_pool
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
avg_pool
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
avg_pool
)
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
avg_pool
);
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -182,7 +181,7 @@ namespace ngraph
...
@@ -182,7 +181,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
avg_pool_backprop
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
avg_pool_backprop
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
avg_pool_backprop
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
avg_pool_backprop
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/batch_norm.cpp
View file @
706e705e
...
@@ -234,7 +234,7 @@ namespace ngraph
...
@@ -234,7 +234,7 @@ namespace ngraph
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
batch_norm_training
)
;
runtime
::
cpu
::
kernel
::
batch_norm_training
)
auto
arg2_shape
=
args
[
2
].
get_shape
();
auto
arg2_shape
=
args
[
2
].
get_shape
();
auto
arg0_buffer_index
=
auto
arg0_buffer_index
=
...
@@ -283,7 +283,7 @@ namespace ngraph
...
@@ -283,7 +283,7 @@ namespace ngraph
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
batch_norm_inference
)
;
runtime
::
cpu
::
kernel
::
batch_norm_inference
)
auto
arg2_shape
=
args
[
2
].
get_shape
();
auto
arg2_shape
=
args
[
2
].
get_shape
();
auto
arg0_buffer_index
=
auto
arg0_buffer_index
=
...
@@ -346,7 +346,7 @@ namespace ngraph
...
@@ -346,7 +346,7 @@ namespace ngraph
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
batch_norm_inference
)
;
runtime
::
cpu
::
kernel
::
batch_norm_inference
)
auto
arg2_shape
=
args
[
2
].
get_shape
();
auto
arg2_shape
=
args
[
2
].
get_shape
();
auto
arg0_buffer_index
=
auto
arg0_buffer_index
=
...
...
src/ngraph/runtime/cpu/builder/bounded_relu.cpp
View file @
706e705e
...
@@ -80,7 +80,7 @@ namespace ngraph
...
@@ -80,7 +80,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
bounded_relu
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
bounded_relu
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
bounded_relu
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
bounded_relu
)
auto
functor
=
[
&
,
kernel
,
alpha
,
count
,
input_buffer_index
,
out_buffer_index
](
auto
functor
=
[
&
,
kernel
,
alpha
,
count
,
input_buffer_index
,
out_buffer_index
](
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
...
...
src/ngraph/runtime/cpu/builder/broadcast.cpp
View file @
706e705e
...
@@ -158,7 +158,7 @@ namespace ngraph
...
@@ -158,7 +158,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
broadcast
->
get_input_element_type
(
0
),
broadcast
->
get_input_element_type
(
0
),
out_rank
,
out_rank
,
runtime
::
cpu
::
kernel
::
broadcast
)
;
runtime
::
cpu
::
kernel
::
broadcast
)
}
}
template
<>
template
<>
...
...
src/ngraph/runtime/cpu/builder/concat.cpp
View file @
706e705e
...
@@ -152,7 +152,7 @@ namespace ngraph
...
@@ -152,7 +152,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
out
[
0
].
get_element_type
(),
out
[
0
].
get_element_type
(),
out
[
0
].
get_shape
().
size
(),
out
[
0
].
get_shape
().
size
(),
runtime
::
cpu
::
kernel
::
concat
)
;
runtime
::
cpu
::
kernel
::
concat
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/convert.cpp
View file @
706e705e
...
@@ -43,59 +43,59 @@ namespace ngraph
...
@@ -43,59 +43,59 @@ namespace ngraph
if
(
out
[
0
].
get_element_type
()
==
element
::
boolean
)
if
(
out
[
0
].
get_element_type
()
==
element
::
boolean
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_bool
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_bool
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
f32
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
f32
)
{
{
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_float32
)
;
runtime
::
cpu
::
kernel
::
convert_to_float32
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
f64
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
f64
)
{
{
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_float64
)
;
runtime
::
cpu
::
kernel
::
convert_to_float64
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i8
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i8
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i8
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i8
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i16
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i16
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i16
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i16
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i32
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i32
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i32
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i32
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i64
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
i64
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i64
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_i64
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u8
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u8
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u8
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u8
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u16
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u16
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u16
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u16
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u32
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u32
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u32
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u32
)
}
}
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u64
)
else
if
(
out
[
0
].
get_element_type
()
==
element
::
u64
)
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u64
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convert_to_u64
)
}
}
else
else
{
{
...
...
src/ngraph/runtime/cpu/builder/convolution.cpp
View file @
706e705e
...
@@ -98,7 +98,7 @@ namespace ngraph
...
@@ -98,7 +98,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_KERNEL_3ARGS
(
SELECT_KERNEL_3ARGS
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convolution
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convolution
)
auto
window_movement_strides
=
convolution
->
get_window_movement_strides
();
auto
window_movement_strides
=
convolution
->
get_window_movement_strides
();
auto
window_dilation_strides
=
convolution
->
get_window_dilation_strides
();
auto
window_dilation_strides
=
convolution
->
get_window_dilation_strides
();
...
@@ -485,7 +485,7 @@ namespace ngraph
...
@@ -485,7 +485,7 @@ namespace ngraph
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convolution_backprop_in
)
;
runtime
::
cpu
::
kernel
::
convolution_backprop_in
)
auto
&
in_shape
=
convolution
->
get_data_batch_shape
();
auto
&
in_shape
=
convolution
->
get_data_batch_shape
();
auto
data_dilation_strides
=
convolution
->
get_data_dilation_strides_forward
();
auto
data_dilation_strides
=
convolution
->
get_data_dilation_strides_forward
();
auto
window_dilation_strides
=
auto
window_dilation_strides
=
...
@@ -599,7 +599,7 @@ namespace ngraph
...
@@ -599,7 +599,7 @@ namespace ngraph
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
convolution_backprop_filter
)
;
runtime
::
cpu
::
kernel
::
convolution_backprop_filter
)
auto
&
filters_shape
=
convolution
->
get_filters_shape
();
auto
&
filters_shape
=
convolution
->
get_filters_shape
();
auto
window_dilation_strides
=
auto
window_dilation_strides
=
...
...
src/ngraph/runtime/cpu/builder/dot.cpp
View file @
706e705e
...
@@ -79,7 +79,7 @@ namespace ngraph
...
@@ -79,7 +79,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_scalar
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_scalar
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_scalar
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_scalar
)
auto
element_count
=
shape_size
(
second
.
get_shape
());
auto
element_count
=
shape_size
(
second
.
get_shape
());
...
@@ -106,7 +106,7 @@ namespace ngraph
...
@@ -106,7 +106,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_1d_1d_1rd
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_1d_1d_1rd
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_1d_1d_1rd
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_1d_1d_1rd
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -135,7 +135,7 @@ namespace ngraph
...
@@ -135,7 +135,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_2d_1d_1rd
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_2d_1d_1rd
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_2d_1d_1rd
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_2d_1d_1rd
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -164,7 +164,7 @@ namespace ngraph
...
@@ -164,7 +164,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_1d_2d_1rd
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_1d_2d_1rd
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_1d_2d_1rd
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_1d_2d_1rd
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -234,7 +234,7 @@ namespace ngraph
...
@@ -234,7 +234,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_ref
<
float
,
float
,
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
dot_ref
<
float
,
float
,
float
>
)
>
kernel
;
SELECT_KERNEL_3ARGS
(
SELECT_KERNEL_3ARGS
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_ref
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
dot_ref
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/erf.cpp
View file @
706e705e
...
@@ -61,7 +61,7 @@ namespace ngraph
...
@@ -61,7 +61,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
reference_erf
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
reference_erf
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
reference_erf
)
;
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
reference_erf
)
auto
functor
=
[
&
,
kernel
,
element_count
,
arg0_buffer_index
,
out0_buffer_index
](
auto
functor
=
[
&
,
kernel
,
element_count
,
arg0_buffer_index
,
out0_buffer_index
](
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
/* ectx */
)
{
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
/* ectx */
)
{
kernel
(
ctx
->
buffer_data
[
arg0_buffer_index
],
kernel
(
ctx
->
buffer_data
[
arg0_buffer_index
],
...
...
src/ngraph/runtime/cpu/builder/gather.cpp
View file @
706e705e
...
@@ -66,7 +66,7 @@ namespace ngraph
...
@@ -66,7 +66,7 @@ namespace ngraph
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
params_shape
.
size
(),
params_shape
.
size
(),
out_shape
.
size
(),
out_shape
.
size
(),
runtime
::
cpu
::
kernel
::
gather_i64
)
;
runtime
::
cpu
::
kernel
::
gather_i64
)
return
[
&
,
return
[
&
,
kernel
,
kernel
,
...
@@ -126,7 +126,7 @@ namespace ngraph
...
@@ -126,7 +126,7 @@ namespace ngraph
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
params_shape
.
size
(),
params_shape
.
size
(),
out_shape
.
size
(),
out_shape
.
size
(),
runtime
::
cpu
::
kernel
::
gather_i32
)
;
runtime
::
cpu
::
kernel
::
gather_i32
)
return
[
&
,
return
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/leaky_relu.cpp
View file @
706e705e
...
@@ -80,7 +80,7 @@ namespace ngraph
...
@@ -80,7 +80,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
leaky_relu
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
leaky_relu
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
leaky_relu
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
leaky_relu
)
auto
functor
=
[
&
,
kernel
,
alpha
,
count
,
input_buffer_index
,
out_buffer_index
](
auto
functor
=
[
&
,
kernel
,
alpha
,
count
,
input_buffer_index
,
out_buffer_index
](
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
...
...
src/ngraph/runtime/cpu/builder/max_pool.cpp
View file @
706e705e
...
@@ -86,8 +86,7 @@ namespace ngraph
...
@@ -86,8 +86,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
max_pool
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
max_pool
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
max_pool
)
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
max_pool
);
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -220,7 +219,7 @@ namespace ngraph
...
@@ -220,7 +219,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
max_pool_backprop
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
max_pool_backprop
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
max_pool_backprop
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
max_pool_backprop
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/one_hot.cpp
View file @
706e705e
...
@@ -46,7 +46,7 @@ namespace ngraph
...
@@ -46,7 +46,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
one_hot_rank_0
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
one_hot_rank_0
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
one_hot_rank_0
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
one_hot_rank_0
)
auto
functor
=
auto
functor
=
[
&
,
kernel
,
out_shape
,
one_hot_axis
,
arg_buffer_index
,
out_buffer_index
](
[
&
,
kernel
,
out_shape
,
one_hot_axis
,
arg_buffer_index
,
out_buffer_index
](
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
...
@@ -63,7 +63,7 @@ namespace ngraph
...
@@ -63,7 +63,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
one_hot_rank_1
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
one_hot_rank_1
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
one_hot_rank_1
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
one_hot_rank_1
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
arg_shape
,
arg_shape
,
...
@@ -88,7 +88,7 @@ namespace ngraph
...
@@ -88,7 +88,7 @@ namespace ngraph
kernel
;
kernel
;
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
one_hot_rank_2_or_more
)
;
runtime
::
cpu
::
kernel
::
one_hot_rank_2_or_more
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
arg_shape
,
arg_shape
,
...
...
src/ngraph/runtime/cpu/builder/pad.cpp
View file @
706e705e
...
@@ -57,7 +57,7 @@ namespace ngraph
...
@@ -57,7 +57,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg_shape
.
size
(),
arg_shape
.
size
(),
runtime
::
cpu
::
kernel
::
pad_and_slice
)
;
runtime
::
cpu
::
kernel
::
pad_and_slice
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -84,8 +84,7 @@ namespace ngraph
...
@@ -84,8 +84,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
pad_ref
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
pad_ref
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
pad_ref
)
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
pad_ref
);
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -130,7 +129,7 @@ namespace ngraph
...
@@ -130,7 +129,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
pad
->
get_input_element_type
(
0
),
pad
->
get_input_element_type
(
0
),
arg_shape
.
size
(),
arg_shape
.
size
(),
runtime
::
cpu
::
kernel
::
pad_and_slice
)
;
runtime
::
cpu
::
kernel
::
pad_and_slice
)
auto
functor
=
[
kernel
,
arg_shape
,
out_shape
,
padding_below
,
padding_above
](
auto
functor
=
[
kernel
,
arg_shape
,
out_shape
,
padding_below
,
padding_above
](
const
std
::
vector
<
void
*>&
inputs
,
std
::
vector
<
void
*>&
outputs
)
{
const
std
::
vector
<
void
*>&
inputs
,
std
::
vector
<
void
*>&
outputs
)
{
...
@@ -150,7 +149,7 @@ namespace ngraph
...
@@ -150,7 +149,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
pad_ref
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
pad_ref
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
pad
->
get_input_element_type
(
0
),
runtime
::
cpu
::
kernel
::
pad_ref
)
;
kernel
,
pad
->
get_input_element_type
(
0
),
runtime
::
cpu
::
kernel
::
pad_ref
)
auto
functor
=
auto
functor
=
[
kernel
,
arg_shape
,
out_shape
,
padding_below
,
padding_above
,
pad_mode
](
[
kernel
,
arg_shape
,
out_shape
,
padding_below
,
padding_above
,
pad_mode
](
...
...
src/ngraph/runtime/cpu/builder/reduction.hpp
View file @
706e705e
...
@@ -186,4 +186,4 @@
...
@@ -186,4 +186,4 @@
reduction_axes, \
reduction_axes, \
ectx->arena); \
ectx->arena); \
}; \
}; \
functors.emplace_back(functor)
;
functors.emplace_back(functor)
src/ngraph/runtime/cpu/builder/relu.cpp
View file @
706e705e
...
@@ -130,7 +130,7 @@ namespace ngraph
...
@@ -130,7 +130,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
relu_backprop
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
relu_backprop
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
relu_backprop
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
relu_backprop
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/replace_slice.cpp
View file @
706e705e
...
@@ -79,7 +79,7 @@ namespace ngraph
...
@@ -79,7 +79,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg0_shape
.
size
(),
arg0_shape
.
size
(),
runtime
::
cpu
::
kernel
::
strided_replace_slice
)
;
runtime
::
cpu
::
kernel
::
strided_replace_slice
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -111,7 +111,7 @@ namespace ngraph
...
@@ -111,7 +111,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg0_shape
.
size
(),
arg0_shape
.
size
(),
runtime
::
cpu
::
kernel
::
replace_slice
)
;
runtime
::
cpu
::
kernel
::
replace_slice
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/reshape.cpp
View file @
706e705e
...
@@ -84,27 +84,27 @@ namespace ngraph
...
@@ -84,27 +84,27 @@ namespace ngraph
if
(
arg_rank
==
1
)
if
(
arg_rank
==
1
)
{
{
SELECT_KERNEL_BY_RANK
(
SELECT_KERNEL_BY_RANK
(
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_1d
)
;
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_1d
)
}
}
else
if
(
arg_rank
==
2
)
else
if
(
arg_rank
==
2
)
{
{
SELECT_KERNEL_BY_RANK
(
SELECT_KERNEL_BY_RANK
(
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_2d
)
;
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_2d
)
}
}
else
if
(
arg_rank
==
3
)
else
if
(
arg_rank
==
3
)
{
{
SELECT_KERNEL_BY_RANK
(
SELECT_KERNEL_BY_RANK
(
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_3d
)
;
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_3d
)
}
}
else
if
(
arg_rank
==
4
)
else
if
(
arg_rank
==
4
)
{
{
SELECT_KERNEL_BY_RANK
(
SELECT_KERNEL_BY_RANK
(
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_4d
)
;
kernel
,
result_element_type
,
result_rank
,
runtime
::
cpu
::
kernel
::
reshape_4d
)
}
}
else
else
{
{
SELECT_KERNEL
(
SELECT_KERNEL
(
ref_kernel
,
result_element_type
,
runtime
::
cpu
::
kernel
::
reshape_ref
)
;
ref_kernel
,
result_element_type
,
runtime
::
cpu
::
kernel
::
reshape_ref
)
}
}
}
}
...
...
src/ngraph/runtime/cpu/builder/reverse.cpp
View file @
706e705e
...
@@ -43,7 +43,7 @@ namespace ngraph
...
@@ -43,7 +43,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
reverse
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
reverse
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
reverse
)
;
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
reverse
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/reverse_sequence.cpp
View file @
706e705e
...
@@ -50,7 +50,7 @@ namespace ngraph
...
@@ -50,7 +50,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg_shape
.
size
(),
arg_shape
.
size
(),
runtime
::
cpu
::
kernel
::
reverse_sequence_sli32
)
;
runtime
::
cpu
::
kernel
::
reverse_sequence_sli32
)
}
}
else
else
{
{
...
...
src/ngraph/runtime/cpu/builder/scatter_add.cpp
View file @
706e705e
...
@@ -72,7 +72,7 @@ namespace ngraph
...
@@ -72,7 +72,7 @@ namespace ngraph
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
inputs_shape
.
size
(),
inputs_shape
.
size
(),
updates_shape
.
size
(),
updates_shape
.
size
(),
runtime
::
cpu
::
kernel
::
scatter_add_i64
)
;
runtime
::
cpu
::
kernel
::
scatter_add_i64
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -111,7 +111,7 @@ namespace ngraph
...
@@ -111,7 +111,7 @@ namespace ngraph
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
inputs_shape
.
size
(),
inputs_shape
.
size
(),
updates_shape
.
size
(),
updates_shape
.
size
(),
runtime
::
cpu
::
kernel
::
scatter_add_i32
)
;
runtime
::
cpu
::
kernel
::
scatter_add_i32
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/select.cpp
View file @
706e705e
...
@@ -43,7 +43,7 @@ namespace ngraph
...
@@ -43,7 +43,7 @@ namespace ngraph
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
select
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
select
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
select
)
;
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
select
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/slice.cpp
View file @
706e705e
...
@@ -141,7 +141,7 @@ namespace ngraph
...
@@ -141,7 +141,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg_shape
.
size
(),
arg_shape
.
size
(),
runtime
::
cpu
::
kernel
::
strided_slice
)
;
runtime
::
cpu
::
kernel
::
strided_slice
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -171,7 +171,7 @@ namespace ngraph
...
@@ -171,7 +171,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg_shape
.
size
(),
arg_shape
.
size
(),
runtime
::
cpu
::
kernel
::
slice
)
;
runtime
::
cpu
::
kernel
::
slice
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/builder/softmax.cpp
View file @
706e705e
...
@@ -85,7 +85,7 @@ namespace ngraph
...
@@ -85,7 +85,7 @@ namespace ngraph
PARTIAL_SELECT_KERNEL_BY_RANK
(
kernel
,
PARTIAL_SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
args
[
0
].
get_shape
().
size
(),
args
[
0
].
get_shape
().
size
(),
runtime
::
cpu
::
kernel
::
softmax_all
)
;
runtime
::
cpu
::
kernel
::
softmax_all
)
auto
functor
=
[
&
,
kernel
,
arg_shape
,
arg_buffer_index
,
out_buffer_index
](
auto
functor
=
[
&
,
kernel
,
arg_shape
,
arg_buffer_index
,
out_buffer_index
](
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
...
@@ -108,7 +108,7 @@ namespace ngraph
...
@@ -108,7 +108,7 @@ namespace ngraph
kernel
,
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
args
[
0
].
get_shape
().
size
(),
args
[
0
].
get_shape
().
size
(),
runtime
::
cpu
::
kernel
::
softmax_innermost_1rd
)
;
runtime
::
cpu
::
kernel
::
softmax_innermost_1rd
)
auto
functor
=
auto
functor
=
[
&
,
kernel
,
arg_shape
,
arg_buffer_index
,
out_buffer_index
](
[
&
,
kernel
,
arg_shape
,
arg_buffer_index
,
out_buffer_index
](
...
@@ -128,7 +128,7 @@ namespace ngraph
...
@@ -128,7 +128,7 @@ namespace ngraph
PARTIAL_SELECT_KERNEL_BY_RANK
(
kernel
,
PARTIAL_SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
args
[
0
].
get_shape
().
size
(),
args
[
0
].
get_shape
().
size
(),
runtime
::
cpu
::
kernel
::
softmax_1rd
)
;
runtime
::
cpu
::
kernel
::
softmax_1rd
)
auto
functor
=
auto
functor
=
[
&
,
kernel
,
arg_shape
,
axes
,
arg_buffer_index
,
out_buffer_index
](
[
&
,
kernel
,
arg_shape
,
axes
,
arg_buffer_index
,
out_buffer_index
](
...
@@ -148,7 +148,7 @@ namespace ngraph
...
@@ -148,7 +148,7 @@ namespace ngraph
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
softmax_3d_2rd
)
;
runtime
::
cpu
::
kernel
::
softmax_3d_2rd
)
auto
functor
=
auto
functor
=
[
&
,
kernel
,
arg_shape
,
axes
,
arg_buffer_index
,
out_buffer_index
](
[
&
,
kernel
,
arg_shape
,
axes
,
arg_buffer_index
,
out_buffer_index
](
...
@@ -167,7 +167,7 @@ namespace ngraph
...
@@ -167,7 +167,7 @@ namespace ngraph
SELECT_KERNEL
(
kernel
,
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
softmax_4d_3rd
)
;
runtime
::
cpu
::
kernel
::
softmax_4d_3rd
)
auto
functor
=
auto
functor
=
[
&
,
kernel
,
arg_shape
,
axes
,
arg_buffer_index
,
out_buffer_index
](
[
&
,
kernel
,
arg_shape
,
axes
,
arg_buffer_index
,
out_buffer_index
](
...
...
src/ngraph/runtime/cpu/builder/tile.cpp
View file @
706e705e
...
@@ -47,7 +47,7 @@ namespace ngraph
...
@@ -47,7 +47,7 @@ namespace ngraph
size_t
repeats
=
shape_size
(
out_shape
);
size_t
repeats
=
shape_size
(
out_shape
);
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
tile_rank_0
<
float
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
tile_rank_0
<
float
>
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
tile_rank_0
)
;
kernel
,
out
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
tile_rank_0
)
auto
functor
=
[
&
,
kernel
,
repeats
,
arg_buffer_index
,
out_buffer_index
](
auto
functor
=
[
&
,
kernel
,
repeats
,
arg_buffer_index
,
out_buffer_index
](
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
/* ectx */
)
{
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
/* ectx */
)
{
kernel
(
ctx
->
buffer_data
[
arg_buffer_index
],
kernel
(
ctx
->
buffer_data
[
arg_buffer_index
],
...
@@ -61,7 +61,7 @@ namespace ngraph
...
@@ -61,7 +61,7 @@ namespace ngraph
{
{
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
tile
<
float
,
2
>
)
>
kernel
;
std
::
function
<
decltype
(
runtime
::
cpu
::
kernel
::
tile
<
float
,
2
>
)
>
kernel
;
SELECT_KERNEL_BY_RANK
(
SELECT_KERNEL_BY_RANK
(
kernel
,
out
[
0
].
get_element_type
(),
arg_rank
,
runtime
::
cpu
::
kernel
::
tile
)
;
kernel
,
out
[
0
].
get_element_type
(),
arg_rank
,
runtime
::
cpu
::
kernel
::
tile
)
auto
functor
=
auto
functor
=
[
&
,
kernel
,
arg_shape
,
out_shape
,
arg_buffer_index
,
out_buffer_index
](
[
&
,
kernel
,
arg_shape
,
out_shape
,
arg_buffer_index
,
out_buffer_index
](
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
CPURuntimeContext
*
ctx
,
CPUExecutionContext
*
ectx
)
{
...
...
src/ngraph/runtime/cpu/builder/update_slice.cpp
View file @
706e705e
...
@@ -69,7 +69,7 @@ namespace ngraph
...
@@ -69,7 +69,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg0_shape
.
size
(),
arg0_shape
.
size
(),
runtime
::
cpu
::
kernel
::
strided_update_slice
)
;
runtime
::
cpu
::
kernel
::
strided_update_slice
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
@@ -101,7 +101,7 @@ namespace ngraph
...
@@ -101,7 +101,7 @@ namespace ngraph
SELECT_KERNEL_BY_RANK
(
kernel
,
SELECT_KERNEL_BY_RANK
(
kernel
,
args
[
0
].
get_element_type
(),
args
[
0
].
get_element_type
(),
arg0_shape
.
size
(),
arg0_shape
.
size
(),
runtime
::
cpu
::
kernel
::
update_slice
)
;
runtime
::
cpu
::
kernel
::
update_slice
)
auto
functor
=
[
&
,
auto
functor
=
[
&
,
kernel
,
kernel
,
...
...
src/ngraph/runtime/cpu/cpu_builder.cpp
View file @
706e705e
...
@@ -142,7 +142,7 @@ namespace ngraph
...
@@ -142,7 +142,7 @@ namespace ngraph
auto
&
functors
=
external_function
->
get_functors
();
auto
&
functors
=
external_function
->
get_functors
();
const
ngraph
::
op
::
Divide
*
divop
=
static_cast
<
const
ngraph
::
op
::
Divide
*>
(
node
);
const
ngraph
::
op
::
Divide
*
divop
=
static_cast
<
const
ngraph
::
op
::
Divide
*>
(
node
);
std
::
function
<
void
(
void
*
,
void
*
,
void
*
,
size_t
,
bool
,
int
)
>
kernel
;
std
::
function
<
void
(
void
*
,
void
*
,
void
*
,
size_t
,
bool
,
int
)
>
kernel
;
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
divide
)
;
SELECT_KERNEL
(
kernel
,
args
[
0
].
get_element_type
(),
runtime
::
cpu
::
kernel
::
divide
)
auto
element_count
=
out
[
0
].
get_size
();
auto
element_count
=
out
[
0
].
get_size
();
auto
arg0_buffer_index
=
external_function
->
get_buffer_index
(
args
[
0
].
get_name
());
auto
arg0_buffer_index
=
external_function
->
get_buffer_index
(
args
[
0
].
get_name
());
auto
arg1_buffer_index
=
external_function
->
get_buffer_index
(
args
[
1
].
get_name
());
auto
arg1_buffer_index
=
external_function
->
get_buffer_index
(
args
[
1
].
get_name
());
...
@@ -453,8 +453,7 @@ namespace ngraph
...
@@ -453,8 +453,7 @@ namespace ngraph
{
{
const
ngraph
::
op
::
Divide
*
divop
=
static_cast
<
const
ngraph
::
op
::
Divide
*>
(
node
);
const
ngraph
::
op
::
Divide
*
divop
=
static_cast
<
const
ngraph
::
op
::
Divide
*>
(
node
);
std
::
function
<
void
(
void
*
,
void
*
,
void
*
,
size_t
,
bool
,
int
)
>
kernel
;
std
::
function
<
void
(
void
*
,
void
*
,
void
*
,
size_t
,
bool
,
int
)
>
kernel
;
SELECT_KERNEL
(
SELECT_KERNEL
(
kernel
,
node
->
get_input_element_type
(
0
),
runtime
::
cpu
::
kernel
::
divide
)
kernel
,
node
->
get_input_element_type
(
0
),
runtime
::
cpu
::
kernel
::
divide
);
auto
element_count
=
shape_size
(
node
->
get_shape
());
auto
element_count
=
shape_size
(
node
->
get_shape
());
bool
pythondiv
=
divop
->
is_pythondiv
();
bool
pythondiv
=
divop
->
is_pythondiv
();
auto
functor
=
[
&
,
kernel
,
element_count
,
pythondiv
](
auto
functor
=
[
&
,
kernel
,
element_count
,
pythondiv
](
...
...
src/ngraph/runtime/cpu/cpu_builder.hpp
View file @
706e705e
...
@@ -324,7 +324,7 @@
...
@@ -324,7 +324,7 @@
element_count, \
element_count, \
ectx->arena); \
ectx->arena); \
}; \
}; \
functors.emplace_back(functor)
;
functors.emplace_back(functor)
#define BUILD_BINARY_ELEMWISE_FUNCTOR(OP) \
#define BUILD_BINARY_ELEMWISE_FUNCTOR(OP) \
(void)node; \
(void)node; \
...
@@ -347,7 +347,7 @@
...
@@ -347,7 +347,7 @@
element_count, \
element_count, \
ectx->arena); \
ectx->arena); \
}; \
}; \
functors.emplace_back(functor)
;
functors.emplace_back(functor)
#define BUILD_UNARY_ELEMWISE_CF_FUNCTOR(OP) \
#define BUILD_UNARY_ELEMWISE_CF_FUNCTOR(OP) \
std::function<void(void*, void*, size_t, int)> kernel; \
std::function<void(void*, void*, size_t, int)> kernel; \
...
@@ -360,7 +360,7 @@
...
@@ -360,7 +360,7 @@
std::vector<void*>& outputs) { \
std::vector<void*>& outputs) { \
kernel(inputs[0], outputs[0], element_count, 0); \
kernel(inputs[0], outputs[0], element_count, 0); \
}; \
}; \
return functor
;
return functor
#define BUILD_BINARY_ELEMWISE_CF_FUNCTOR(OP) \
#define BUILD_BINARY_ELEMWISE_CF_FUNCTOR(OP) \
std::function<void(void*, void*, void*, size_t, int)> kernel; \
std::function<void(void*, void*, void*, size_t, int)> kernel; \
...
@@ -373,7 +373,7 @@
...
@@ -373,7 +373,7 @@
std::vector<void*>& outputs) { \
std::vector<void*>& outputs) { \
kernel(inputs[0], inputs[1], outputs[0], element_count, 0); \
kernel(inputs[0], inputs[1], outputs[0], element_count, 0); \
}; \
}; \
return functor
;
return functor
#define REGISTER_OP_BUILDER(OP) \
#define REGISTER_OP_BUILDER(OP) \
GetGlobalBuildDispatcher().insert( \
GetGlobalBuildDispatcher().insert( \
...
...
src/ngraph/runtime/cpu/cpu_external_function.cpp
View file @
706e705e
...
@@ -1202,59 +1202,58 @@ void runtime::cpu::CPU_ExternalFunction::register_common_passes(
...
@@ -1202,59 +1202,58 @@ void runtime::cpu::CPU_ExternalFunction::register_common_passes(
return
true
;
return
true
;
};
};
REGISTER_KNOBBED_PASS
(
LikeReplacement
,
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
LikeReplacement
,
true
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS_WITH_ARGS
(
FusedOpDecomposition
,
true
,
ngraph
::
pass
,
is_supported
)
;
REGISTER_KNOBBED_PASS_WITH_ARGS
(
FusedOpDecomposition
,
true
,
ngraph
::
pass
,
is_supported
)
REGISTER_KNOBBED_PASS
(
ImplicitBroadcastElimination
,
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
ImplicitBroadcastElimination
,
true
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS
(
NopElimination
,
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
NopElimination
,
true
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS
(
ZeroDimTensorElimination
,
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
ZeroDimTensorElimination
,
true
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS
(
LSTMFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
LSTMFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
RNNFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
RNNFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
AlgebraicSimplification
,
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
AlgebraicSimplification
,
true
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS
(
MultiLayerRNNFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
MultiLayerRNNFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
BiDirectionalRnn
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
BiDirectionalRnn
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
CPURnnMatFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
CPURnnMatFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
BatchFusion
,
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
BatchFusion
,
true
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS
(
CPUBatchFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
CPUBatchFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
ReshapeSinking
,
false
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
ReshapeSinking
,
false
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS
(
ReshapeElimination
,
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
ReshapeElimination
,
true
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS
(
RecurrentReshapeElimination
,
false
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
RecurrentReshapeElimination
,
false
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS_WITH_ARGS
(
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CoreFusion
,
true
,
ngraph
::
pass
,
ngraph
::
pass
::
FusionType
::
ALL_FUSIONS
)
;
CoreFusion
,
true
,
ngraph
::
pass
,
ngraph
::
pass
::
FusionType
::
ALL_FUSIONS
)
REGISTER_KNOBBED_PASS
(
CPUPreFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
CPUPreFusion
,
true
,
runtime
::
cpu
::
pass
)
// Disable CPUFusion if MLIR is enabled to preserve core ops.
// Disable CPUFusion if MLIR is enabled to preserve core ops.
if
(
std
::
getenv
(
"NGRAPH_MLIR"
)
==
nullptr
)
if
(
std
::
getenv
(
"NGRAPH_MLIR"
)
==
nullptr
)
{
{
REGISTER_KNOBBED_PASS
(
CPUFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
CPUFusion
,
true
,
runtime
::
cpu
::
pass
)
}
}
REGISTER_KNOBBED_PASS
(
CPUQuantFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
CPUQuantFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
CPUHorizontalFusion
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
CPUHorizontalFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
CPUCollapseDims
,
true
,
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
CPUCollapseDims
,
true
,
runtime
::
cpu
::
pass
)
#if defined(NGRAPH_HALIDE)
#if defined(NGRAPH_HALIDE)
REGISTER_KNOBBED_PASS
(
HalideSubgraphExtraction
,
true
,
ngraph
::
runtime
::
cpu
::
pass
)
;
REGISTER_KNOBBED_PASS
(
HalideSubgraphExtraction
,
true
,
ngraph
::
runtime
::
cpu
::
pass
)
#endif
#endif
#ifdef NGRAPH_MLIR_ENABLE
#ifdef NGRAPH_MLIR_ENABLE
if
(
std
::
getenv
(
"NGRAPH_MLIR"
)
!=
nullptr
)
if
(
std
::
getenv
(
"NGRAPH_MLIR"
)
!=
nullptr
)
{
{
REGISTER_KNOBBED_PASS
(
MLIRSubgraphExtractionPass
,
/*enable by default*/
true
,
ngraph
::
pass
)
;
REGISTER_KNOBBED_PASS
(
MLIRSubgraphExtractionPass
,
/*enable by default*/
true
,
ngraph
::
pass
)
}
}
#endif
#endif
NodeVector
nv_cwi
;
// We dont need CPUWorkspaceInsertion to return list of indices
NodeVector
nv_cwi
;
// We dont need CPUWorkspaceInsertion to return list of indices
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CPUWorkspaceInsertion
,
true
,
runtime
::
cpu
::
pass
,
nv_cwi
,
false
);
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CPUWorkspaceInsertion
,
true
,
runtime
::
cpu
::
pass
,
nv_cwi
,
false
)
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CPUAssignment
,
true
,
runtime
::
cpu
::
pass
,
this
);
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CPUAssignment
,
true
,
runtime
::
cpu
::
pass
,
this
)
REGISTER_KNOBBED_PASS_WITH_ARGS
(
ConstantFolding
,
true
,
ngraph
::
pass
,
GetGlobalCFDispatcherCPU
())
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CPULayout
,
true
,
runtime
::
cpu
::
pass
,
this
)
REGISTER_KNOBBED_PASS_WITH_ARGS
(
REGISTER_KNOBBED_PASS_WITH_ARGS
(
ConstantFolding
,
true
,
ngraph
::
pass
,
GetGlobalCFDispatcherCPU
());
CommonSubexpressionElimination
,
true
,
ngraph
::
pass
,
runtime
::
cpu
::
get_cse_handlers_map
())
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CPULayout
,
true
,
runtime
::
cpu
::
pass
,
this
);
REGISTER_KNOBBED_PASS
(
CPUPostLayoutOptimizations
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
CPUConvertLayoutConstantFolding
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
CPUMemoryOptimization
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
GetOutputElementElimination
,
false
,
ngraph
::
pass
)
REGISTER_KNOBBED_PASS_WITH_ARGS
(
REGISTER_KNOBBED_PASS_WITH_ARGS
(
CommonSubexpressionElimination
,
true
,
ngraph
::
pass
,
runtime
::
cpu
::
get_cse_handlers_map
());
PropagateCacheability
,
true
,
ngraph
::
pass
,
runtime
::
cpu
::
get_annotations_factory
())
REGISTER_KNOBBED_PASS
(
CPUPostLayoutOptimizations
,
true
,
runtime
::
cpu
::
pass
);
REGISTER_KNOBBED_PASS
(
CPUConvertLayoutConstantFolding
,
true
,
runtime
::
cpu
::
pass
);
REGISTER_KNOBBED_PASS
(
CPUMemoryOptimization
,
true
,
runtime
::
cpu
::
pass
);
REGISTER_KNOBBED_PASS
(
GetOutputElementElimination
,
false
,
ngraph
::
pass
);
REGISTER_KNOBBED_PASS_WITH_ARGS
(
PropagateCacheability
,
true
,
ngraph
::
pass
,
runtime
::
cpu
::
get_annotations_factory
());
bool
reuse_memory
=
pass_config
.
get_pass_attribute
(
"CPUMemoryAssignment::ReuseMemory"
)
||
bool
reuse_memory
=
pass_config
.
get_pass_attribute
(
"CPUMemoryAssignment::ReuseMemory"
)
||
pass_config
.
get_pass_attribute
(
"ReuseMemory"
);
pass_config
.
get_pass_attribute
(
"ReuseMemory"
);
pass_manager
.
register_pass
<
runtime
::
cpu
::
pass
::
CPUMemoryAssignment
>
(
pass_manager
.
register_pass
<
runtime
::
cpu
::
pass
::
CPUMemoryAssignment
>
(
...
...
src/ngraph/runtime/cpu/mkldnn_utils.cpp
View file @
706e705e
...
@@ -510,22 +510,22 @@ memory::desc runtime::cpu::mkldnn_utils::try_get_named_md(const mkldnn_memory_de
...
@@ -510,22 +510,22 @@ memory::desc runtime::cpu::mkldnn_utils::try_get_named_md(const mkldnn_memory_de
return get_named_md(md, X);
return get_named_md(md, X);
switch
(
md
.
ndims
)
switch
(
md
.
ndims
)
{
{
case
1
:
CANONICALIZE_MD
(
mkldnn_x
)
;
break
;
case
1
:
CANONICALIZE_MD
(
mkldnn_x
)
break
;
case
2
:
CANONICALIZE_MD
(
mkldnn_nc
)
;
break
;
case
2
:
CANONICALIZE_MD
(
mkldnn_nc
)
break
;
case
3
:
case
3
:
CANONICALIZE_MD
(
mkldnn_tnc
)
;
CANONICALIZE_MD
(
mkldnn_tnc
)
CANONICALIZE_MD
(
mkldnn_ntc
)
;
CANONICALIZE_MD
(
mkldnn_ntc
)
break
;
break
;
case
4
:
case
4
:
CANONICALIZE_MD
(
mkldnn_nchw
)
;
CANONICALIZE_MD
(
mkldnn_nchw
)
CANONICALIZE_MD
(
mkldnn_nhwc
)
;
CANONICALIZE_MD
(
mkldnn_nhwc
)
CANONICALIZE_MD
(
mkldnn_nChw8c
)
;
CANONICALIZE_MD
(
mkldnn_nChw8c
)
CANONICALIZE_MD
(
mkldnn_nChw16c
)
;
CANONICALIZE_MD
(
mkldnn_nChw16c
)
break
;
break
;
case
5
:
case
5
:
CANONICALIZE_MD
(
mkldnn_ncdhw
)
;
CANONICALIZE_MD
(
mkldnn_ncdhw
)
CANONICALIZE_MD
(
mkldnn_ndhwc
)
;
CANONICALIZE_MD
(
mkldnn_ndhwc
)
CANONICALIZE_MD
(
mkldnn_nCdhw16c
)
;
CANONICALIZE_MD
(
mkldnn_nCdhw16c
)
break
;
break
;
default
:
;
default
:
;
}
}
...
...
src/ngraph/runtime/cpu/pass/cpu_rnn_fusion.cpp
View file @
706e705e
...
@@ -371,12 +371,12 @@ void ngraph::runtime::cpu::pass::LSTMFusion::construct_lstm_fprop()
...
@@ -371,12 +371,12 @@ void ngraph::runtime::cpu::pass::LSTMFusion::construct_lstm_fprop()
return
false
;
return
false
;
}
}
CHECK_RANK
(
pattern_map
[
xt
],
2
)
;
CHECK_RANK
(
pattern_map
[
xt
],
2
)
CHECK_RANK
(
pattern_map
[
ht_1
],
2
)
;
CHECK_RANK
(
pattern_map
[
ht_1
],
2
)
CHECK_RANK
(
pattern_map
[
w_i2h
],
2
)
;
CHECK_RANK
(
pattern_map
[
w_i2h
],
2
)
CHECK_RANK
(
pattern_map
[
w_h2h
],
2
)
;
CHECK_RANK
(
pattern_map
[
w_h2h
],
2
)
CHECK_RANK
(
pattern_map
[
bias_i2h
],
1
)
;
CHECK_RANK
(
pattern_map
[
bias_i2h
],
1
)
CHECK_RANK
(
pattern_map
[
bias_h2h
],
1
)
;
CHECK_RANK
(
pattern_map
[
bias_h2h
],
1
)
auto
weights_layer
=
pattern_map
[
w_i2h
];
auto
weights_layer
=
pattern_map
[
w_i2h
];
auto
weights_iter
=
pattern_map
[
w_h2h
];
auto
weights_iter
=
pattern_map
[
w_h2h
];
...
@@ -669,11 +669,11 @@ void ngraph::runtime::cpu::pass::RNNFusion::construct_rnn_lstm_fprop()
...
@@ -669,11 +669,11 @@ void ngraph::runtime::cpu::pass::RNNFusion::construct_rnn_lstm_fprop()
}
}
}
}
CHECK_RANK
(
rnn_src_layer
,
2
)
;
CHECK_RANK
(
rnn_src_layer
,
2
)
CHECK_RANK
(
rnn_src_iter
,
2
)
;
CHECK_RANK
(
rnn_src_iter
,
2
)
CHECK_RANK
(
rnn_weights_layer
,
2
)
;
CHECK_RANK
(
rnn_weights_layer
,
2
)
CHECK_RANK
(
rnn_weights_iter
,
2
)
;
CHECK_RANK
(
rnn_weights_iter
,
2
)
CHECK_RANK
(
rnn_bias
,
1
)
;
CHECK_RANK
(
rnn_bias
,
1
)
if
(
rnn_src_layer
->
get_element_type
()
!=
element
::
f32
||
if
(
rnn_src_layer
->
get_element_type
()
!=
element
::
f32
||
rnn_src_iter
->
get_element_type
()
!=
element
::
f32
)
rnn_src_iter
->
get_element_type
()
!=
element
::
f32
)
...
...
test/cpu_debugger.cpp
View file @
706e705e
...
@@ -228,7 +228,7 @@ TEST(debugger, MLIR_DISABLE_TEST(while_stepping))
...
@@ -228,7 +228,7 @@ TEST(debugger, MLIR_DISABLE_TEST(while_stepping))
dbg
.
add_breakpoint
(
add
);
dbg
.
add_breakpoint
(
add
);
while
(
dbg
.
step
())
while
(
dbg
.
step
())
{
{
}
;
}
ASSERT_EQ
(
*
static_cast
<
int
*>
(
dbg
.
inspect
(
add
)),
-
777
);
ASSERT_EQ
(
*
static_cast
<
int
*>
(
dbg
.
inspect
(
add
)),
-
777
);
ASSERT_EQ
(
*
static_cast
<
int
*>
(
dbg
.
inspect
(
absn
)),
777
);
ASSERT_EQ
(
*
static_cast
<
int
*>
(
dbg
.
inspect
(
absn
)),
777
);
...
...
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