提交 ef41de9c authored 作者: Frederic Bastien's avatar Frederic Bastien

Make cnmem print the start size to make it more clear for user.

上级 290631f3
......@@ -591,7 +591,14 @@ def use(device,
" this property")
if config.print_active_device:
cnmem_enabled = "enabled" if config.lib.cnmem else "disabled"
if config.lib.cnmem:
if config.lib.cnmem > 1:
cnmem_enabled = "enabled with initial size: %d MB" % config.lib.cnmem
else:
cnmem = min(config.lib.cnmem, 0.98)
cnmem_enabled = "enabled with initial size: %.2f%% of memory" % cnmem
else:
cnmem_enabled = "disabled"
cudnn_version = "not available"
warn = None
try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论