提交 0d0b7e72 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

More general check

Some clients can be strings other than 'output', for instance 'context' Conflicts: theano/gof/cc.py
上级 c318153c
......@@ -282,12 +282,10 @@ def get_nothing(r, name, sub):
def get_c_declare(r, name, sub):
"""Wrapper around c_declare that declares py_name"""
if any([c != "output" and getattr(c.op, 'check_input',
config.check_input) for (c, _) in r.clients]) or (
r.owner and getattr(r.owner.op, 'check_input', True)):
#if any([getattr(c.op, 'check_input', config.check_input)
# for (c, _) in r.clients
# if not isinstance(c, string_types)]) or (r.owner
if ((any([getattr(c.op, 'check_input', config.check_input)
for (c, _) in r.clients
if not isinstance(c, string_types)]) or
(r.owner and getattr(r.owner.op, 'check_input', True)))):
c_declare = r.type.c_declare(name, sub, True)
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论