Skip to content

Commit

Permalink
[exo] Resolve static analysis warning (Samsung#1862)
Browse files Browse the repository at this point in the history
This will revise exo to resolve static analysis warnings

ONE-DCO-1.0-Signed-off-by: seongwoo <[email protected]>
  • Loading branch information
mhs4670go authored Jun 4, 2020
1 parent d824137 commit ce67186
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion compiler/exo/src/Conversion/TensorBroadcastConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool TensorBroadcastConverter::run(loco::Graph *graph)
{
if (node->dialect() == locoex::TFLDialect::get())
{
auto tfl_node = dynamic_cast<locoex::TFLNode *>(node);
auto tfl_node = loco::must_cast<locoex::TFLNode *>(node);
tfl_node->accept(&collector);
}
}
Expand Down
1 change: 0 additions & 1 deletion compiler/exo/src/Dialect/IR/CircleNodeImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define __LOCOEX_IR_CIRCLENODEIMPL_H__

#include "CircleNodes.h"
#include "CircleNodeVisitor.h"

#include <oops/InternalExn.h>

Expand Down
1 change: 0 additions & 1 deletion compiler/exo/src/Dialect/IR/CircleNodeVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define __LOCOEX_IR_CIRCLENODE_VISITOR_H__

#include "CircleNode.h"
#include "CircleNodes.h"

#include <oops/InternalExn.h>

Expand Down
1 change: 0 additions & 1 deletion compiler/exo/src/Dialect/IR/TFLNodeImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define __LOCOEX_IR_TFLNODEIMPL_H__

#include "TFLNodes.h"
#include "TFLNodeVisitor.h"

#include <oops/InternalExn.h>

Expand Down
1 change: 0 additions & 1 deletion compiler/exo/src/Dialect/IR/TFLNodeVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define __LOCOEX_IR_TFLNODE_VISITOR_H__

#include "TFLNode.h"
#include "TFLNodes.h"

#include <oops/InternalExn.h>

Expand Down
2 changes: 1 addition & 1 deletion compiler/exo/src/Dialect/IR/TFLNodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ class TFLTransposeConv final : public FixedArityNode<3, TFLNodeImpl<TFLOpcode::T
Stride *stride(void) { return &_stride; }

private:
Padding _padding;
Padding _padding{Padding::UNDEFINED};
Stride _stride;
};

Expand Down
4 changes: 2 additions & 2 deletions compiler/exo/src/Pass/FuseBiasAddPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ template <class LatterT> locoex::TFLConst *Fuser<LatterT>::create_fused_bias_con
{
// we have to create a new bias const by adding/substracting bias and const node (of TFLAdd or
// TFLSub)
auto bias = dynamic_cast<locoex::TFLConst *>(_former->bias());
auto bias = loco::must_cast<locoex::TFLConst *>(_former->bias());
assert(bias->dtype() == loco::DataType::FLOAT32 &&
_const_node->dtype() == loco::DataType::FLOAT32);

Expand Down Expand Up @@ -344,7 +344,7 @@ bool FuseBiasAddPass::run(loco::Graph *g)
{
if (node->dialect() == locoex::TFLDialect::get())
{
auto tfl_node = dynamic_cast<locoex::TFLNode *>(node);
auto tfl_node = loco::must_cast<locoex::TFLNode *>(node);
tfl_node->accept(&collector);
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/exo/src/Pass/FuseReluPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ bool FuseReluPass::run(loco::Graph *g)
{
if (node->dialect() == locoex::TFLDialect::get())
{
auto tfl_node = dynamic_cast<locoex::TFLNode *>(node);
auto tfl_node = loco::must_cast<locoex::TFLNode *>(node);
tfl_node->accept(&collector);
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/exo/src/TFLite/TFLTypeInference.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Sequential

private:
loco::Graph _graph;
loco::Node *_last;
loco::Node *_last{nullptr};
};

struct TypeInferenceTest : public Sequential, public ::testing::Test
Expand Down

0 comments on commit ce67186

Please sign in to comment.