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

Be verbose when the allocation cache is disabled.

上级 ed9c389c
...@@ -66,7 +66,9 @@ def init_dev(dev, name=None): ...@@ -66,7 +66,9 @@ def init_dev(dev, name=None):
single_stream=config.gpuarray.single_stream, single_stream=config.gpuarray.single_stream,
sched=config.gpuarray.sched) sched=config.gpuarray.sched)
init_dev.devmap[dev] = ctx init_dev.devmap[dev] = ctx
if config.gpuarray.preallocate > 0: if config.gpuarray.preallocate < 0:
print("Disabling allocation cache on %s" % (dev,))
elif config.gpuarray.preallocate > 0:
MB = (1024 * 1024) MB = (1024 * 1024)
if config.gpuarray.preallocate <= 1: if config.gpuarray.preallocate <= 1:
gmem = min(config.gpuarray.preallocate, 0.95) * ctx.total_gmem gmem = min(config.gpuarray.preallocate, 0.95) * ctx.total_gmem
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论