提交 23cc6765 authored 作者: Frederic's avatar Frederic

Better error message

上级 63718d51
......@@ -398,7 +398,8 @@ def use(device,
assert isinstance(device, int)
gpu_init(device, config.lib.cnmem)
use.device_number = device
assert active_device_number() == device
active_device = active_device_number()
assert active_device == device, (active_device, device)
else:
# This mean the driver should select the GPU. As we
# need to get the device number now, we force the
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论