提交 8fcb85e5 authored 作者: f0k's avatar f0k

Fix Python implementation of refactored GpuAlloc

上级 2519a07f
......@@ -3362,9 +3362,11 @@ class GpuAlloc(GpuAllocEmpty):
def perform(self, node, inputs, out_):
# the super class (GpuAllocEmpty) allocates memory, we fill it
super(GpuAlloc, self).perform(node, inputs, out_)
value = inputs[0]
shps = inputs[1:]
super(GpuAlloc, self).perform(node, shps, out_)
out, = out_
out[0][...] = v # broadcast v to fill us up
out[0][...] = value # broadcast value to fill us up
def c_code(self, node, name, inputs, out_, sub):
# the super class (GpuAllocEmpty) allocates memory, we fill it
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论