Skip to content

Commit

Permalink
Change to skip mark_node in shape flow for broadcast node if dependen…
Browse files Browse the repository at this point in the history
…cy node is shape_of

Signed-off-by: yuan.xiong <[email protected]>
  • Loading branch information
yuanxion committed Dec 2, 2024
1 parent 210cf48 commit 4cb8b68
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//

#include "broadcast_inst.h"
#include "reorder_inst.h"
#include "shape_of_inst.h"
#include "read_value_inst.h"
#include "reshape_inst.h"
Expand All @@ -28,8 +27,8 @@ void mark_shape_of_subgraphs::look_for_shape_of_subgraph(program_node& node) {
bool has_shape_of_subgraph_dep = false;
for (auto& dependency : node.get_dependencies()) {
if (dependency.first->is_in_shape_of_subgraph()) {
// skip mark_node for reorder node if dependency node is broadcast
if (dependency.first->is_type<broadcast>() && node.is_type<reorder>()) {
// skip mark_node for broadcast node if dependency node is shape_of
if (dependency.first->is_type<shape_of>() && node.is_type<broadcast>()) {
break;
}
has_shape_of_subgraph_dep = true;
Expand Down

0 comments on commit 4cb8b68

Please sign in to comment.