提交 45662adf authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Avoid overflow when testing prod() in float16

上级 c4b2cffc
......@@ -870,6 +870,10 @@ class T_reduce_dtype(unittest.TestCase):
(topo, output_dtype)
data = numpy.random.rand(3, 4) * 10
data = data.astype(input_dtype)
if output_dtype == 'float16' and method == 'prod':
# We will likely get something infinite,
# and DebugMode will complain.
data = data[0:1]
f(data)
if "complex" in input_dtype:
continue
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论