From 2b511990546e476c3a4084c71f759f5c5f6f9cbd Mon Sep 17 00:00:00 2001 From: VectorSL Date: Mon, 18 May 2020 17:22:47 +0800 Subject: [PATCH] gpu floatstatus add type check --- mindspore/ops/operations/math_ops.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mindspore/ops/operations/math_ops.py b/mindspore/ops/operations/math_ops.py index fc92bfc8fb..34547fd755 100644 --- a/mindspore/ops/operations/math_ops.py +++ b/mindspore/ops/operations/math_ops.py @@ -1712,6 +1712,7 @@ class FloatStatus(PrimitiveWithInfer): return [1] def infer_dtype(self, x_dtype): + validator.check_tensor_type_same({'x': x_dtype}, [mstype.float32, mstype.float16], self.name) return x_dtype class NPUAllocFloatStatus(PrimitiveWithInfer):