Repository navigation
Commit 2b64bf1
committed
review: hoist the ld bound out of the segment loops; build the blas unit test
tests/math_blas.cpp is tracked but was never listed in ta_test_src_files, so
nothing in it has ever been compiled -- including the measured_ld_fits case
added for this guard. Registering it next to linalg.cpp brings the whole
blas_suite (17 cases) into the run; it passes as it stands.
ld_fits() divides, and the two ce+ce walkers called it twice per admitted
cell in the innermost segment-growth loop, whose other work is a handful of
loads and compares. The strides and extents are fixed for a segment once
off == 1, so take the bound once there instead: max_ld_offset(ld, extent) is
the same inequality solved for the slab offset, and admission then costs a
compare. The long arena-contiguous segments this kernel exists to hit --
g_seg_len9p_ce_ce -- were paying two divisions per cell for a check that can
never fire on them. ld_fits() is now expressed through max_ld_offset(), so
the two cannot drift apart; measure_segments takes the same hoist, since it
exists to simulate the walker's segmentation exactly.
Also, per review:
- spell math::blas::ld_fits at the call sites rather than pulling it into
TiledArray::detail with a using-declaration: arena_einsum.h is widely
included, and the name is of no interest to anything else in detail. The
rationale it carried becomes a section comment.
- ce_e_stride_past_blas_int_falls_back returned before any assertion on both
its skip paths (ILP64, refused reservation), so on those configurations it
passed while checking nothing and only Boost's easily-missed "did not check
any assertions" note said so. It now asserts that an ordinary contiguous
2-cell run is still accepted before either branch, and the ILP64 skip
explains itself like the reservation one already did.
- the reservation and the two placement-new'd cells get one RAII owner: a
failing BOOST_REQUIRE skipped ~Cell(), leaking each cell's TA::Range
buffer, which under this repo's ASan debug build would bury the real
failure in leak reports.
- drop two lambda captures of constants (`len`, `K`) that -Wall reports as
unnecessary. CI runs TA_WERROR=ON without -Wall so they did not gate it,
but cmake/toolchains/travis.cmake does add -Wall, and that combination
makes them errors.1 parent ec3227d commit 2b64bf1
4 files changed
Lines changed: 97 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
64 | 77 | | |
65 | 78 | | |
66 | 79 | | |
67 | 80 | | |
68 | 81 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 82 | + | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
76 | | - | |
| 87 | + | |
77 | 88 | | |
78 | 89 | | |
79 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
| |||
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
337 | | - | |
| 344 | + | |
338 | 345 | | |
339 | 346 | | |
340 | 347 | | |
| |||
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
378 | | - | |
| 385 | + | |
379 | 386 | | |
380 | 387 | | |
381 | 388 | | |
| |||
513 | 520 | | |
514 | 521 | | |
515 | 522 | | |
| 523 | + | |
516 | 524 | | |
517 | 525 | | |
518 | 526 | | |
| |||
527 | 535 | | |
528 | 536 | | |
529 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
530 | 543 | | |
531 | 544 | | |
532 | 545 | | |
533 | | - | |
534 | | - | |
535 | | - | |
| 546 | + | |
536 | 547 | | |
537 | 548 | | |
538 | 549 | | |
| |||
1293 | 1304 | | |
1294 | 1305 | | |
1295 | 1306 | | |
1296 | | - | |
1297 | | - | |
| 1307 | + | |
| 1308 | + | |
1298 | 1309 | | |
1299 | 1310 | | |
1300 | 1311 | | |
| |||
1583 | 1594 | | |
1584 | 1595 | | |
1585 | 1596 | | |
| 1597 | + | |
1586 | 1598 | | |
1587 | 1599 | | |
1588 | 1600 | | |
| |||
1597 | 1609 | | |
1598 | 1610 | | |
1599 | 1611 | | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
1600 | 1618 | | |
1601 | 1619 | | |
1602 | 1620 | | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
| 1621 | + | |
1607 | 1622 | | |
1608 | 1623 | | |
1609 | 1624 | | |
| |||
1830 | 1845 | | |
1831 | 1846 | | |
1832 | 1847 | | |
| 1848 | + | |
1833 | 1849 | | |
1834 | 1850 | | |
1835 | 1851 | | |
| |||
1844 | 1860 | | |
1845 | 1861 | | |
1846 | 1862 | | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
1847 | 1869 | | |
1848 | 1870 | | |
1849 | 1871 | | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
| 1872 | + | |
1854 | 1873 | | |
1855 | 1874 | | |
1856 | 1875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
395 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
396 | 405 | | |
397 | 406 | | |
398 | 407 | | |
| |||
403 | 412 | | |
404 | 413 | | |
405 | 414 | | |
406 | | - | |
407 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
408 | 431 | | |
409 | 432 | | |
410 | 433 | | |
411 | | - | |
412 | | - | |
413 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
414 | 437 | | |
415 | 438 | | |
416 | 439 | | |
| |||
423 | 446 | | |
424 | 447 | | |
425 | 448 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
429 | 452 | | |
430 | 453 | | |
431 | 454 | | |
| |||
438 | 461 | | |
439 | 462 | | |
440 | 463 | | |
441 | | - | |
442 | | - | |
443 | | - | |
| 464 | + | |
444 | 465 | | |
445 | 466 | | |
446 | 467 | | |
| |||
0 commit comments