Skip to content

Commit 23372ab

Browse files
committed
check source type
1 parent 9e5c2e2 commit 23372ab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

visualdl/component/graph/graph_component.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ def get_sub_ops(op, op_name, all_ops, all_vars):
464464
all_ops[sub_op_name]['is_leaf_node'] = True
465465
now_var = utils.gen_var_name(sub_op.results())
466466
for source in sub_op.operands_source():
467-
if str(source.type()) == '<<NULL TYPE>>':
467+
if not source.type():
468+
# if source.type() == Value().type():
468469
continue
469470
input_name = utils.gen_var_name(source)
470471
if input_name not in all_vars.keys():
@@ -655,7 +656,8 @@ def analyse_pir(program):
655656
all_ops[op_name]['is_leaf_node'] = True
656657
now_var = utils.gen_var_name(op.results())
657658
for source in op.operands_source():
658-
if str(source.type()) == '<<NULL TYPE>>':
659+
if not source.type():
660+
# if source.type() == Value().type():
659661
continue
660662
input_name = utils.gen_var_name(source)
661663
if input_name not in all_vars.keys():

0 commit comments

Comments
 (0)