提交 e0a6e3f9 authored 作者: Alexander Matyasko's avatar Alexander Matyasko

Fix strings and test for node.op.complete

上级 6e9eb1f9
...@@ -65,12 +65,12 @@ int APPLY_SPECIFIC(magma_eigh)(PyGpuArrayObject *A_, ...@@ -65,12 +65,12 @@ int APPLY_SPECIFIC(magma_eigh)(PyGpuArrayObject *A_,
if (MAGMA_SUCCESS != magma_smalloc_pinned(&w_data, N)) { if (MAGMA_SUCCESS != magma_smalloc_pinned(&w_data, N)) {
PyErr_SetString(PyExc_RuntimeError, PyErr_SetString(PyExc_RuntimeError,
"GpuMagmaSVD: failed to allocate working memory"); "GpuMagmaEigh: failed to allocate working memory");
goto fail; goto fail;
} }
if (MAGMA_SUCCESS != magma_smalloc_pinned(&wA_data, N * N)) { if (MAGMA_SUCCESS != magma_smalloc_pinned(&wA_data, N * N)) {
PyErr_SetString(PyExc_RuntimeError, PyErr_SetString(PyExc_RuntimeError,
"GpuMagmaSVD: failed to allocate working memory"); "GpuMagmaEigh: failed to allocate working memory");
goto fail; goto fail;
} }
......
...@@ -379,7 +379,7 @@ class TestMagma(unittest.TestCase): ...@@ -379,7 +379,7 @@ class TestMagma(unittest.TestCase):
A = theano.tensor.fmatrix("A") A = theano.tensor.fmatrix("A")
fn = theano.function([A], qr(A), mode=mode_with_gpu) fn = theano.function([A], qr(A), mode=mode_with_gpu)
assert any([ assert any([
isinstance(node.op, GpuMagmaQR) isinstance(node.op, GpuMagmaQR) and node.op.complete
for node in fn.maker.fgraph.toposort() for node in fn.maker.fgraph.toposort()
]) ])
...@@ -387,7 +387,7 @@ class TestMagma(unittest.TestCase): ...@@ -387,7 +387,7 @@ class TestMagma(unittest.TestCase):
A = theano.tensor.fmatrix("A") A = theano.tensor.fmatrix("A")
fn = theano.function([A], qr(A, mode='r'), mode=mode_with_gpu) fn = theano.function([A], qr(A, mode='r'), mode=mode_with_gpu)
assert any([ assert any([
isinstance(node.op, GpuMagmaQR) isinstance(node.op, GpuMagmaQR) and not node.op.complete
for node in fn.maker.fgraph.toposort() for node in fn.maker.fgraph.toposort()
]) ])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论