提交 7f3dd18b authored 作者: Thomas George's avatar Thomas George

rebase + addressed missing params in perform

上级 82d0dea5
......@@ -993,11 +993,11 @@ class GpuAllocEmpty(HideC, AllocEmpty):
self.perform(node, inputs, out_, ctx)
out_[0][0][:] = -123456789
def perform(self, node, inputs, out_, ctx):
def perform(self, node, inputs, out_, params):
out = out_[0]
sh = [int(i) for i in inputs]
if out[0] is None or out[0].shape != sh:
out[0] = pygpu.empty(sh, dtype=self.dtype, context=ctx)
out[0] = pygpu.empty(sh, dtype=self.dtype, context=params.context)
# if out[0] is the right shape, we just return it
def c_headers(self):
......
......@@ -6667,7 +6667,7 @@ class AllocEmpty(gof.Op):
self.perform(node, inputs, out_)
out_[0][0].fill(-123456789)
def perform(self, node, inputs, out_):
def perform(self, node, inputs, out_, params):
out, = out_
sh = tuple([int(i) for i in inputs])
if out[0] is None or out[0].shape != sh:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论