提交 3cef522a authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Add more tests for GpuGemv.

上级 93c40296
...@@ -6,7 +6,7 @@ from theano import tensor ...@@ -6,7 +6,7 @@ from theano import tensor
from theano.tests import unittest_tools from theano.tests import unittest_tools
from theano.tensor.blas import (gemv_inplace, gemm_inplace, ger_destructive, from theano.tensor.blas import (gemv_inplace, gemm_inplace, ger_destructive,
_dot22) _dot22)
from theano.tensor.tests.test_blas import TestGer from theano.tensor.tests.test_blas import TestGer, BaseGemv
from theano.sandbox.gpuarray import gpuarray_shared_constructor from theano.sandbox.gpuarray import gpuarray_shared_constructor
from theano.sandbox.gpuarray.tests.test_basic_ops import (makeTester, rand, from theano.sandbox.gpuarray.tests.test_basic_ops import (makeTester, rand,
...@@ -30,6 +30,21 @@ GpuGemvTester = makeTester('GpuGemvTester', ...@@ -30,6 +30,21 @@ GpuGemvTester = makeTester('GpuGemvTester',
) )
) )
class TestGpuSgemv(TestCase, BaseGemv, unittest_tools.TestOptimizationMixin):
mode = mode_with_gpu
dtype = 'float32'
gemv = gpugemv_no_inplace
gemv_inplace = gpugemv_inplace
@staticmethod
def shared(val):
try:
return gpuarray_shared_constructor(val)
except TypeError:
return theano.shared(val)
GpuGemmTester = makeTester('GpuGemmTester', GpuGemmTester = makeTester('GpuGemmTester',
op=gemm_inplace, gpu_op=gpugemm_inplace, op=gemm_inplace, gpu_op=gpugemm_inplace,
cases=dict( cases=dict(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论