Skip to content

Commit

Permalink
Skip reorder optimization if reorder has dynamic shape on remove_redu…
Browse files Browse the repository at this point in the history
…ndant_reorders
  • Loading branch information
andrew-k-park committed Jul 4, 2023
1 parent 8d0fc19 commit 58cb095
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ void remove_redundant_reorders::run(program& p) {
itr = p.get_processing_order().begin();
while (itr != p.get_processing_order().end()) {
auto& node_ptr = *itr++;
if (!node_ptr->is_type<reorder>() || !node_ptr->is_in_data_flow() || node_ptr->get_users().size() != 1 || node_ptr->get_dependencies().size() != 1)
if (!node_ptr->is_type<reorder>() || !node_ptr->is_in_data_flow() || node_ptr->get_users().size() != 1 ||
node_ptr->get_dependencies().size() != 1 || node_ptr->is_dynamic())
continue;

auto& node = node_ptr->as<reorder>();
Expand Down

0 comments on commit 58cb095

Please sign in to comment.