提交 9928bbf2 authored 作者: Frederic Bastien's avatar Frederic Bastien

Don't allow to change gpuarray.preallocate during execution and make mandatory…

Don't allow to change gpuarray.preallocate during execution and make mandatory cxx for the new back-end.
上级 a37a03f1
......@@ -239,7 +239,7 @@ AddConfigVar('gpuarray.preallocate',
preallocates that fraction of the total GPU memory. If 1
or greater it will preallocate that amount of memory (in
megabytes).""",
FloatParam(0),
FloatParam(0, allow_override=False),
in_c_key=False)
AddConfigVar('gpuarray.sched',
......
......@@ -43,6 +43,8 @@ register_transfer(transfer)
def init_dev(dev, name=None):
global pygpu_activated
if not config.cxx:
raise RuntimeError("The new gpu-backend need a c++ compiler.")
if (pygpu.version.major, pygpu.version.minor) < (0, 6):
raise ValueError("Your installed version of pygpu is too old, please upgrade to 0.6 or later")
if dev not in init_dev.devmap:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论