Unverified Commit a8d206b3 authored by Scott Cyphers's avatar Scott Cyphers Committed by GitHub

Fix klocwork issues. (#3619)

parent 67483af0
......@@ -85,8 +85,7 @@ void op::LRN::validate_and_infer_types()
NODE_VALIDATION_CHECK(
this,
static_cast<size_t>(axes_shape[0]) >= 0 &&
static_cast<size_t>(axes_shape[0]) <= static_cast<size_t>(input_shape_rank),
static_cast<size_t>(axes_shape[0]) <= static_cast<size_t>(input_shape_rank),
"Number of elements of axes must be >= 0 and <= argument rank (axes_shape[0]: ",
axes_shape[0],
").");
......
......@@ -46,7 +46,7 @@ op::v0::Softmax::Softmax(const Output<Node>& arg, const AxisSet& axes)
for (auto axis : m_axes)
{
NODE_VALIDATION_CHECK(this,
axis >= 0 && axis < static_cast<size_t>(input_shape.rank()),
axis < static_cast<size_t>(input_shape.rank()),
"Reduction axis (",
axis,
") is out of bounds (argument shape: ",
......@@ -122,7 +122,7 @@ op::v1::Softmax::Softmax(const Output<Node>& arg, const size_t axis)
input_shape,
").");
NODE_VALIDATION_CHECK(this,
axis >= 0 && axis < static_cast<size_t>(input_shape.rank()),
axis < static_cast<size_t>(input_shape.rank()),
"Reduction axis (",
axis,
") is out of bounds (argument shape: ",
......
......@@ -443,6 +443,7 @@ namespace ngraph
const ngraph::op::BatchNormTrainingBackprop* batchnorm =
static_cast<const ngraph::op::BatchNormTrainingBackprop*>(node);
auto eps = batchnorm->get_eps_value();
(void)eps; // Use depends on mkl-dnn version
QUERY_SCRATCHPAD_3ARGS(batchnorm_backward, batchnorm_desc, input_desc, eps);
auto functor = [&,
......
......@@ -144,7 +144,7 @@ public:
size_t const_node_index =
m.get_match_root()->get_arguments().at(0) == pattern_map[pattern];
auto const_node = dynamic_pointer_cast<op::Constant>(
auto const_node = static_pointer_cast<op::Constant>(
m.get_match_root()->get_arguments().at(const_node_index));
auto second_node = m.get_match_root()->get_arguments().at(const_node_index);
NGRAPH_DEBUG << "second_node = " << second_node->get_name()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment