提交 1893c13a authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Use prepare_node() instead of make_thunk() in Elemwise.

上级 710e6b48
......@@ -793,8 +793,7 @@ class Elemwise(OpenMPOp):
return ret
def make_thunk(self, node, storage_map, compute_map, no_recycling):
node_ = node
def prepare_node(self, node):
# Postpone the ufunc building to the last minutes
# NumPy ufunc support only up to 31 inputs.
# But our c code support more.
......@@ -830,8 +829,6 @@ class Elemwise(OpenMPOp):
char = numpy.sctype2char(out_dtype)
sig = char * node.nin + '->' + char * node.nout
node.tag.sig = sig
return super(Elemwise, node_.op).make_thunk(node_, storage_map,
compute_map, no_recycling)
def perform(self, node, inputs, output_storage):
if len(node.inputs) >= 32:
......@@ -1273,19 +1270,6 @@ class Elemwise(OpenMPOp):
"""
return node.outputs[0].ndim == 0
theano.compile.debugmode.default_make_thunk.append(
get_unbound_function(Elemwise.make_thunk))
# def elemwise_to_scal(fgraph):
# TODO: why is this commented out? should it be removed?
# it has needed maintenance despite being commented
# mapping = {}
# inputs = []
# outputs = []
# for node in fgraph.io_toposort():
# if not isinstance(node.op, Elemwise):
# raise TypeError('All ops in the graph must be Elemwise.')
################
# CAReduce #
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论