提交 268503ac authored 作者: abergeron's avatar abergeron 提交者: GitHub

Merge pull request #5304 from nouiz/gpuarray_small

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