提交 5211eb8a authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make sure to run the new test on the GPU and skip it if we can't use the new backend.

上级 454ca2cb
......@@ -74,6 +74,7 @@ export PYTHONPATH=${PYTHONPATH}:$LIBDIR/lib/python
THEANO_GPUARRAY_TESTS="theano/gpuarray/tests \
theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_serial \
theano/sandbox/tests/test_rng_mrg.py:test_consistency_GPUA_parallel \
theano/sandbox/tests/test_rng_mrg.py:test_GPUA_full_fill \
theano/scan_module/tests/test_scan.py:T_Scan_Gpuarray"
FLAGS="init_gpu_device=$DEVICE,gpuarray.preallocate=1000,mode=FAST_RUN"
THEANO_FLAGS=${FLAGS} time nosetests -v --with-xunit --xunit-file=theanogpuarray_tests.xml ${THEANO_GPUARRAY_TESTS}
......@@ -363,7 +363,7 @@ def test_GPU_nstreams_limit():
def test_consistency_GPUA_serial():
# Verify that the random numbers generated by GPUA_mrg_uniform, serially,
# are the same as the reference (Java) implementation by L'Ecuyer et al.
from theano.gpuarray.tests.test_basic_ops import mode_with_gpu as mode
from theano.gpuarray.tests.config import mode_with_gpu as mode
from theano.gpuarray.type import gpuarray_shared_constructor
seed = 12345
......@@ -414,7 +414,7 @@ def test_consistency_GPUA_parallel():
# Verify that the random numbers generated by GPUA_mrg_uniform, in
# parallel, are the same as the reference (Java) implementation by
# L'Ecuyer et al.
from theano.gpuarray.tests.test_basic_ops import mode_with_gpu as mode
from theano.gpuarray.tests.config import mode_with_gpu as mode
from theano.gpuarray.type import gpuarray_shared_constructor
seed = 12345
......@@ -463,6 +463,7 @@ def test_consistency_GPUA_parallel():
def test_GPUA_full_fill():
# Make sure the whole sample buffer is filled. Also make sure
# large samples are consistent with CPU results.
import theano.gpuarray.tests.config
from theano.gpuarray.type import gpuarray_shared_constructor
# This needs to be large to trigger the problem on GPU
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论