提交 02a7bc1a authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron 提交者: Frederic Bastien

Add an error message when the API version is too low.

上级 85375e23
......@@ -47,6 +47,9 @@ def init_dev(dev, name=None):
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")
# This is for the C headers API
if pygpu.gpuarray.api_version()[0] < 0:
raise ValueError("Your installed libgpuarray is too old, please update")
need_preallocate = False
if dev not in init_dev.devmap:
ctx = pygpu.init(dev,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论