提交 a2965197 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Try to prevent copy-and-paste of hackish code.

上级 b740b55f
...@@ -18,6 +18,8 @@ import theano.sandbox.gpuarray ...@@ -18,6 +18,8 @@ import theano.sandbox.gpuarray
if theano.sandbox.gpuarray.pygpu is None: if theano.sandbox.gpuarray.pygpu is None:
raise SkipTest("pygpu not installed") raise SkipTest("pygpu not installed")
# If you are writing a new test file, don't copy this code, but rather
# import stuff from this file (like mode_with_gpu) to reuse it.
import theano.sandbox.cuda as cuda_ndarray import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.cuda_available and not theano.sandbox.gpuarray.pygpu_activated: if cuda_ndarray.cuda_available and not theano.sandbox.gpuarray.pygpu_activated:
if not cuda_ndarray.use.device_number: if not cuda_ndarray.use.device_number:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论