STRA-338: last limits fixes (3 native-cpu-expert items), baselines tightened

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-11-07 17:34:57 +01:00
co-authored by Claude Sonnet 5.5
parent ed4602a1cd
commit d9264eda11
7 changed files with 16 additions and 107 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
"source": {
"dyn-trait:leleka-backend-api": 1,
"dyn-trait:leleka-cpu-worker": 4,
"dyn-trait:leleka-cuda-driver": 56,
"dyn-trait:leleka-cuda-driver": 52,
"dyn-trait:leleka-deploy": 17,
"dyn-trait:leleka-engine-core": 18,
"dyn-trait:leleka-engine-fake": 1,
@@ -240,12 +240,7 @@ fn combine_legacy(g: &OriginalVerifyGeometry, [parts, w, shared, bo]: [u64; 4])
}
/// ONE `native_moe_combine_multi` launch over all rows of the group.
fn combine_batched(
arena: Arena<'_>,
g: &OriginalVerifyGeometry,
knobs: &MoeKnobs,
rows: Rows,
) -> Result<Vec<Launch>> {
fn combine_batched(arena: Arena<'_>, g: &OriginalVerifyGeometry, knobs: &MoeKnobs, rows: Rows) -> Result<Vec<Launch>> {
let n = rows.len();
let (n_embd, k, tb) = (g.n, g.k, rows.begin);
if n < 2 || !knobs.native_combine {
@@ -1,5 +1,5 @@
//! Moved out of the parent module by STRA-338: impl GateUpFormat, impl DownFormat, impl PreparedJob, impl DirectCpuPool,
//! impl Drop_for_DirectCpuPool, impl CompletedJob.
//! Moved out of the parent module by STRA-338: impl GateUpFormat, impl DownFormat, impl PreparedJob,
//! impl DirectCpuPool, impl Drop_for_DirectCpuPool, impl CompletedJob.
#[allow(unused_imports)]
use super::*;
+2 -1
View File
@@ -26,7 +26,8 @@ pub const RESERVE: usize = 1;
pub struct PoolPlanInput {
/// Logical processors this process may run on.
pub logical: usize,
/// Physical cores this process may use per CPU package, the host thread's package first (its own core is counted); empty = unknown.
/// Physical cores this process may use per CPU package, the host thread's package first (its own core is
/// counted); empty = unknown.
pub cores_per_package: Vec<usize>,
/// CPUs a container quota allows (cgroup `cpu.max`); 0 = no quota.
pub cpu_quota: f64,
+9 -15
View File
@@ -275,22 +275,16 @@ mod tests {
}
}
fn tie_pattern(n: usize, changed: bool) -> Vec<f32> {
let mut x = vec![0.0f32; n];
for (i, value) in x.iter_mut().enumerate() {
*value = match i % 32 {
0 => 127.0,
1 => -127.0,
2 => 0.5,
3 => -0.5,
4 => 1.5,
5 => -1.5,
6 => 0.0,
7 => -0.0,
_ if changed => (i % 61) as f32 - 30.0,
_ => (i % 47) as f32 - 23.0,
};
(0..n).map(|i| tie_value(i, changed)).collect()
}
/// Element `i` of the tie pattern: eight fixed rounding-tie values, then a ramp that depends on `changed`.
fn tie_value(i: usize, changed: bool) -> f32 {
const HEAD: [f32; 8] = [127.0, -127.0, 0.5, -0.5, 1.5, -1.5, 0.0, -0.0];
match HEAD.get(i % 32) {
Some(value) => *value,
None if changed => (i % 61) as f32 - 30.0,
None => (i % 47) as f32 - 23.0,
}
x
}
fn check_q8_one_paths(x: &[f32], actual: &mut ActQ, with_avx512: bool) {
let n = x.len();
+1 -26
View File
@@ -1,29 +1,4 @@
{
"_comment": "Functions that may miss a limit of scripts/check-limits.py because they were moved verbatim from legacy code. Every recorded number may only fall; an entry whose function is back within the limits is stale and must go (scripts/check-limits.py --update-baseline). New entries: --allowlist-add --reason ... --owner ...",
"functions": [
{
"path": "crates/cuda-driver/src/qsa_prompt_attention/impl_qsapromptattention/impl_qsapromptattention_2_2.rs",
"name": "QsaPromptAttention::admit_inputs",
"fn_lines": 21,
"complexity": 11,
"nesting": 1,
"width": 0,
"reason": "moved verbatim by the mechanical splitter from an oversize legacy file (STRA-338 size2 merge); shrinks in the next size round",
"owner": "STRA-338"
},
{
"path": "crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/impl_originalmtpfullowner.rs",
"name": "<file>",
"width": 1,
"reason": "moved verbatim by the mechanical splitter from an oversize legacy file (STRA-338 size2 merge); shrinks in the next size round",
"owner": "STRA-338"
},
{
"path": "crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/impl_originalfirstdraftengine_for_originalservee/impl_originalservesettings.rs",
"name": "<file>",
"width": 8,
"reason": "moved verbatim by the mechanical splitter from an oversize legacy file (STRA-338 size2 merge); shrinks in the next size round",
"owner": "STRA-338"
}
]
"functions": []
}
-56
View File
@@ -8,71 +8,15 @@
},
"census": {
"prod": {
"leleka-backend-api": {
"width": 1
},
"leleka-cuda-driver": {
"width": 516,
"fn_lines": 1,
"complexity": 4
},
"leleka-deploy": {
"width": 33
},
"leleka-engine-qwen35-cuda": {
"width": 427,
"fn_lines": 5,
"complexity": 2
},
"leleka-libc-shim": {
"width": 9
},
"leleka-runtime": {
"width": 2
},
"python": {
"complexity": 1,
"width": 2
}
},
"test": {
"leleka-context": {
"fn_lines": 5,
"complexity": 1
},
"leleka-cuda-driver": {
"fn_lines": 106,
"complexity": 31,
"width": 60,
"nesting": 5
},
"leleka-engine-core": {
"fn_lines": 11,
"width": 2,
"complexity": 3,
"nesting": 1
},
"leleka-engine-qwen35-cuda": {
"fn_lines": 76,
"width": 77,
"complexity": 12,
"nesting": 6
},
"leleka-memory": {
"fn_lines": 5,
"complexity": 1,
"nesting": 1,
"width": 13
},
"leleka-model-format": {
"fn_lines": 69,
"width": 25,
"complexity": 13,
"nesting": 4
},
"leleka-runtime-client": {
"fn_lines": 2
},
"python": {
"width": 1
}