Repository navigation
Commit 293334a
Hash Engram planes on parallel readers when assembling a core
When a core is assembled, `core_engram` resolves each Engram plane's
payload source in turn, and `payload_source` hashes each plane, or
copies and hashes it when it spans several files, with one synchronous
reader. On DeepSeek V4.1 Flash the two weight planes are about 98 GB
each, so "Assemble core payloads" spends most of its time hashing one
plane at a time while one reader at a time cannot keep the NVMe device
busy.
Before this change `core_engram` validated each table and resolved its
planes one after another. Now it first validates every table and lists
its planes (shared weights and scales, or each shard's weights and
scales) with the same checks as before; the new `plane_sources` then
resolves those planes with `payload_source` on up to eight workers,
largest first, stops scheduling at the first error and returns it once
running planes finish. The sources come back in declared order, and the
tables, shards and installed payloads are built from them in the same
order as before, so the published layout does not change.
Measured result, on an earlier base: on a TP3 export on three DGX Spark
GB10 hosts, "Assemble package payloads" (now "Assemble core payloads")
took 169.1 s instead of 262.0 s.
Evidence: helios `cargo test --release --features server,runtime-core
--lib`: 1334 passed, 0 failed, 26 ignored. heliopause `cargo test
--release`: 190 passed, 0 failed, 3 ignored, including
`core_engram_preserves_shared_and_partitioned_plane_layouts`. The new
test `plane_sources_keep_declared_order_and_report_failures` resolves
three planes of different sizes, one of them spanning two source files,
checks that they come back in declared order with the right identities
and sizes, and checks that a plane beyond the payload fails. The
measurement used full exports with the same model and recipe flags, one
per configuration, on builds based on `a161b17f` that also contained
earlier versions of NVIDIA#122, NVIDIA#124 and NVIDIA#125 and the local checkpoint reading
proposed in NVIDIA#126, none of which change this phase in those versions; the
export completed and committed the core, including the data of all three
ranks. This model has four planes, so four readers run at once; the
other two planes are about 3 GB each, so most of the remaining time is
the two weight planes, each still hashed by one reader. The change was
not measured on `bbad44fe`, nor together with the read-ahead digest of
NVIDIA#124 (`50c664a3`), which also shortens this phase.
Design-Signed-Off-By: Claude Opus 5.5; design-review=cfcf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Javier López <59578422+javieratomic@users.noreply.github.com>1 parent bbad44f commit 293334a
1 file changed
Lines changed: 155 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1084 | 1084 | | |
1085 | 1085 | | |
1086 | 1086 | | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1087 | 1147 | | |
1088 | 1148 | | |
1089 | 1149 | | |
| |||
1352 | 1412 | | |
1353 | 1413 | | |
1354 | 1414 | | |
1355 | | - | |
| 1415 | + | |
| 1416 | + | |
1356 | 1417 | | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
| 1418 | + | |
| 1419 | + | |
1360 | 1420 | | |
1361 | 1421 | | |
1362 | 1422 | | |
1363 | 1423 | | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
1369 | 1427 | | |
1370 | 1428 | | |
1371 | 1429 | | |
1372 | 1430 | | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
1376 | 1471 | | |
1377 | 1472 | | |
1378 | 1473 | | |
| |||
1388 | 1483 | | |
1389 | 1484 | | |
1390 | 1485 | | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | 1486 | | |
1397 | | - | |
1398 | 1487 | | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
| 1488 | + | |
| 1489 | + | |
1423 | 1490 | | |
1424 | 1491 | | |
1425 | 1492 | | |
| |||
3833 | 3900 | | |
3834 | 3901 | | |
3835 | 3902 | | |
| 3903 | + | |
| 3904 | + | |
| 3905 | + | |
| 3906 | + | |
| 3907 | + | |
| 3908 | + | |
| 3909 | + | |
| 3910 | + | |
| 3911 | + | |
| 3912 | + | |
| 3913 | + | |
| 3914 | + | |
| 3915 | + | |
| 3916 | + | |
| 3917 | + | |
| 3918 | + | |
| 3919 | + | |
| 3920 | + | |
| 3921 | + | |
| 3922 | + | |
| 3923 | + | |
| 3924 | + | |
| 3925 | + | |
| 3926 | + | |
| 3927 | + | |
| 3928 | + | |
| 3929 | + | |
| 3930 | + | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
| 3938 | + | |
| 3939 | + | |
| 3940 | + | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
3836 | 3949 | | |
3837 | 3950 | | |
3838 | 3951 | | |
| |||
0 commit comments