提交 03dfb4b9 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Make it possible to use the context initialized by the old cuda module.

上级 a7d02146
......@@ -81,10 +81,6 @@ from theano.updates import Updates, OrderedUpdates
from theano.gradient import Rop, Lop, grad
if config.device.startswith('cuda') or config.device.startswith('opencl') or \
config.gpuarray.init_device != '':
import theano.sandbox.gpuarray
if config.device.startswith('gpu') or config.init_gpu_device.startswith('gpu'):
import theano.sandbox.cuda
# We can't test the driver during import of theano.sandbox.cuda as
......@@ -95,6 +91,10 @@ if config.device.startswith('gpu') or config.init_gpu_device.startswith('gpu'):
theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
if config.device.startswith('cuda') or config.device.startswith('opencl') or \
config.gpuarray.init_device != '':
import theano.sandbox.gpuarray
# Use config.numpy to call numpy.seterr
import numpy
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论