Cupy: `cupy.min` returns wrong result when CUB is enabled

Created on 20 Feb 2020  路  3Comments  路  Source: cupy/cupy

cupy.min returns a wrong value when CUB is enabled for float16 inputs.

Reproducer:

import cupy

print(cupy.array([1, 2, 3], dtype='e').min())
print(cupy.array([1, 2, 3], dtype='e').max())
print(cupy.array([1, 2, 3], dtype='f').min())
print(cupy.array([1, 2, 3], dtype='f').max())

Result:

65500.0
3.0
1.0
3.0

Most helpful comment

All 3 comments

@leofang I made a fix. Thanks for your help!

Thanks, @asi1024 馃檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

upul picture upul  路  3Comments

ax3l picture ax3l  路  3Comments

jakirkham picture jakirkham  路  4Comments

kmaehashi picture kmaehashi  路  3Comments

ma-sadeghi picture ma-sadeghi  路  3Comments