PyErr_Format(PyExc_ValueError, "GpuElemwise. Input dimension mis-match.[%%i] == %%i, where output has size %%i",
PyErr_Format(PyExc_ValueError, "GpuElemwise. Input dimension mis-match. One of your inputs has shape[%%i] == %%i, but the output's size on that axis is %%i.",
i,
CudaNdarray_HOST_DIMS(%(iname)s)[i],
dims[i]
...
...
@@ -890,7 +890,7 @@ nd_collapse_[i]=0;
{
%(oname)s = (CudaNdarray*)CudaNdarray_new_null();
if (!%(oname)s)
{
{
//error string already set
%(fail)s;
}
...
...
@@ -923,9 +923,9 @@ nd_collapse_[i]=0;
//std::cerr << "ELEMWISE NEW %(oname)s nd" << %(oname)s->nd << "\\n";
//std::cerr << "ELEMWISE NEW %(oname)s data" << %(oname)s->devdata << "\\n";
"""%locals()
print>>sio,"""
{
{
//new block so that failure gotos don't skip over variable initialization