提交 46680247 authored 作者: abergeron's avatar abergeron

Merge pull request #3348 from nouiz/CoulombeC-master

Small visual changes (blue color) (bis)
...@@ -586,7 +586,8 @@ default_colorCodes = {'GpuFromHost': 'red', ...@@ -586,7 +586,8 @@ default_colorCodes = {'GpuFromHost': 'red',
'IfElse': 'magenta', 'IfElse': 'magenta',
'Elemwise': '#FFAABB', # dark pink 'Elemwise': '#FFAABB', # dark pink
'Subtensor': '#FFAAFF', # purple 'Subtensor': '#FFAAFF', # purple
'Alloc': '#FFAA22'} # orange 'Alloc': '#FFAA22', # orange
'Output': 'blue'}
def pydotprint(fct, outfile=None, def pydotprint(fct, outfile=None,
...@@ -889,7 +890,7 @@ def pydotprint(fct, outfile=None, ...@@ -889,7 +890,7 @@ def pydotprint(fct, outfile=None,
param['label'] = label param['label'] = label
if hasattr(node.op, 'view_map') and idx in reduce( if hasattr(node.op, 'view_map') and idx in reduce(
list.__add__, node.op.view_map.values(), []): list.__add__, node.op.view_map.values(), []):
param['color'] = 'blue' param['color'] = colorCodes['Output']
elif hasattr(node.op, 'destroy_map') and idx in reduce( elif hasattr(node.op, 'destroy_map') and idx in reduce(
list.__add__, node.op.destroy_map.values(), []): list.__add__, node.op.destroy_map.values(), []):
param['color'] = 'red' param['color'] = 'red'
...@@ -939,9 +940,9 @@ def pydotprint(fct, outfile=None, ...@@ -939,9 +940,9 @@ def pydotprint(fct, outfile=None,
if high_contrast: if high_contrast:
g.add_node(pd.Node(varid, style='filled', g.add_node(pd.Node(varid, style='filled',
label=varstr, label=varstr,
fillcolor='blue', shape=var_shape)) fillcolor=colorCodes['Output'], shape=var_shape))
else: else:
g.add_node(pd.Node(varid, color='blue', g.add_node(pd.Node(varid, color=colorCodes['Output'],
label=varstr, label=varstr,
shape=var_shape)) shape=var_shape))
elif len(var.clients) == 0: elif len(var.clients) == 0:
...@@ -971,7 +972,7 @@ def pydotprint(fct, outfile=None, ...@@ -971,7 +972,7 @@ def pydotprint(fct, outfile=None,
for sha, up in input_update.items(): for sha, up in input_update.items():
_, shaid = var_name(sha) _, shaid = var_name(sha)
_, upid = var_name(up) _, upid = var_name(up)
g.add_edge(pd.Edge(shaid, upid, label="UPDATE", color="blue")) g.add_edge(pd.Edge(shaid, upid, label="UPDATE", color=colorCodes['Output']))
if cond_highlight: if cond_highlight:
g.add_subgraph(c1) g.add_subgraph(c1)
...@@ -1135,7 +1136,7 @@ def pydotprint_variables(vars, ...@@ -1135,7 +1136,7 @@ def pydotprint_variables(vars,
my_list[nd] = varastr my_list[nd] = varastr
color = None color = None
if nd in vars: if nd in vars:
color = 'blue' color = colorCodes['Output']
elif nd in orphanes: elif nd in orphanes:
color = 'gray' color = 'gray'
if color is None: if color is None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论