提交 183ec937 authored 作者: Frederic's avatar Frederic

small fix following code review.

上级 5c0d8837
......@@ -38,10 +38,7 @@ if (not hasattr(theano.sandbox, 'cuda') or
else:
if "CUDA_DEVICE" in os.environ:
del os.environ["CUDA_DEVICE"]
try:
import pycuda.autoinit
except pycuda._driver.LogicError:
pass
import pycuda.autoinit
pycuda_available = True
else:
import pycuda.driver
......@@ -55,5 +52,6 @@ else:
" imported before Theano initialized the GPU and"
" your PyCUDA version is 2011.2.2 or earlier."
" To fix the problem, import theano.misc.pycuda_init"
" manually before using/initializing the GPU or use a"
" manually before using/initializing the GPU, use the"
" Theano flag pycuda.init=True or use a"
" more recent version of PyCUDA.")
......@@ -339,7 +339,7 @@ def use(device,
if device != 'gpu' and device < 0:
return
# Do PyCUDA already initialized the GPU contect
# Has PyCUDA already initialized the GPU context
pycuda_init_dev = False
if config.pycuda.init:
import theano.misc.pycuda_init
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论