提交 1493864e authored 作者: Razvan Pascanu's avatar Razvan Pascanu

merge

import atexit, os, stat
import atexit, gc, os, stat
from theano.compile import optdb
from theano import config
......@@ -94,7 +94,11 @@ if cuda_available:
gpu_init()
cuda_available = True
cuda_initialization_error_message = ""
# actively closing our gpu session presents segfault-on-exit on some systems
atexit.register(gpu_shutdown)
# do garbage collection before releasing the gpu to avoid releasing invalid pointers later
# note that atexit-registered calls are called in LIFO order
atexit.register(gc.collect)
except EnvironmentError, e:
cuda_available = False
cuda_initialization_error_message = e.message
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论