提交 7459819e authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make sure to hide the c_code for GpuElemwise.

上级 800bf55c
...@@ -138,9 +138,14 @@ class GpuElemwise(Elemwise): ...@@ -138,9 +138,14 @@ class GpuElemwise(Elemwise):
res.append("static const gpukernel *%s_c_k = NULL;" % (nodename,)) res.append("static const gpukernel *%s_c_k = NULL;" % (nodename,))
return '\n'.join(res) return '\n'.join(res)
def c_code(self, *args): def hide(self, *args):
# do not pick up the Elemwise version raise MethodNotDefined()
raise MethodNotDefined('c_code')
c_headers = hide
c_support_code = hide
c_support_code_apply = hide
c_code_cache_version_apply = hide
c_code = hide
def perform(self, node, inputs, output_storage): def perform(self, node, inputs, output_storage):
# Try to reuse the kernel from a previous call to hopefully # Try to reuse the kernel from a previous call to hopefully
......
...@@ -12,6 +12,7 @@ from theano.sandbox.gpuarray.type import GpuArrayType ...@@ -12,6 +12,7 @@ from theano.sandbox.gpuarray.type import GpuArrayType
from pygpu.array import gpuarray from pygpu.array import gpuarray
# This is acutally a test for GpuElemwise
class test_gpu_Broadcast(test_Broadcast): class test_gpu_Broadcast(test_Broadcast):
op = GpuElemwise op = GpuElemwise
type = GpuArrayType type = GpuArrayType
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论