!13651 remove zero or negative check in rsqrt_fp16 op

From: @hangangqiang
Reviewed-by: @zhang_xue_tong,@zhanghaibo5
Signed-off-by: @zhang_xue_tong
This commit is contained in:
mindspore-ci-bot 2021-03-22 09:30:58 +08:00 committed by Gitee
commit dc54222e78
1 changed files with 0 additions and 3 deletions

View File

@ -59,9 +59,6 @@ int ElementSqrtFp16(float16_t *input, float16_t *output, int element_size) {
int ElementRsqrtFp16(float16_t *input, float16_t *output, int element_size) {
for (int i = 0; i < element_size; i++) {
if (input[i] <= 0) {
return NNACL_ERRCODE_RSQRT_NEGATIVE_OR_ZERO;
}
output[i] = 1.f / sqrtf(input[i]);
}
return NNACL_OK;