提交 008ebfaa authored 作者: Matthew Rocklin's avatar Matthew Rocklin

add print_active_device flag

上级 ca55d2f9
......@@ -75,6 +75,11 @@ AddConfigVar('force_device',
BoolParam(False, allow_override=False),
in_c_key=False)
AddConfigVar('print_active_device',
"Print active device at startup",
BoolParam(True, allow_override=False),
in_c_key=False)
# Do not add FAST_RUN_NOGC to this list (nor any other ALL CAPS shortcut).
# The way to get FAST_RUN_NOGC is with the flag 'linker=c|py_nogc'.
# The old all capital letter way of working is deprecated as it is not
......
......@@ -379,8 +379,10 @@ def use(device,
if enable_cuda:
cuda_enabled = True
print >> sys.stderr, "Using gpu device %d: %s" % (
use.device_number, active_device_name())
if config.print_active_device:
print >> sys.stderr, "Using gpu device %d: %s" %(
active_device_number(), active_device_name())
if device_properties(use.device_number)['regsPerBlock'] < 16384:
# We will try to use too much register per bloc at many places
# when there is only 8k register per multi-processor.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论