diff --git a/compiler/luci/pass/src/RemoveUnnecessaryTransposeNetPass.cpp b/compiler/luci/pass/src/RemoveUnnecessaryTransposeNetPass.cpp index c1b09f437e8..8d99816c332 100644 --- a/compiler/luci/pass/src/RemoveUnnecessaryTransposeNetPass.cpp +++ b/compiler/luci/pass/src/RemoveUnnecessaryTransposeNetPass.cpp @@ -292,7 +292,7 @@ bool TaggedShapeAnalyzer::init(const luci::CircleTranspose *front_transpose, const luci::CircleReshape *mid_reshape, const luci::CircleTranspose *back_transpose) { - _in = dynamic_cast(front_transpose->a()); + _in = loco::must_cast(front_transpose->a()); _front_transpose = front_transpose; _mid_reshape = mid_reshape; _back_transpose = back_transpose; @@ -370,14 +370,10 @@ bool TaggedShapeAnalyzer::init(const luci::CircleTranspose *front_transpose, */ template bool TaggedShapeAnalyzer::can_remove_transposes() { - assert(_in != nullptr || _front_transpose != nullptr || _mid_reshape != nullptr || + assert(_in != nullptr && _front_transpose != nullptr && _mid_reshape != nullptr && _back_transpose != nullptr); - // TODO: Update methods to use std::vector intead of CircleNode ptr - // For example, - // init_shape_with_tag(_in_shape_v); - // analyze_transpose(_fornt_perm_v); - + // TODO: Update under methods to use std::vector intead of CircleNode* init_shape_with_tag(_in); analyze_transpose(_front_transpose);