STRA-338 params r02: name the split files by content; OriginalRingBlocks lives in original_session_state.rs

impl_originalmtpscalarprefill_{2_2,4,6,7,8}.rs become kernel_commands, call_admission, record_operands, group_loop and
group_capture; impl_originalmtpactor_2_2.rs becomes draft_rounds. OriginalRingBlocks moves out of
original_conversation_state.rs, which would otherwise pass the 400-line file limit.
This commit is contained in:
Pavlo Ratushnyi
2026-11-08 02:15:18 +01:00
parent 47a5938f2f
commit 0c682e2aa2
10 changed files with 32 additions and 28 deletions
@@ -3,24 +3,24 @@
#[allow(unused_imports)]
use super::*;
#[path = "impl_originalmtpscalarprefill/call_admission.rs"]
mod call_admission;
#[path = "impl_originalmtpscalarprefill/group_capture.rs"]
mod group_capture;
#[path = "impl_originalmtpscalarprefill/group_loop.rs"]
mod group_loop;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_2.rs"]
mod impl_originalmtpscalarprefill_2;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_2_2.rs"]
mod impl_originalmtpscalarprefill_2_2;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_3.rs"]
mod impl_originalmtpscalarprefill_3;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_4.rs"]
mod impl_originalmtpscalarprefill_4;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_5.rs"]
mod impl_originalmtpscalarprefill_5;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_6.rs"]
mod impl_originalmtpscalarprefill_6;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_7.rs"]
mod impl_originalmtpscalarprefill_7;
#[path = "impl_originalmtpscalarprefill/impl_originalmtpscalarprefill_8.rs"]
mod impl_originalmtpscalarprefill_8;
#[path = "impl_originalmtpscalarprefill/kernel_commands.rs"]
mod kernel_commands;
#[path = "impl_originalmtpscalarprefill/record_operands.rs"]
mod record_operands;
#[allow(unused_imports)]
use impl_originalmtpscalarprefill_6::{
use record_operands::{
Cap, ExternalOwners, GrRows, GroupIo, GroupSpan, PagePublication, ScalarCall, ScalarGroupSources, ScalarOperands,
ScalarStaged,
};
@@ -1,6 +1,6 @@
//! Moved out of the parent module by STRA-338: impl OriginalMtpScalarPrefill (4). `record_impl` admits the call,
//! stages the weights and claims the policy; the group loop is in `impl_originalmtpscalarprefill_7.rs` and the capture
//! of one group in `impl_originalmtpscalarprefill_8.rs`.
//! The admission of one `OriginalMtpScalarPrefill::record_impl` call (STRA-338): the owner and prompt checks, the
//! alias checks and weight staging, and the policy claim. The group loop is in `group_loop.rs` and the capture of one
//! group in `group_capture.rs`.
#[allow(unused_imports)]
use super::*;
@@ -1,4 +1,5 @@
//! Moved out of the parent module by STRA-338: impl OriginalMtpScalarPrefill (2).
//! The scratch layout accessors and the kernel command emitters (`kernel`, `finite`, `q8_guard`, `quant`, `project`,
//! `gr_args`) of `OriginalMtpScalarPrefill` (STRA-338).
#[allow(unused_imports)]
use super::*;
@@ -15,7 +15,9 @@
//! No state is acknowledged from metadata: a region is only readable or
//! writable through the actual arena or the actual host owner.
use super::{OriginalSessionLayout, OriginalSessionQsaLayout, OriginalSessionSpan, OriginalSessionState};
use super::{
OriginalRingBlocks, OriginalSessionLayout, OriginalSessionQsaLayout, OriginalSessionSpan, OriginalSessionState,
};
use crate::{Context, Error, Result};
// ---- plain data and traits: no CUDA types below until `OriginalSessionLayout` (begin)
@@ -46,14 +48,6 @@ pub enum OriginalKvLayer {
Draft,
}
/// The host blocks `[begin, end)` of a drafter ring and the number of ring slots they land in (`block % slots`).
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct OriginalRingBlocks {
pub begin: i64,
pub end: i64,
pub slots: i64,
}
/// A byte range of session state.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum OriginalRegion {
@@ -3,7 +3,7 @@
#[allow(unused_imports)]
use super::*;
#[path = "impl_originalmtpactor/draft_rounds.rs"]
mod draft_rounds;
#[path = "impl_originalmtpactor/impl_originalmtpactor_2.rs"]
mod impl_originalmtpactor_2;
#[path = "impl_originalmtpactor/impl_originalmtpactor_2_2.rs"]
mod impl_originalmtpactor_2_2;
@@ -1,4 +1,5 @@
//! Moved out of the parent module by STRA-338: impl OriginalMtpActor (2).
//! The draft rounds of `OriginalMtpActor` (STRA-338): `draft`, `draft_first` and the verifier-window forms, each taking
//! the draft-round DTOs of `original_mtp_draft_round.rs`.
#[allow(unused_imports)]
use super::*;
@@ -16,10 +16,18 @@ pub(crate) use conversation::OriginalConversationAccess;
#[allow(unused_imports)]
pub use conversation::{
OriginalGeometryFacts, OriginalHostKv, OriginalIdxKind, OriginalKvLayer, OriginalKvPool, OriginalQsaFacts,
OriginalRegion, OriginalRingBlocks, OriginalSessionBytes, OriginalSessionControl, OriginalSessionFacts,
OriginalRegion, OriginalSessionBytes, OriginalSessionControl, OriginalSessionFacts,
};
use std::rc::Rc;
/// The host blocks `[begin, end)` of a drafter ring and the number of ring slots they land in (`block % slots`).
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct OriginalRingBlocks {
pub begin: i64,
pub end: i64,
pub slots: i64,
}
const ALIGN: usize = 256;
const PLE_HIST: usize = 9;
const PLE_DIM: usize = 10240;