提交 35d29d38 authored 作者: Frederic Bastien's avatar Frederic Bastien

don't put the input pattern in the GpuElemwise as we don't do it and this cause not needed copy.

上级 5b6e5783
...@@ -79,8 +79,14 @@ class GpuElemwise(Op): ...@@ -79,8 +79,14 @@ class GpuElemwise(Op):
# #
sync = config.config.getboolean('gpuelemwise.sync',sync) sync = config.config.getboolean('gpuelemwise.sync',sync)
self.scalar_op = scalar_op self.scalar_op = scalar_op
self.inplace_pattern = inplace_pattern if 0:
self.destroy_map = dict((o, [i]) for o, i in inplace_pattern.items()) #we don't put them their as this cause trouble with the local_cut_gpu_host_gpu optimizer.
#and the gpu don't implement any inplace pattern for now.
self.inplace_pattern = inplace_pattern
self.destroy_map = dict((o, [i]) for o, i in inplace_pattern.items())
else:
self.inplace_pattern = {}
if scalar_op.nin > 0: if scalar_op.nin > 0:
self.ufunc = numpy.frompyfunc(scalar_op.impl, scalar_op.nin, scalar_op.nout) self.ufunc = numpy.frompyfunc(scalar_op.impl, scalar_op.nin, scalar_op.nout)
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论