Skip to content

Commit

Permalink
trim
Browse files Browse the repository at this point in the history
  • Loading branch information
zetwhite committed Oct 4, 2024
1 parent 706cbf0 commit 984bc99
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions compiler/luci/pass/src/RemoveUnnecessaryTransposeNetPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<luci::CircleNode *>(front_transpose->a());
_in = loco::must_cast<luci::CircleNode *>(front_transpose->a());
_front_transpose = front_transpose;
_mid_reshape = mid_reshape;
_back_transpose = back_transpose;
Expand Down Expand Up @@ -370,14 +370,10 @@ bool TaggedShapeAnalyzer::init(const luci::CircleTranspose *front_transpose,
*/
template <loco::DataType DType> 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<int32_t&> 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<int32_t&> intead of CircleNode*
init_shape_with_tag(_in);

analyze_transpose<DType>(_front_transpose);
Expand Down

0 comments on commit 984bc99

Please sign in to comment.