You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 69b5a23
Browse filesBrowse the repository at this point in the historyBrowse files
x86/x86_64: force 64-bit x87 precision in nrm2 and znrm2 kernels
The x86 and x86_64 nrm2.S and znrm2.S kernels accumulate unscaled sums
of squares in x87 registers. Consequently, both kernels require the
64-bit x87 significand precision mode (control word 0x037f) to retain
11 guard bits during double-precision accumulation. On Windows, the
MSVC CRT initializes the x87 control word to 53-bit precision (0x027f)
in processes such as Python and .NET. Under 53-bit x87 precision,
small vector terms underflow relative to running sums and cause
rank-determination failures in LAPACK routines such as DGELSD.
Save the caller x87 control word on entry in the x86 and x86_64 nrm2.S
and znrm2.S kernels, set the precision control bits to 64-bit mode
(0x0300), and restore the saved control word prior to returning. Add
x87 precision-control regression tests for dnrm2 and dznrm2 in utest.
Fixes#6255
0 commit comments