Commit ee2999b
committed
[PART OF] Add large page support for NNUE weights and simplify TT mem management
Use TT memory functions to allocate memory for the NNUE weights. This
should provide a small speed-up on systems where large pages are not
automatically used, including Windows and some Linux distributions.
Further, since we now have a wrapper for std::aligned_alloc(), we can
simplify the TT memory management a bit:
- We no longer need to store separate pointers to the hash table and
its underlying memory allocation.
- We also get to merge the Linux-specific and default implementations
of aligned_ttmem_alloc().
Finally, we'll enable the VirtualAlloc code path with large page
support also for Win32.
STC: https://tests.stockfishchess.org/tests/view/5f66595823a84a47b9036fba
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 14896 W: 1854 L: 1686 D: 11356
Ptnml(0-2): 65, 1224, 4742, 1312, 105
closes official-stockfish#3081
No functional change.1 parent 6156cfe commit ee2999b
4 files changed
+32
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
364 | | - | |
| 362 | + | |
365 | 363 | | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
| 364 | + | |
379 | 365 | | |
380 | | - | |
381 | | - | |
382 | | - | |
| 366 | + | |
383 | 367 | | |
384 | 368 | | |
385 | 369 | | |
| |||
424 | 408 | | |
425 | 409 | | |
426 | 410 | | |
427 | | - | |
| 411 | + | |
428 | 412 | | |
429 | 413 | | |
| 414 | + | |
430 | 415 | | |
431 | 416 | | |
432 | | - | |
| 417 | + | |
433 | 418 | | |
434 | 419 | | |
435 | 420 | | |
| |||
451 | 436 | | |
452 | 437 | | |
453 | 438 | | |
454 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
455 | 446 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
461 | 454 | | |
462 | 455 | | |
463 | 456 | | |
464 | 457 | | |
465 | 458 | | |
466 | | - | |
| 459 | + | |
467 | 460 | | |
468 | | - | |
| 461 | + | |
469 | 462 | | |
470 | | - | |
| 463 | + | |
471 | 464 | | |
472 | 465 | | |
473 | 466 | | |
| |||
480 | 473 | | |
481 | 474 | | |
482 | 475 | | |
483 | | - | |
484 | | - | |
| 476 | + | |
| 477 | + | |
485 | 478 | | |
486 | 479 | | |
487 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
0 commit comments