提交 be494716 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #6443 from abergeron/misc_fixes

Misc fixes
...@@ -64,7 +64,7 @@ def init_dev(dev, name=None, preallocate=None): ...@@ -64,7 +64,7 @@ def init_dev(dev, name=None, preallocate=None):
if (pygpu_version.major != 0 or pygpu_version.minor != 7 or if (pygpu_version.major != 0 or pygpu_version.minor != 7 or
pygpu_version.patch < 0): pygpu_version.patch < 0):
raise ValueError( raise ValueError(
"Your installed version of pygpu(%s) is too old, please upgrade to 0.7.0 or later" % "Your installed version of pygpu(%s) is too old, please upgrade to 0.7.0 or later (but below 0.8.0)" %
pygpu_version.fullversion) pygpu_version.fullversion)
# This is for the C headers API, we need to match the exact version. # This is for the C headers API, we need to match the exact version.
gpuarray_version_major_supported = 2 gpuarray_version_major_supported = 2
......
...@@ -461,6 +461,9 @@ if (%(out)s == NULL || !GpuArray_IS_C_CONTIGUOUS(&%(out)s->ga) || ...@@ -461,6 +461,9 @@ if (%(out)s == NULL || !GpuArray_IS_C_CONTIGUOUS(&%(out)s->ga) ||
%(v)s->ga.dimensions[0] = %(idx)s->ga.dimensions[0]; %(v)s->ga.dimensions[0] = %(idx)s->ga.dimensions[0];
%(out)s = pygpu_empty(%(v)s->ga.nd, %(v)s->ga.dimensions, %(v)s->ga.typecode, %(out)s = pygpu_empty(%(v)s->ga.nd, %(v)s->ga.dimensions, %(v)s->ga.typecode,
GA_C_ORDER, %(v)s->context, Py_None); GA_C_ORDER, %(v)s->context, Py_None);
if (%(out)s == NULL) {
%(fail)s;
}
%(v)s->ga.dimensions[0] = tmp; // Don't remove this line %(v)s->ga.dimensions[0] = tmp; // Don't remove this line
} }
...@@ -476,7 +479,7 @@ if (err != GA_NO_ERROR) { ...@@ -476,7 +479,7 @@ if (err != GA_NO_ERROR) {
""" % dict(out=outputs[0], v=inputs[0], idx=inputs[1], fail=sub['fail']) """ % dict(out=outputs[0], v=inputs[0], idx=inputs[1], fail=sub['fail'])
def c_code_cache_version(self): def c_code_cache_version(self):
return (0,) return (1,)
def check_and_convert_boolean_masks(input, idx_list): def check_and_convert_boolean_masks(input, idx_list):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论