From 04287257f2ccaf18144d5d69d6f63bc5fde9afe3 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Sun, 8 Nov 2026 14:34:16 +0100 Subject: [PATCH] Speed program: split the profile kernel test under the 30-line limit; limits baseline lowered Co-Authored-By: Claude Sonnet 5.5 --- .../src/profile/tests/builtin_profiles.rs | 30 ++++++++++++------- limits-baseline.json | 6 +--- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/crates/deploy/src/profile/tests/builtin_profiles.rs b/crates/deploy/src/profile/tests/builtin_profiles.rs index c8ceef44..91ca51e3 100644 --- a/crates/deploy/src/profile/tests/builtin_profiles.rs +++ b/crates/deploy/src/profile/tests/builtin_profiles.rs @@ -163,17 +163,6 @@ fn only_the_server_profile_enables_the_mtp_draft_attention_switch() { .engine_env .contains_key("LELEKA_SM120_ATTN_DAILY_MTP") ); - // lever 1 of the speed program: the main attention and the gate/up SwiGLU kernels of the same card, bitwise - // identical on the teacher-forced gate (docs/experiments/codex-compare-speed-gap.md), decode +1.85 % paired - for name in ["rtx5090-32g", "rtx5090-32g-file", "rtx5090-32g-gguf-ple"] { - let profile = Profile::builtin(name).unwrap(); - for key in ["LELEKA_SM120_ATTN_DAILY", "LELEKA_SM120_GU_SWIGLU"] { - assert_eq!(profile.engine_env.get(key).map(String::as_str), Some("1"), "{name} {key}"); - } - } - for key in ["LELEKA_SM120_ATTN_DAILY", "LELEKA_SM120_GU_SWIGLU"] { - assert!(!laptop.engine_env.contains_key(key), "{key}"); - } // the key space of engine_env still refuses everything else let mut bad = server.clone(); bad.engine_env.insert("LELEKA_SM86_X".into(), "1".into()); @@ -184,6 +173,25 @@ fn only_the_server_profile_enables_the_mtp_draft_attention_switch() { ok.validate().unwrap(); } +#[test] +fn only_the_5090_profiles_enable_the_sm120_main_attention_and_swiglu_kernels() { + // lever 1 of the speed program: the main attention and the gate/up SwiGLU kernels of the same card, bitwise + // identical on the teacher-forced gate (docs/experiments/codex-compare-speed-gap.md), decode +1.85 % paired + let laptop = Profile::builtin("rtx3080-16g").unwrap(); + for name in ["rtx5090-32g", "rtx5090-32g-file", "rtx5090-32g-gguf-ple"] { + let profile = Profile::builtin(name).unwrap(); + for key in SM120_MAIN_KERNEL_KEYS { + assert_eq!(profile.engine_env.get(key).map(String::as_str), Some("1"), "{name} {key}"); + } + } + for key in SM120_MAIN_KERNEL_KEYS { + assert!(!laptop.engine_env.contains_key(key), "{key}"); + } +} + +/// Engine switches of the compute capability 12 kernels that replace the main attention and the gate/up SwiGLU. +const SM120_MAIN_KERNEL_KEYS: [&str; 2] = ["LELEKA_SM120_ATTN_DAILY", "LELEKA_SM120_GU_SWIGLU"]; + #[test] fn validation_rejects_unsafe_values() { let mut profile = Profile::builtin("rtx5090-32g").unwrap(); diff --git a/limits-baseline.json b/limits-baseline.json index 0cb97155..8465c9ff 100644 --- a/limits-baseline.json +++ b/limits-baseline.json @@ -13,10 +13,6 @@ "params": 1 } }, - "test": { - "leleka-deploy": { - "fn_lines": 1 - } - } + "test": {} } }