layer split auto (CUDA): a stage's link scales its miss cost only against the fastest stage's link and from a 4x gap on (#2007)
0.1.41 (0391e478) scaled each stage's miss term by 20 GB/s / its probed link, for 2x 4090 D
with CUDA1 on a physical x1 link (1.6 GB/s: x12, K 22 -> 38, prompt ~350 -> ~1400 tok/s).
On 2x Tesla T10 the same rule moved auto from K=23 to K=14: CUDA1 runs 34 of 48 layers, and as
the prompt path is a pipeline the slower stage sets the rate - 256K prompt 1035 -> 795 tok/s,
decode 46.8 -> 39.5; --layer-split 23 on 0.1.43 restores both (xiake-1 in #2007).
split_rules::link_miss_scale: the scale is the fastest stage's link over this stage's, applied
only from a 4x gap (a riser or chipset x1/x4 slot beside an x16 one), capped at 64. A symmetric
rig keeps the fitted formula whatever its link speed; the x1 case still gets ~x15.
STRATA_SPLIT_LINK_ABS=1 restores the 0.1.41 rule. SYCL has no link term (unchanged).
Test: split_rules_test (the x1 case, equal gen3 cards, a 2x gap, caps, unprobed stages).
Not run on the reporter's T10s: the reply asks for the 'link ... -> miss cost' lines.
This commit is contained in:
1 parent
640ac438be
commit
9d41e18bd9
3 files changed
+50
-6
No files matched your search
@@ -75,6 +75,22 @@ int main() {
|
||||
CHECK(pick_with_headroom(same, 0.0) == 0);
|
||||
CHECK(pick_with_headroom({}, 0.1) == 0);
|
||||
}
|
||||
// #2007: the miss scale per link
|
||||
{
|
||||
// the case 0.1.41's scale was made for: CUDA1 on a physical x1 link beside an x16 one
|
||||
const std::vector<double> x1 = link_miss_scale({24.0, 1.6});
|
||||
CHECK(x1[0] == 1.0 && x1[1] > 14.9 && x1[1] < 15.1);
|
||||
// two equal cards on gen3 x16 (2x Tesla T10, P100s): the fitted formula, whatever the link speed
|
||||
const std::vector<double> eq = link_miss_scale({12.0, 12.0});
|
||||
CHECK(eq[0] == 1.0 && eq[1] == 1.0);
|
||||
// a moderate gap (x8 beside x16, or the probe's noise): no scale
|
||||
const std::vector<double> mod = link_miss_scale({11.4, 5.9});
|
||||
CHECK(mod[0] == 1.0 && mod[1] == 1.0);
|
||||
// a 4x gap and more scales by the ratio, capped at 64; unprobed stages stay 1
|
||||
const std::vector<double> big = link_miss_scale({26.0, 6.0, 0.2, -1.0});
|
||||
CHECK(big[0] == 1.0 && big[1] > 4.3 && big[1] < 4.4 && big[2] == 64.0 && big[3] == 1.0);
|
||||
CHECK(link_miss_scale({-1.0, -1.0})[1] == 1.0);
|
||||
}
|
||||
if (failed == 0) std::printf("split_rules_test: ok\n");
|
||||
return failed ? 1 : 0;
|
||||
}
|
||||
Reference in new issue
Block a user