Skip to content

Commit 612ae2f

Browse files
committed
Add a test for float16 data.
1 parent 6572d18 commit 612ae2f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

pygpu/tests/test_reduction.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import numpy
22

3+
from nose.tools import assert_raises
4+
35
from pygpu import gpuarray, ndgpuarray as elemary
46
from pygpu.reduction import ReductionKernel
57

@@ -130,3 +132,9 @@ def test_reduction_0d():
130132
rg = g.all()
131133

132134
assert numpy.all(rc == numpy.asarray(rg))
135+
136+
137+
def test_reduction_f16():
138+
c, g = gen_gpuarray((3,), dtype='float16', ctx=context, cls=elemary)
139+
140+
assert_raises(NotImplementedError, g.sum)

0 commit comments

Comments
 (0)