cuda-driver: the expert tier probe names what it takes from its parent instead of use super::* (STRA-338)
The probe module is compiled under cfg(any(test, feature = "expert-tier-probe")), so it is production code of that feature and the glob import counts for the gate. The 16 names it uses are listed; cargo check --all-targets with features cuda-driver,expert-tier-probe and with cuda-driver alone gives no new warning.
This commit is contained in:
@@ -16,9 +16,15 @@ use super::kernels::ArenaMap;
|
||||
use super::moe::{self, MoeKnobs, OriginalVerifyExpertFormats};
|
||||
use super::window_plan::PlanLayout;
|
||||
use super::window_record::{ExpertTier, Rows};
|
||||
use super::*;
|
||||
use super::{
|
||||
Arg, Command, Context, Error, MappedAllocation, MappedRouteOperands, OriginalVerifyBank, OriginalVerifyCpuRows,
|
||||
OriginalVerifyCpuSink, OriginalVerifyGeometry, Physical, Result, RouteRowSpan, combine, command, handle, kernels,
|
||||
};
|
||||
use crate::{OriginalGpuStream, OriginalStreamKind};
|
||||
|
||||
mod probe_geometry;
|
||||
pub use probe_geometry::expert_probe_geometry;
|
||||
|
||||
struct ProbeArena<'p, 'ctx>(&'p Physical<'ctx>);
|
||||
impl ArenaMap for ProbeArena<'_, '_> {
|
||||
fn span(&self, name: &str, offset: usize, bytes: usize) -> Result<u64> {
|
||||
@@ -34,32 +40,6 @@ pub struct OriginalExpertTierProbe<'ctx> {
|
||||
formats: OriginalVerifyExpertFormats,
|
||||
}
|
||||
|
||||
/// The probe geometry: the model's MoE shape with a small context and vocabulary (no head runs here).
|
||||
pub fn expert_probe_geometry(max_t: usize, max_expert_blob: usize) -> OriginalVerifyGeometry {
|
||||
OriginalVerifyGeometry {
|
||||
max_t,
|
||||
n: 2560,
|
||||
hc: 4,
|
||||
lr: 320,
|
||||
ff: 640,
|
||||
experts: 512,
|
||||
k: 10,
|
||||
channels: 10240,
|
||||
value_heads: 48,
|
||||
key_heads: 16,
|
||||
heads: 24,
|
||||
kv_heads: 2,
|
||||
head_dim: 256,
|
||||
index_heads: 4,
|
||||
index_dim: 128,
|
||||
index_block: 4,
|
||||
selection: 2051,
|
||||
max_cells: 256,
|
||||
vocabulary: 1024,
|
||||
max_expert_blob,
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ctx> Context<'ctx> {
|
||||
pub fn original_expert_tier_probe(
|
||||
&'ctx self,
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
//! The geometry of the expert tier probe: the shape the probe's verifier bank is sized for.
|
||||
use crate::original_verify::OriginalVerifyGeometry;
|
||||
|
||||
/// The probe geometry: the model's MoE shape with a small context and vocabulary (no head runs here).
|
||||
pub fn expert_probe_geometry(max_t: usize, max_expert_blob: usize) -> OriginalVerifyGeometry {
|
||||
OriginalVerifyGeometry {
|
||||
max_t,
|
||||
n: 2560,
|
||||
hc: 4,
|
||||
lr: 320,
|
||||
ff: 640,
|
||||
experts: 512,
|
||||
k: 10,
|
||||
channels: 10240,
|
||||
value_heads: 48,
|
||||
key_heads: 16,
|
||||
heads: 24,
|
||||
kv_heads: 2,
|
||||
head_dim: 256,
|
||||
index_heads: 4,
|
||||
index_dim: 128,
|
||||
index_block: 4,
|
||||
selection: 2051,
|
||||
max_cells: 256,
|
||||
vocabulary: 1024,
|
||||
max_expert_blob,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user