提交 03bb1866 authored 作者: abergeron's avatar abergeron

Merge pull request #1642 from nouiz/gpua_elemwise

Gpua elemwise
......@@ -362,7 +362,7 @@ def get_module_hash(src_code, key):
# it changes, then the module hash should be different.
# We start with the source code itself (stripping blanks might avoid
# recompiling after a basic indentation fix for instance).
to_hash = map(str.strip, src_code.split('\n'))
to_hash = [l.strip() for l in src_code.split('\n')]
# Get the version part of the key (ignore if unversioned).
if key[0]:
to_hash += map(str, key[0])
......
......@@ -15,11 +15,14 @@ from theano.sandbox.gpuarray.type import GpuArrayType
from pygpu.array import gpuarray
# This is acutally a test for GpuElemwise
class test_gpu_Broadcast(test_Broadcast):
op = GpuElemwise
type = GpuArrayType
cop = GpuElemwise
ctype = GpuArrayType
def rand_val(self, shp):
return rand_gpuarray(*shp, **dict(cls=gpuarray))
......@@ -27,8 +30,8 @@ class test_gpu_Broadcast(test_Broadcast):
#cop = GpuElemwise
#ctype = GpuArrayType
#def rand_cval(self, shp):
# return rand_gpuarray(*shp, **dict(cls=gpuarray))
def rand_cval(self, shp):
return rand_gpuarray(*shp, **dict(cls=gpuarray))
class test_GpuDimShuffle(test_DimShuffle):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论