Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a4f3919
gpu: size mixed expert scratch from selected resident forms
Burntgogi Oct 24, 2026
a6beeac
placement: test overflow refusal without pinning panic wording
Burntgogi Oct 24, 2026
2824f4f
gpu: preserve fixed reserves for host-only node projections
Burntgogi Oct 24, 2026
b3a2380
gpu: remove redundant wrapper test allocation and borrow
Burntgogi Oct 24, 2026
e683887
Merge upstream main into mixed expert scratch contribution
Burntgogi Oct 26, 2026
a0e1e90
Reconcile selected scratch test contracts and format migrated callers
Burntgogi Oct 26, 2026
efe6c7b
Complete the mixed fixture description and remove superseded reserve …
Burntgogi Oct 26, 2026
3071a9f
Drop imports made obsolete by selected reserve regression cutover
Burntgogi Oct 26, 2026
c26025b
Select actual Q8Act tier scratch also for empty tiers
Burntgogi Oct 26, 2026
4d841c9
Record repaired empty-tier consumer hardware proof
Burntgogi Oct 26, 2026
76f4b12
Unify selected tier accounting and checked reserve contracts
Burntgogi Oct 26, 2026
5bee298
Bound Solar reserve regression from a host-only reference plan
Burntgogi Oct 26, 2026
a3206fe
Use one resident sequence for the Solar reference budget
Burntgogi Oct 26, 2026
6ecd144
Exclude reusable granule padding from the no-expert-room boundary
Burntgogi Oct 26, 2026
f3b2a21
Use the nonzero byte-granule constant in the reserve fixture
Burntgogi Oct 26, 2026
7e37ef9
Document the exact-granule reserve boundary
Burntgogi Oct 26, 2026
cf035b8
Document exact-source mixed-tier review consumers
Burntgogi Oct 27, 2026
c38d603
Merge pinned upstream into mixed-tier component
Burntgogi Oct 27, 2026
fd2a64b
Document current-main dense-header consumer execution
Burntgogi Oct 27, 2026
462213c
Fix Qwen tier descriptor down-form bounds
Burntgogi Oct 27, 2026
c143c98
Merge pinned upstream 0df4076e for Q5_0 dispatch compatibility
Burntgogi Oct 27, 2026
3ba6e7c
Merge remote-tracking branch 'origin/main' into land783
midagedev Oct 27, 2026
800700d
placement: a tier card with no leg descriptor keeps its reserve; the …
midagedev Oct 27, 2026
9e7ab5a
Merge main into selected mixed expert scratch
Burntgogi Oct 27, 2026
fdec20e
Merge remote-tracking branch 'origin/main' into land783
midagedev Oct 27, 2026
338ee5d
Merge branch 'contrib/flint-mixed-legs-kid28n7y' of https://github.co…
midagedev Oct 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/gpu-deepseek41/src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2583,7 +2583,7 @@ impl Body {
// The tiers' batch staging is reserved on their cards by the plan,
// so it is made at load, not at the first prompt.
hybrid.prepare_batch(gpu.context(), prefill::T_MAX)?;
hybrid.check_tier_reserves(plan.machine, &cards)?;
hybrid.check_tier_reserves(plan, &cards)?;
Some(TierPiece::new(gpu, hybrid.slots(), PAIR_ROWS)?)
};
let ced = ced::Ced::new(&CedLayer::table(hp), seq.ring_rows(), cfg.ced);
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/gate_glm5next_nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod gate {
let file = Split::open(&path)?;
let inputs = PlanInputs::describe(&file)?;
let (mut machine, node) =
crate::node_history::machine(inputs.model.layers, tier_batch(&inputs))?;
crate::node_history::machine(inputs.model.layers, tier_batch(&inputs)?)?;
reserve_checkpoints(
&mut machine,
Seqs::priced(1, checkpoint_price(&inputs)?),
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/gate_glm5next_twocard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ mod gate {
fn bp_machine(inputs: &PlanInputs) -> Result<impl Fn(usize) -> Machine + Copy, GateError> {
glm_machine(
Place::Bp,
Some(place::tier_batch(inputs)),
Some(place::tier_batch(inputs)?),
1,
checkpoint_price(inputs)?,
u64::try_from(CTX)?,
Expand Down
5 changes: 3 additions & 2 deletions crates/gpu-gates/src/bin/gate_mimo2_serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -892,8 +892,9 @@ mod gate {
let mut inputs = PlanInputs::describe(&split)?;
inputs.room = (PLAN_ROOM, HostRead::Given);
let place = unset_place(cards).on_host()?;
let batch =
(!place.tier_cards().is_empty()).then(|| bloomery_gpu_mimo2::tier::tier_batch(&inputs));
let batch = (!place.tier_cards().is_empty())
.then(|| bloomery_gpu_mimo2::tier::tier_batch(&inputs))
.transpose()?;
let machine = place.machine(None, batch)?(inputs.model.layers);
let slots = NonZeroUsize::new(usize::try_from(DEFAULT_SLOTS)?).ok_or("no default slot")?;
let plan =
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/gate_musespark_prefill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ mod gate {
tier_now: Tier,
) -> Result<(Model, bool, Vec<usize>), GateError> {
let inputs = PlanInputs::read(&open_split(Arch::MuseSpark, RECIPE)?)?;
let mut two = lcpp_e2e::Arm::Bp.machine(hp.n_layer, place::tier_batch(hp))?;
let mut two = lcpp_e2e::Arm::Bp.machine(hp.n_layer, place::tier_batch(hp)?)?;
place::stage_placed(&mut two)?;
let ctx = u64::try_from(ctx)?;
// The stage card alone, the reference's machine: the budget reads its unbudgeted plan, which a plan of the two
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/gate_solar2_twocard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ mod gate {
let layers = inputs.model.layers;
let bp = Place::Bp
.on_host()?
.machine(None, Some(place::tier_batch(&inputs.hp)))?;
.machine(None, Some(place::tier_batch(inputs)?))?;
let two = bp(layers);
let plan = inputs.plan(&two, u64::try_from(CTX)?, &cfg.place)?;
let budget = cfg
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/generate_glm5next.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ mod cli {
Some(lane_at(placement)?)
};
let place = placement.name();
let tier_batch = glm_place::tier_batch(placement, &inputs);
let tier_batch = glm_place::tier_batch(placement, &inputs)?;
let machine = glm_machine(
placement,
tier_batch,
Expand Down
12 changes: 7 additions & 5 deletions crates/gpu-gates/src/bin/shared/glm5next_place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ pub fn parse(v: &str) -> Result<Place, GateError> {
}

/// The expert tier's prompt-batch bytes `place`'s plan reserves for the file
/// `inputs` describes (`model::arch::glm5next::place::tier_batch`), which
/// `Place::machine` takes; `None` under a placement with no tier card.
pub fn tier_batch(place: Place, inputs: &PlanInputs) -> Option<TierBatchBytes> {
(!place.tier_cards().is_empty()).then(|| model::arch::glm5next::place::tier_batch(inputs))
/// described by `inputs` (`model::arch::glm5next::place::tier_batch`),
/// which `Place::machine` takes; `None` under a placement with no tier card.
pub fn tier_batch(place: Place, inputs: &PlanInputs) -> Result<Option<TierBatchBytes>, GateError> {
Ok((!place.tier_cards().is_empty())
.then(|| model::arch::glm5next::place::tier_batch(inputs))
.transpose()?)
}

/// The experts `place`'s tier cards hold in its plan at `ctx` positions
Expand All @@ -63,7 +65,7 @@ pub fn tier_experts(
) -> Result<u64, GateError> {
let machine = glm_machine(
place,
tier_batch(place, inputs),
tier_batch(place, inputs)?,
slots,
checkpoint_price(inputs)?,
ctx,
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/shared/mimo2_twocard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub fn run(path: &Path, levers: &bloomery_levers::Levers) -> Result<bool, GateEr
let layers = inputs.model.layers;
let walk = crate::e2e::walk(TWO_WALK, inputs.hp.n_vocab);
let prompt = crate::e2e::walk(TWO_PROMPT, inputs.hp.n_vocab);
let two = workstation::plan_bp(layers, None, bloomery_gpu_mimo2::tier::tier_batch(&inputs));
let two = workstation::plan_bp(layers, None, bloomery_gpu_mimo2::tier::tier_batch(&inputs)?);
let flat = Machine {
tiers: Vec::new(),
..two.clone()
Expand Down
4 changes: 2 additions & 2 deletions crates/gpu-gates/src/bin/shared/minimaxm3_seat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ fn load(file: &Path, ctx: usize, route_trace: bool, arm: Arm) -> Result<Loaded,
};
let machine = arm.machine(
inputs.model.layers,
bloomery_gpu_minimaxm3::tier::tier_batch(&inputs),
bloomery_gpu_minimaxm3::tier::tier_batch(&inputs)?,
)?;
let place = PlanLevers::from_levers(&levers)?;
let plan = inputs.plan(&machine, u64::try_from(ctx)?, &place)?;
Expand Down Expand Up @@ -265,7 +265,7 @@ pub fn two_card(
let inputs = described(minimaxm3_folder::model_at(file)?.header())?;
let layers = inputs.model.layers;
let walk = walk(steps, inputs.hp.n_vocab);
let two = Arm::Bp.machine(layers, bloomery_gpu_minimaxm3::tier::tier_batch(&inputs))?;
let two = Arm::Bp.machine(layers, bloomery_gpu_minimaxm3::tier::tier_batch(&inputs)?)?;
let flat = Machine {
tiers: Vec::new(),
..two.clone()
Expand Down
29 changes: 25 additions & 4 deletions crates/gpu-gates/src/bin/shared/qwen3moe_place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ fn laid(
[stage] => workstation::placed_with_arena(*stage, layers, arena),
[stage, tier] => {
let batch = match inputs {
Inputs::Qwen3(i) => q3::tier_batch(&i.hp),
Inputs::Qwen35(i) => q35::leg_tier_batch(&i.spec),
};
Inputs::Qwen3(i) => q3::tier_batch(i),
Inputs::Qwen35(i) => q35::leg_tier_batch(i),
}?;
let mut machine = workstation::plan_tiers(layers, *stage, &[*tier], None, batch)?;
q3::stage_placed(&mut machine, arena);
machine
Expand Down Expand Up @@ -2099,7 +2099,7 @@ pub(super) mod tests {

/// A dense qwen35 file (no router) plans through [`PlaceQ3::qwen35_on`]: its machine counts
/// the whole load's ubatch arena, as the load sizes it, not a placed arena, which a file with
/// no router refuses; and the plan answers at the load's context.
/// no router refuses; an expert tier is refused by name through the same consumer.
#[allow(
dead_code,
reason = "`generate_qwen3moe`'s test calls it; every other bin that includes this file leaves it unused"
Expand Down Expand Up @@ -2137,6 +2137,27 @@ pub(super) mod tests {
assert_eq!(workstation::counted_arena_bytes(&q.machine.cards[0]), arena);
q.plan(o.ctx, &PlanLevers::default())
.unwrap_or_else(|e| panic!("the dense plan at {}: {e}", o.ctx));
let tier = DeviceInfo {
ordinal: 1,
name: "NVIDIA RTX 3090".to_owned(),
total_bytes: 25_769_803_776,
free_bytes: 25_000_000_000,
uuid: [2; 16],
pci_bus: "0000:81:00.0".to_owned(),
held_by: None,
integrated: false,
};
let census = [census.into_iter().next().expect("the stage card"), tier];
let two = Place::parse("cuda0+1").expect("two card words");
let refusal =
match PlaceQ3::qwen35_on(&split, two, &census, o, Seqs::ONE, Beside::default()) {
Err(e) => e,
Ok(_) => panic!("a dense model cannot use an expert tier"),
};
assert!(matches!(
refusal.downcast_ref::<PlacementError>(),
Some(PlacementError::Metadata { key, .. }) if key == "Qwen3.6 expert tier"
));
std::fs::remove_file(&path).expect("the header file");
}
}
3 changes: 1 addition & 2 deletions crates/gpu-gates/src/bin/shared/routed_legs/glm5next.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ fn machine_of(
slots: usize,
) -> Result<Machine, GateError> {
let price = checkpoint_price(inputs)?;
let tier_batch = glmplace::tier_batch(place, inputs);
let tier_batch = glmplace::tier_batch(place, inputs)?;
Ok(glm_machine(place, tier_batch, slots, price, ctx)?(
inputs.model.layers,
))
Expand Down Expand Up @@ -242,7 +242,6 @@ fn place_of(p: &PlaceError) -> Outcome {
PlaceError::Placement(e) => return refused_of(e),
PlaceError::PastOracle { .. } => "past-oracle",
PlaceError::FrontOver { .. } => "front-over",
PlaceError::TierLeg { .. } => "tier-leg",
PlaceError::Broken(_) | PlaceError::NextnCards { .. } | PlaceError::Slots { .. } => {
return Outcome::Red(p.to_string());
}
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/shared/serve_seats/glm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ impl Placed {
(set, slots): (Option<usize>, usize),
(images, side): (&Images<'_>, Option<&Side>),
) -> Result<Placed, GateError> {
let tier_batch = glm_place::tier_batch(place, inputs);
let tier_batch = glm_place::tier_batch(place, inputs)?;
// Every machine reserves its checkpoints at the slot context it is
// laid for: the choice's probes each at their own, the load's at the
// context it is granted; and the encoder's reserve, as the printed plan does.
Expand Down
15 changes: 11 additions & 4 deletions crates/gpu-gates/src/bin/shared/serve_seats/hybrid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,16 @@ pub trait Family: Sized + 'static {
/// The expert tier's prompt-batch bytes the plan reserves on `place`'s
/// tier card ([`Tiered::tier_batch`]); a body that serves no tier card
/// reserves none (the default), and its plan refuses the card by name.
fn tier_batch(place: Place, _inputs: &PlanInputs<Self::H>) -> Option<TierBatchBytes> {
(!place.tier_cards().is_empty()).then_some(TierBatchBytes {
fn tier_batch(
place: Place,
_inputs: &PlanInputs<Self::H>,
) -> Result<Option<TierBatchBytes>, GateError> {
Ok((!place.tier_cards().is_empty()).then_some(TierBatchBytes {
staging: 0,
scratch: 0,
host: 0,
})
leg: None,
}))
}

/// The tags the model's description names for its think span, which the
Expand Down Expand Up @@ -323,7 +327,10 @@ impl<F: Family> Tiered for Hybrid<F> {
F::think_tags(inputs).map(Some)
}

fn tier_batch(place: Place, inputs: &PlanInputs<Self::H>) -> Option<TierBatchBytes> {
fn tier_batch(
place: Place,
inputs: &PlanInputs<Self::H>,
) -> Result<Option<TierBatchBytes>, GateError> {
F::tier_batch(place, inputs)
}

Expand Down
6 changes: 4 additions & 2 deletions crates/gpu-gates/src/bin/shared/serve_seats/mimo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,10 @@ impl Tiered for Mimo {

/// The tier card's prompt-batch bytes ([`bloomery_gpu_mimo2::tier::tier_batch`]), under a
/// placement with one.
fn tier_batch(place: Place, inputs: &PlanInputs) -> Option<TierBatchBytes> {
(!place.tier_cards().is_empty()).then(|| bloomery_gpu_mimo2::tier::tier_batch(inputs))
fn tier_batch(place: Place, inputs: &PlanInputs) -> Result<Option<TierBatchBytes>, GateError> {
Ok((!place.tier_cards().is_empty())
.then(|| bloomery_gpu_mimo2::tier::tier_batch(inputs))
.transpose()?)
}

fn flags(flag: &str, value: &str, out: &mut Flags) -> Result<bool, GateError> {
Expand Down
9 changes: 7 additions & 2 deletions crates/gpu-gates/src/bin/shared/serve_seats/minimaxm3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,13 @@ impl Tiered for MiniMax {
/// The tier's prompt-batch bytes of the file's widths and down forms over the body's prompt
/// unit ([`bloomery_gpu_minimaxm3::tier::tier_batch`]), reserved on the tier card and the
/// host; `None` on a placement with no tier card.
fn tier_batch(place: Place, inputs: &PlanInputs<Self::H>) -> Option<TierBatchBytes> {
(!place.tier_cards().is_empty()).then(|| bloomery_gpu_minimaxm3::tier::tier_batch(inputs))
fn tier_batch(
place: Place,
inputs: &PlanInputs<Self::H>,
) -> Result<Option<TierBatchBytes>, GateError> {
Ok((!place.tier_cards().is_empty())
.then(|| bloomery_gpu_minimaxm3::tier::tier_batch(inputs))
.transpose()?)
}

/// The tags the model's description names for its think span.
Expand Down
9 changes: 7 additions & 2 deletions crates/gpu-gates/src/bin/shared/serve_seats/musespark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,13 @@ impl Tiered for Muse {
/// The tier's prompt-batch bytes of the file's widths
/// ([`place::tier_batch`]), reserved on the tier card and the host; `None`
/// on a placement with no tier card.
fn tier_batch(place: Place, inputs: &PlanInputs<Self::H>) -> Option<TierBatchBytes> {
(!place.tier_cards().is_empty()).then(|| place::tier_batch(&inputs.hp))
fn tier_batch(
place: Place,
inputs: &PlanInputs<Self::H>,
) -> Result<Option<TierBatchBytes>, GateError> {
Ok((!place.tier_cards().is_empty())
.then(|| place::tier_batch(&inputs.hp))
.transpose()?)
}

/// The ring is kept out of the expert budget where the common rule starts
Expand Down
9 changes: 7 additions & 2 deletions crates/gpu-gates/src/bin/shared/serve_seats/solar2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,13 @@ impl Family for Solar {

/// The tier's prompt-batch bytes of the file's widths ([`place::tier_batch`]), reserved on
/// the placement's tier card and the host.
fn tier_batch(place: Place, inputs: &PlanInputs<Self::H>) -> Option<TierBatchBytes> {
(!place.tier_cards().is_empty()).then(|| place::tier_batch(&inputs.hp))
fn tier_batch(
place: Place,
inputs: &PlanInputs<Self::H>,
) -> Result<Option<TierBatchBytes>, bloomery_gpu_gates::GateError> {
Ok((!place.tier_cards().is_empty())
.then(|| place::tier_batch(inputs))
.transpose()?)
}
}

Expand Down
14 changes: 9 additions & 5 deletions crates/gpu-gates/src/bin/shared/serve_seats/tiered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,16 @@ pub trait Tiered: Seat + Sized + 'static {
/// The expert tier's prompt-batch bytes the plan reserves on `place`'s tier card, for the file
/// `inputs` describes; `None` under a placement with no tier card. A body that serves no tier
/// card reserves none (the default), and its plan refuses the card by name.
fn tier_batch(place: Place, _inputs: &PlanInputs<Self::H>) -> Option<TierBatchBytes> {
(!place.tier_cards().is_empty()).then_some(TierBatchBytes {
fn tier_batch(
place: Place,
_inputs: &PlanInputs<Self::H>,
) -> Result<Option<TierBatchBytes>, GateError> {
Ok((!place.tier_cards().is_empty()).then_some(TierBatchBytes {
staging: 0,
scratch: 0,
host: 0,
})
leg: None,
}))
}

/// Whether the plan of a load on `place` keeps the expert stream's ring out of the expert budget
Expand Down Expand Up @@ -399,7 +403,7 @@ fn tier_experts<S: Tiered>(
levers: &PlanLevers,
ctx: Option<usize>,
) -> Result<u64, GateError> {
let machine = S::machine(offer, S::tier_batch(offer, inputs), inputs.model.layers)?;
let machine = S::machine(offer, S::tier_batch(offer, inputs)?, inputs.model.layers)?;
let ctx = ctx.map_or(Ok(1), u64::try_from)?;
let plan = inputs.plan(&machine, ctx, levers)?;
Ok(plan.tier_n_l.iter().flatten().sum())
Expand Down Expand Up @@ -522,7 +526,7 @@ pub fn run<S: Tiered>(args: &[String], side: &side_seat::Flags) -> Result<ServeE
} else {
Some(lane_at(place)?)
};
let tier_batch = S::tier_batch(place, &inputs);
let tier_batch = S::tier_batch(place, &inputs)?;
let mut machine = S::machine(place, tier_batch, inputs.model.layers)?;
beside::reserve_on(
&mut machine,
Expand Down
2 changes: 1 addition & 1 deletion crates/gpu-gates/src/bin/shared/solar2_seat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub fn open(file: &Path, ctx: usize, arm: Arm) -> Result<Box<dyn Seat>, GateErro
inputs.room = (PLAN_ROOM, HostRead::Given);
// Plan (b′): the stage on the largest card, the next-largest an expert tier under the host tier, holding the tier's
// prompt-batch bytes the file's widths give.
let machine = arm.machine(inputs.model.layers, place::tier_batch(&inputs.hp))?;
let machine = arm.machine(inputs.model.layers, place::tier_batch(&inputs)?)?;
let place = PlanLevers::from_levers(&levers)?;
let plan = inputs.plan(&machine, u64::try_from(ctx)?, &place)?;
let mut m = Body::open_placed(split, &plan, &inputs, 0, levers.host())?;
Expand Down
1 change: 1 addition & 0 deletions crates/gpu-glm5next/src/tier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl LegFamily for Glm {
n_used: hp.n_used,
n_embd: hp.n_embd,
ff: hp.expert_ff,
program: model::placement::accepts::Program::Glm5nextBody,
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/gpu-mimo2/src/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fn stacks(l: usize) -> [String; 3] {
/// MiMo's card experts: 256 routed experts, 8 a token.
const FAMILY: CardFamily = CardFamily {
what: "mimo2 CardExperts",
program: model::placement::accepts::Program::Mimo2Body,
n_expert: N_EXPERT,
n_used: N_USED,
stacks,
Expand Down
6 changes: 3 additions & 3 deletions crates/gpu-mimo2/src/tier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ use gguf::Split;
use model::ModelError;
use model::arch::mimo2::place::{self, PlanInputs};
use model::moe::HostLayer;
use model::placement::ModelTensors;
use model::placement::workstation::TierBatchBytes;
use model::placement::{ModelTensors, PlacementError};
use model::r8file::R8Source;
use models::LayerSpec;

Expand All @@ -56,8 +56,7 @@ pub const CHUNK: usize = place::TIER_CHUNK as usize;
/// The tier's prompt-batch bytes the plan reserves on the tier card and the host for the file
/// `inputs` describes: [`place::tier_batch`] over blocks of a prompt unit's rows ([`T_MAX`]), the
/// columns the load makes the tier's batch legs for.
#[must_use]
pub fn tier_batch(inputs: &PlanInputs) -> TierBatchBytes {
pub fn tier_batch(inputs: &PlanInputs) -> Result<TierBatchBytes, PlacementError> {
place::tier_batch(&inputs.hp, T_MAX as u64)
}

Expand Down Expand Up @@ -91,6 +90,7 @@ impl LegFamily for Mimo2 {
n_used: hp.n_used,
n_embd: hp.n_embd,
ff: hp.expert_ff,
program: model::placement::accepts::Program::Mimo2Body,
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/gpu-minimaxm3/src/ffn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub use bloomery_gpu_deepseek41::shared_routed::{
/// The card experts' family: the file's stack names and the router's counts.
pub const CARD: CardFamily = CardFamily {
what: "minimaxm3 CardExperts",
program: model::placement::accepts::Program::MiniMaxM3Body,
n_expert: N_EXPERT,
n_used: N_USED,
stacks: names::routed_stacks,
Expand Down
Loading
Loading