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