提交 a08bba5b authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Remember the device init_dev() was called with.

上级 017b6e3e
...@@ -39,6 +39,10 @@ def init_dev(dev): ...@@ -39,6 +39,10 @@ def init_dev(dev):
pygpu_activated = True pygpu_activated = True
if config.print_active_device: if config.print_active_device:
print >> sys.stderr, "Using device %s: %s" % (dev, context.devname) print >> sys.stderr, "Using device %s: %s" % (dev, context.devname)
# remember the active device
init_dev.device = dev
init_dev.device = None
if pygpu: if pygpu:
try: try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论