提交 3e7dbe34 authored 作者: Frederic's avatar Frederic

Use the good code to check for errors.

上级 b247edbd
...@@ -782,7 +782,7 @@ class GpuContiguous(Op): ...@@ -782,7 +782,7 @@ class GpuContiguous(Op):
return ['<numpy_compat.h>'] return ['<numpy_compat.h>']
def c_code_cache_version(self): def c_code_cache_version(self):
return (2,) return (3,)
def c_code(self, node, name, inp, out, sub): def c_code(self, node, name, inp, out, sub):
input, = inp input, = inp
...@@ -807,8 +807,7 @@ class GpuContiguous(Op): ...@@ -807,8 +807,7 @@ class GpuContiguous(Op):
{ {
%(fail)s; %(fail)s;
} }
}else if(GpuArray_copy(&(%(z)s->ga), &(%(input)s->ga), }else if(pygpu_move(%(z)s, %(input)s) == -1) {
GA_C_ORDER) != GA_NO_ERROR){
%(fail)s; %(fail)s;
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论