提交 cb90a290 authored 作者: Frederic's avatar Frederic

Small changes to gpu reduce tests.

上级 36f16200
...@@ -48,6 +48,8 @@ class test_GpuCAReduceCPY(test_CAReduce): ...@@ -48,6 +48,8 @@ class test_GpuCAReduceCPY(test_CAReduce):
def test_perform_nan(self): def test_perform_nan(self):
for dtype in self.dtypes: for dtype in self.dtypes:
if not dtype.startswith('float'):
continue
for op in self.reds: for op in self.reds:
self.with_linker(gof.PerformLinker(), op, dtype=dtype, self.with_linker(gof.PerformLinker(), op, dtype=dtype,
test_nan=True) test_nan=True)
...@@ -59,6 +61,8 @@ class test_GpuCAReduceCPY(test_CAReduce): ...@@ -59,6 +61,8 @@ class test_GpuCAReduceCPY(test_CAReduce):
def test_c_nan(self): def test_c_nan(self):
for dtype in self.dtypes: for dtype in self.dtypes:
if not dtype.startswith('float'):
continue
for op in self.reds: for op in self.reds:
self.with_linker(gof.CLinker(), op, dtype=dtype, self.with_linker(gof.CLinker(), op, dtype=dtype,
test_nan=True) test_nan=True)
...@@ -70,7 +74,6 @@ class test_GpuCAReduceCPY(test_CAReduce): ...@@ -70,7 +74,6 @@ class test_GpuCAReduceCPY(test_CAReduce):
class test_GpuCAReduceCuda(test_GpuCAReduceCPY): class test_GpuCAReduceCuda(test_GpuCAReduceCPY):
dtypes = ["float32", "int64"] dtypes = ["float32", "int64"]
dtypes = []
bin_dtypes = ["uint8", "int8"] bin_dtypes = ["uint8", "int8"]
cases = [((5, 6), None), cases = [((5, 6), None),
...@@ -131,7 +134,7 @@ class test_GpuCAReduceCuda(test_GpuCAReduceCPY): ...@@ -131,7 +134,7 @@ class test_GpuCAReduceCuda(test_GpuCAReduceCPY):
((4100,4,3,2),[0,2,3]),((4,4100,3,2),[0,2,3]),((4,3,4100,2),[0,2,3]),#((4,3,2,4100),[0,2,3]),#1011 ((4100,4,3,2),[0,2,3]),((4,4100,3,2),[0,2,3]),((4,3,4100,2),[0,2,3]),#((4,3,2,4100),[0,2,3]),#1011
((4100,4,3,2),[1,2,3]),((4,4100,3,2),[1,2,3]),((4,3,4100,2),[1,2,3]),((4,3,2,4100),[1,2,3]),#0111 ((4100,4,3,2),[1,2,3]),((4,4100,3,2),[1,2,3]),((4,3,4100,2),[1,2,3]),((4,3,2,4100),[1,2,3]),#0111
((65,4,3,2),[1,2,3]),((4,65,3,2),[1,2,3]),((4,3,65,2),[1,2,3]),((4,3,2,65),[1,2,3]),#0111 ((65,4,3,2),[1,2,3]),((4,65,3,2),[1,2,3]),((4,3,65,2),[1,2,3]),((4,3,2,65),[1,2,3]),#0111
((4100,2,3,4),[0,1,2,3]),((2,4100,3,4),[0,1,2,3]),((2,3,4100,4),[0,1,2,3]),((2,3,4,4100),[0,1,2,3]),((128,1,3,3), [0,1,2,3]),#1111 ((4100,2,3,4),[0,1,2,3]),((2,4100,3,4),[0,1,2,3]),((2,3,4100,4),[0,1,2,3]),((2,3,4,4100),[0,1,2,3]),((128,1,2,3), [0,1,2,3]),#1111
#test pattern implemented by reshape #test pattern implemented by reshape
#Skip them as this test the op directly, not the optimization with reshape #Skip them as this test the op directly, not the optimization with reshape
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论