提交 8e57519b authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make the IfElse op_lifter not lift inputs that are scalars.

上级 126240a6
...@@ -923,7 +923,7 @@ def local_gpua_lazy_ifelse(op, context_name, inputs, outputs): ...@@ -923,7 +923,7 @@ def local_gpua_lazy_ifelse(op, context_name, inputs, outputs):
c = inputs[0] c = inputs[0]
inps = [] inps = []
for v in inputs[1:]: for v in inputs[1:]:
if isinstance(v.type, tensor.TensorType): if isinstance(v.type, tensor.TensorType) and move_to_gpu(v):
inps.append(as_gpuarray_variable(v, context_name)) inps.append(as_gpuarray_variable(v, context_name))
else: else:
inps.append(v) inps.append(v)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论