提交 6f1c4d22 authored 作者: Frederic's avatar Frederic

Disable some GpuCAReduce test cases that aren't implemented.

上级 b67bb9e0
......@@ -74,6 +74,23 @@ class test_GpuCAReduceCPY(test_CAReduce):
class test_GpuCAReduce(test_GpuCAReduceCPY):
dtypes = ["float32"]
bin_dtypes = ["uint8", "int8"]
bin_dtypes = []
cases = [((5, 6), None),
((5, 6), (0, 1)),
((5, 6), (0, )),
((5, 6), (1, )),
((5, 6), (-1, )),
((5, 6), (-2, )),
#((5, 6), ()), #reduce on no axis(copy) isn't implemented
#((2, 3, 4, 5), (0, 1, 3)), mask 1101 isn't implemented
#((2, 3, 4, 5), (-2, -3)), mask 0110 isn't implemented
((5, 0), None),
((5, 0), (0, )),
((5, 0), (1, )),
#((5, 0), ()), reduce on no axis isn't implemented
#((), None), reduce on no axis isn't implemented
#((), ()) reduce on no axis isn't implemented
]
op = GpuCAReduce
reds = [scalar.add, scalar.mul]
......
......@@ -284,24 +284,26 @@ class test_Broadcast(unittest.TestCase):
class test_CAReduce(unittest_tools.InferShapeTester):
op = CAReduce
cases = [((5, 6), None),
((5, 6), (0, 1)),
((5, 6), (0, )),
((5, 6), (1, )),
((5, 6), (-1, )),
((5, 6), (-2, )),
((5, 6), ()),
((2, 3, 4, 5), (0, 1, 3)),
((2, 3, 4, 5), (-2, -3)),
((5, 0), None),
((5, 0), (0, )),
((5, 0), (1, )),
((5, 0), ()),
((), None),
((), ())
]
def with_linker(self, linker, scalar_op=scalar.add, dtype="floatX",
test_nan=False, tensor_op=None):
for xsh, tosum in [((5, 6), None),
((5, 6), (0, 1)),
((5, 6), (0, )),
((5, 6), (1, )),
((5, 6), (-1, )),
((5, 6), (-2, )),
((5, 6), ()),
((2, 3, 4, 5), (0, 1, 3)),
((2, 3, 4, 5), (-2, -3)),
((5, 0), None),
((5, 0), (0, )),
((5, 0), (1, )),
((5, 0), ()),
((), None),
((), ())]:
for xsh, tosum in self.cases:
if dtype == "floatX":
dtype = theano.config.floatX
x = TensorType(dtype, [(entry == 1) for entry in xsh])('x')
......@@ -490,22 +492,7 @@ class test_CAReduce(unittest_tools.InferShapeTester):
def test_infer_shape(self, dtype=None):
if dtype is None:
dtype = theano.config.floatX
for xsh, tosum in [((5, 6), None),
((5, 6), (0, 1)),
((5, 6), (0, )),
((5, 6), (1, )),
((5, 6), (-1, )),
((5, 6), (-2, )),
((2, 3, 4, 5), (0, 1, 3)),
((2, 3, 4, 5), (-2, -3)),
((5, 0), None),
((5, 0), (0, )),
((5, 0), (1, )),
((5, 6), ()),
((5, 0), ()),
((), None),
((), ())
]:
for xsh, tosum in self.cases:
x = TensorType(dtype, [(entry == 1) for entry in xsh])('x')
if tosum is None:
tosum = range(len(xsh))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论