Skip to content

Commit bf8998a

Browse files
authored
Merge pull request #3675 from martin-frbg/issue3654
workaround ThunderX2 DNRM2 fault with ssq=inf,scale=0
2 parents 3df3d62 + 9e29598 commit bf8998a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/arm64/dznrm2_thunderx2t99.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
404404
#else
405405
nrm2_compute(n, x, inc_x, &ssq, &scale);
406406
#endif
407+
if (fabs(scale) <1.e-300) return 0.;
407408
ssq = sqrt(ssq) * scale;
408409

409410
return ssq;

0 commit comments

Comments
 (0)