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

Assert that the active device is the right one.

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