Commit 4e85157
peng.li24
fix(ci): align test_domain_log_neg + einsum vs-matmul tests for all runners
Three remaining failures after previous CI attempts:
test_domain_log_neg:
NaN bit-pattern for log(negative) is platform/version-dependent:
- scalar npy_log path returns 0xfff8... (negative qNaN)
- numpy 1.26.x scalar ufunc returns 0x7ff8... (positive qNaN)
- SVML path (__svml_log8) returns yet another pattern
No single canonical bit-pattern works across all runners.
Fix: replace bit-exact comparison with isnan-equality check —
the real contract is 'domain error produces NaN', not specific bits.
test_vs_matmul / test_vs_batch_matmul:
np.einsum('ij,jk->ik') uses numpy's SSE forward mul+add kernel;
numpy.matmul / a @ b uses BLAS (cblas_sgemm64_). They differ at
machine epsilon. Our einsum matches np.einsum (test_random passes).
Fix: compare cpp.einsum against np.einsum, not against a @ b.1 parent 5dbf32b commit 4e85157
2 files changed
Lines changed: 14 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
| 291 | + | |
309 | 292 | | |
310 | 293 | | |
311 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
1374 | | - | |
| 1374 | + | |
1375 | 1375 | | |
1376 | | - | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1377 | 1380 | | |
1378 | 1381 | | |
1379 | 1382 | | |
1380 | | - | |
1381 | | - | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
1382 | 1388 | | |
1383 | | - | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1384 | 1392 | | |
1385 | 1393 | | |
1386 | 1394 | | |
| |||
0 commit comments