提交 4c101c36 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix the crash on exit with pycuda.

上级 6d327bd5
...@@ -49,6 +49,8 @@ else: ...@@ -49,6 +49,8 @@ else:
if pycuda_available: if pycuda_available:
if hasattr(pycuda.driver.Context, "attach"): if hasattr(pycuda.driver.Context, "attach"):
pycuda.driver.Context.attach() pycuda.driver.Context.attach()
import atexit
atexit.register(pycuda.driver.Context.pop)
else: else:
# Now we always import this file when we call # Now we always import this file when we call
# theano.sandbox.cuda.use. So this should not happen # theano.sandbox.cuda.use. So this should not happen
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论