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
TEST 30/35 rot:srot_inc_0 [OK]
TEST 31/35 rot:csrot_inc_0 [OK]
TEST 32/35 dnrm2:dnrm2_inf [OK]
TEST 33/35 dnrm2:dnrm2_tiny [FAIL]
ERR: test_dnrm2.c:65 expected 0.000e+00, got inf (diff -inf, tol 1.000e-13)
TEST 34/35 fork:safety [OK]
TEST 35/35 fork:safety_after_fork_in_parent [OK]
RESULTS: 35 tests (34 ok, 1 failed, 0 skipped) ran in 223 ms
Utest dnrm2_tiny failed on Loongson-3A4000
TEST 30/35 rot:zdrot_inc_0 [OK]
TEST 31/35 rot:drot_inc_0 [OK]
TEST 32/35 dnrm2:dnrm2_tiny [FAIL]
ERR: test_dnrm2.c:65 expected 0.000e+00, got inf (diff -inf, tol 1.000e-13)
TEST 33/35 dnrm2:dnrm2_inf [OK]
TEST 34/35 fork:safety [OK]
TEST 35/35 fork:safety_after_fork_in_parent [OK]
RESULTS: 35 tests (34 ok, 1 failed, 0 skipped) ran in 583 ms
Loongson-3A4000 DNRM2 kernel: kernel/mips64/dnrm2.S,the following code causes the test to fail:
div.d ALPHA, ALPHA, s1
MOV max, s1
s1 is the maximum value of the input vector, the initial value of ALPHA is 1.
In the test case of dnrm2_tiny, s1=7.457008414e-310, ALPHA=1/s1 is inf, test fail.
Loongson-3A5000 which using DNRM2 kernel: kernel/loongarch64/dnrm2.S has the similar problem.
Similar code has found in the power DNRM2 kernel, perhaps other platforms will have similar problem.
Interesting, thanks. So MIPS64 dnrm2.S has (effectively) the same problem as ARM64 thunderx2 kernel (used for several recent cpus) in #3654 POWER appears to be unaffected (EDIT: but all recent ppc use the generic C dnrm2, older ppc440/G4 not tested), but we do not have MIPS in CI and I did not remember to try it on gccfarm.
My "solution" for the thunderx2 kernel is just a very ugly hack, simply forcing that zero times infinity still has to be zero. Not sure if something like that would work in the final "MUL s1, max, s1" here, or if both s1 and max have gone to Inf at that point ?
My "solution" for the thunderx2 kernel is just a very ugly hack, simply forcing that zero times infinity still has to be zero. Not sure if something like that would work in the final "MUL s1, max, s1" here, or if both s1 and max have gone to Inf at that point ?
Before MUL s1, max, s1, s1 is Inf, max is 7.457008414e-310.
Activity
martin-frbg commentedon Jul 6, 2022
Interesting, thanks. So MIPS64 dnrm2.S has (effectively) the same problem as ARM64 thunderx2 kernel (used for several recent cpus) in #3654 POWER appears to be unaffected (EDIT: but all recent ppc use the generic C dnrm2, older ppc440/G4 not tested), but we do not have MIPS in CI and I did not remember to try it on gccfarm.
martin-frbg commentedon Jul 6, 2022
My "solution" for the thunderx2 kernel is just a very ugly hack, simply forcing that zero times infinity still has to be zero. Not sure if something like that would work in the final "MUL s1, max, s1" here, or if both s1 and max have gone to Inf at that point ?
XiWeiGu commentedon Jul 6, 2022
Before
MUL s1, max, s1,s1is Inf,maxis7.457008414e-310.sharkcz commentedon Jul 18, 2022
Seems ppc64 (POWER6 kernel) also suffers from the same issue with
dnrm2_tinytest failingmartin-frbg commentedon Jul 18, 2022
Yes, and SPARC does it too - (not) funny how these things crop up after decades.
sharkcz commentedon Jul 25, 2022
All is green in our CI, thanks.