提交 4e9c944c authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #1682 from nouiz/fix_crash32bit

Fix compilation crash instroduced in gh-1673 on 32 bit python.
......@@ -1472,11 +1472,19 @@ class MaxAndArgmax(Op):
%(fail)s;
}
}
if(PyArray_TYPE(%(argmax)s) != NPY_INT64){
PyObject * tmp = PyArray_Cast(%(argmax)s, NPY_INT64);
if (NULL == tmp){
%(fail)s;
}
Py_DECREF(%(argmax)s);
%(argmax)s = (PyArrayObject*)tmp;
}
"""
return ret % locals()
def c_code_cache_version(self):
return (1,)
return (2,)
def infer_shape(self, node, shapes):
ishape, axis_shape = shapes
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论