提交 2d733797 authored 作者: abergeron's avatar abergeron

Merge pull request #2708 from lamblin/fix_test_memory

Re-enable C code for GpuAlloc
...@@ -3370,7 +3370,7 @@ class GpuAlloc(GpuAllocEmpty): ...@@ -3370,7 +3370,7 @@ class GpuAlloc(GpuAllocEmpty):
# the super class (GpuAllocEmpty) allocates memory, we fill it # the super class (GpuAllocEmpty) allocates memory, we fill it
value = inputs[0] value = inputs[0]
shps = inputs[1:] shps = inputs[1:]
str = super(GpuAllocEmpty, self).c_code(node, name, shps, out_, sub) str = super(GpuAlloc, self).c_code(node, name, shps, out_, sub)
out, = out_ out, = out_
fail = sub['fail'] fail = sub['fail']
memset_0 = int(self.memset_0) memset_0 = int(self.memset_0)
...@@ -3405,7 +3405,8 @@ class GpuAlloc(GpuAllocEmpty): ...@@ -3405,7 +3405,8 @@ class GpuAlloc(GpuAllocEmpty):
return [node.inputs[1:]] return [node.inputs[1:]]
def c_code_cache_version(self): def c_code_cache_version(self):
return (10,) parent_version = super(GpuAlloc, self).c_code_cache_version()
return (parent_version, 10)
def do_constant_folding(self, node): def do_constant_folding(self, node):
for client in node.outputs[0].clients: for client in node.outputs[0].clients:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论