提交 61066fb6 authored 作者: Matthew Rocklin's avatar Matthew Rocklin

Only set schedule conditionally

This should reduce pickling issues
上级 f7dc6806
......@@ -1551,7 +1551,8 @@ class _Linker(gof.link.LocalLinker):
super(gof.LocalLinker, self).__init__()
self.fgraph = None
self.maker = maker
self.schedule = schedule or self.schedule
if schedule:
self.schedule = schedule
def accept(self, fgraph, no_recycling=None):
if no_recycling is None:
......
......@@ -404,7 +404,8 @@ class CLinker(link.Linker):
def __init__(self, schedule=None):
self.fgraph = None
self.schedule = schedule or self.schedule
if schedule:
self.schedule = schedule
def accept(self, fgraph, no_recycling=None):
"""WRITEME"""
......@@ -1405,7 +1406,8 @@ class OpWiseCLinker(link.LocalLinker):
self.fallback_on_perform = fallback_on_perform
self.nice_errors = nice_errors
self.allow_gc = allow_gc
self.schedule = schedule or self.schedule
if schedule:
self.schedule = schedule
def accept(self, fgraph, no_recycling=None):
if no_recycling is None:
......@@ -1550,7 +1552,8 @@ class DualLinker(link.Linker):
"""
self.fgraph = None
self.checker = checker
self.schedule = schedule or self.schedule
if schedule:
self.schedule = schedule
def accept(self, fgraph, no_recycling=None):
if no_recycling is None:
......
......@@ -424,7 +424,8 @@ class PerformLinker(LocalLinker):
#TODO: set allow_gc = True by default, when it works with the OpWiseCLinker
self.fgraph = None
self.allow_gc = allow_gc
self.schedule = schedule or self.schedule
if schedule:
self.schedule = schedule
def accept(self, fgraph, no_recycling=None):
"""
......
......@@ -538,7 +538,8 @@ class VM_Linker(link.LocalLinker):
self.callback = callback
self.lazy = lazy
self.updated_vars = {}
self.schedule = schedule or self.schedule
if schedule:
self.schedule = schedule
def accept(self, fgraph, no_recycling=None):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论