提交 9ad185d8 authored 作者: Frederic's avatar Frederic

Raise a better error message when theano didn't recompile a lib correctly.

上级 58ee3f1c
...@@ -429,6 +429,10 @@ def use(device, ...@@ -429,6 +429,10 @@ def use(device,
# query the active GPU. If we check the active GPU before # query the active GPU. If we check the active GPU before
# the device is initialized we will always receive 0 # the device is initialized we will always receive 0
# event if another device is selected later. # event if another device is selected later.
if not hasattr(cuda_ndarray.cuda_ndarray, 'select_a_gpu'):
raise Exception(
"Delete your Theano cache. The automatic"
" recompilation didn't worked.")
cuda_ndarray.cuda_ndarray.select_a_gpu() cuda_ndarray.cuda_ndarray.select_a_gpu()
use.device_number = active_device_number() use.device_number = active_device_number()
# This is needed to initialize the cublas handle. # This is needed to initialize the cublas handle.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论