STRA-338 params e04: rename the expert projection and scalar QSA row files by content; ExecutorOpening in its own file
Files: none
This commit is contained in:
@@ -69,57 +69,57 @@ mod moe_activation_reuse_gpu;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
mod impl_expertready;
|
||||
pub(in crate::qwen_forward) use impl_expertready::ExpertRowRequest;
|
||||
mod expert_step;
|
||||
pub(in crate::qwen_forward) use expert_step::ExpertRowRequest;
|
||||
#[allow(unused_imports)]
|
||||
use impl_expertready::StepCuda;
|
||||
use expert_step::StepCuda;
|
||||
#[allow(unused_imports)]
|
||||
use impl_expertready::execute_cuda;
|
||||
use expert_step::execute_cuda;
|
||||
#[allow(unused_imports)]
|
||||
use impl_expertready::execute_cuda_kar;
|
||||
use expert_step::execute_cuda_kar;
|
||||
#[allow(unused_imports)]
|
||||
use impl_expertready::kar_error;
|
||||
mod finish_with_parts_fn;
|
||||
use expert_step::kar_error;
|
||||
mod cached_expert_run;
|
||||
#[allow(unused_imports)]
|
||||
use finish_with_parts_fn::execute_cuda_cached;
|
||||
use cached_expert_run::execute_cuda_cached;
|
||||
#[allow(unused_imports)]
|
||||
use finish_with_parts_fn::finish_with_parts;
|
||||
mod cached_mlp_down_fn;
|
||||
use cached_expert_run::finish_with_parts;
|
||||
mod scoped_expert_mlp;
|
||||
#[allow(unused_imports)]
|
||||
use cached_mlp_down_fn::DownProvenance;
|
||||
use scoped_expert_mlp::DownProvenance;
|
||||
#[allow(unused_imports)]
|
||||
use cached_mlp_down_fn::cached_gate_up_scoped;
|
||||
use scoped_expert_mlp::cached_gate_up_scoped;
|
||||
#[allow(unused_imports)]
|
||||
use cached_mlp_down_fn::cached_mlp_down;
|
||||
mod expert_mlp_fn;
|
||||
use scoped_expert_mlp::cached_mlp_down;
|
||||
mod expert_mlp_values;
|
||||
#[allow(unused_imports)]
|
||||
use expert_mlp_fn::expert_mlp;
|
||||
use expert_mlp_values::expert_mlp;
|
||||
#[allow(unused_imports)]
|
||||
use expert_mlp_fn::finish_cached_mlp;
|
||||
use expert_mlp_values::finish_cached_mlp;
|
||||
#[allow(unused_imports)]
|
||||
use expert_mlp_fn::project_cached_gate_up;
|
||||
use expert_mlp_values::project_cached_gate_up;
|
||||
#[allow(unused_imports)]
|
||||
use expert_mlp_fn::project_retained_gate_up;
|
||||
mod project_matrix_fn;
|
||||
use expert_mlp_values::project_retained_gate_up;
|
||||
mod expert_matrix_projection;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::admit_budget;
|
||||
use expert_matrix_projection::admit_budget;
|
||||
#[cfg(test)]
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::collect_rows;
|
||||
use expert_matrix_projection::collect_rows;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::dual_format_kind;
|
||||
use expert_matrix_projection::dual_format_kind;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::dual_routed_format;
|
||||
use expert_matrix_projection::dual_routed_format;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::launch_cached_prepared;
|
||||
use expert_matrix_projection::launch_cached_prepared;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::launch_cached_projection;
|
||||
use expert_matrix_projection::launch_cached_projection;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::launch_projection;
|
||||
use expert_matrix_projection::launch_projection;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::project_matrix;
|
||||
use expert_matrix_projection::project_matrix;
|
||||
#[allow(unused_imports)]
|
||||
use project_matrix_fn::{DeclaredMatrix, ExpertActivation, ExpertMatrix, MatrixDims};
|
||||
use expert_matrix_projection::{DeclaredMatrix, ExpertActivation, ExpertMatrix, MatrixDims};
|
||||
mod validate_values_fn;
|
||||
#[allow(unused_imports)]
|
||||
use validate_values_fn::binding_error;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
//! Moved out of the parent module by STRA-338: fn expert_mlp, fn project_cached_gate_up, fn project_retained_gate_up,
|
||||
//! fn finish_cached_mlp.
|
||||
|
||||
use super::project_matrix_fn::{gate_up_dims, gate_up_prepared_format};
|
||||
use super::expert_matrix_projection::{gate_up_dims, gate_up_prepared_format};
|
||||
#[allow(unused_imports)]
|
||||
use super::*;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
//! Moved out of the parent module by STRA-338: fn cached_mlp_down, fn cached_gate_up_scoped.
|
||||
|
||||
use super::project_matrix_fn::{MatrixDims, gate_up_dims, gate_up_prepared_format};
|
||||
use super::expert_matrix_projection::{MatrixDims, gate_up_dims, gate_up_prepared_format};
|
||||
#[allow(unused_imports)]
|
||||
use super::*;
|
||||
|
||||
+4
-2
@@ -8,10 +8,12 @@ use decode_parts::{
|
||||
QsaOwnerHome, RefillOwners, TierResources, assemble_decode, decode_pcie_mode, gpu_expert_pool,
|
||||
narrow_window_policy, resolve_assembled, return_owners, settle_deferred_refill, teardown_decode,
|
||||
};
|
||||
mod executor_opening;
|
||||
use executor_opening::ExecutorOpening;
|
||||
mod open_parts;
|
||||
use open_parts::{
|
||||
ExecutorOpening, Policies, Weights, check_open, load_weights, loan_ladder, log_open_inventory, open_executor,
|
||||
open_expert_cache, open_prefix, serve_policies, share_rt_dense_roles,
|
||||
Policies, Weights, check_open, load_weights, loan_ladder, log_open_inventory, open_executor, open_expert_cache,
|
||||
open_prefix, serve_policies, share_rt_dense_roles,
|
||||
};
|
||||
mod serve_parts;
|
||||
use serve_parts::{ServeEnv, serve_over_host};
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
//! How the prompt executor and its MTP drafter are opened.
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use super::*;
|
||||
|
||||
/// How the prompt executor and its MTP drafter are opened: the stack config, the verifier's widest window and the
|
||||
/// drafter request derived from them.
|
||||
pub(super) struct ExecutorOpening<'a> {
|
||||
pub(super) config: &'a StackConfig,
|
||||
pub(super) verifier_max_t: usize,
|
||||
pub(super) request: OriginalMtpRequest,
|
||||
}
|
||||
impl<'a> ExecutorOpening<'a> {
|
||||
/// The opening for a verifier of window width `verifier_max_t`; `coupled` is whether the policy is coupled.
|
||||
pub(super) fn new(config: &'a StackConfig, verifier_max_t: usize, coupled: bool) -> Self {
|
||||
let request = OriginalMtpRequest::ring_int8(verifier_max_t, config.capacity, coupled, MTP_RESIDENT_CELLS);
|
||||
Self { config, verifier_max_t, request }
|
||||
}
|
||||
}
|
||||
-15
@@ -178,21 +178,6 @@ fn load_moe<'ctx>(
|
||||
Ok(moe)
|
||||
}
|
||||
|
||||
/// How the prompt executor and its MTP drafter are opened: the stack config, the verifier's widest window and the
|
||||
/// drafter request derived from them.
|
||||
pub(super) struct ExecutorOpening<'a> {
|
||||
config: &'a StackConfig,
|
||||
verifier_max_t: usize,
|
||||
request: OriginalMtpRequest,
|
||||
}
|
||||
impl<'a> ExecutorOpening<'a> {
|
||||
/// The opening for a verifier of window width `verifier_max_t`; `coupled` is whether the policy is coupled.
|
||||
pub(super) fn new(config: &'a StackConfig, verifier_max_t: usize, coupled: bool) -> Self {
|
||||
let request = OriginalMtpRequest::ring_int8(verifier_max_t, config.capacity, coupled, MTP_RESIDENT_CELLS);
|
||||
Self { config, verifier_max_t, request }
|
||||
}
|
||||
}
|
||||
|
||||
/// The prompt executor with its MTP drafter: from the RT directory, or the full MTP owner over the pinned pack.
|
||||
pub(super) fn open_executor<'a, 'ctx>(
|
||||
binding: &'a ModelBinding,
|
||||
|
||||
@@ -79,29 +79,29 @@ struct ScalarHost {
|
||||
/// The role buffers of one gate-and-Out run: attended, gate, gated, Out.
|
||||
type GateBuffers<'ctx> = [Option<DeviceBuffer<'ctx>>; 4];
|
||||
|
||||
#[path = "qsa_resident_scalar/driver_fn.rs"]
|
||||
mod driver_fn;
|
||||
#[path = "qsa_resident_scalar/scalar_row_admission.rs"]
|
||||
mod scalar_row_admission;
|
||||
#[allow(unused_imports)]
|
||||
use driver_fn::check_scalar_shapes;
|
||||
use scalar_row_admission::check_scalar_shapes;
|
||||
#[allow(unused_imports)]
|
||||
use driver_fn::check_scalar_txn;
|
||||
use scalar_row_admission::check_scalar_txn;
|
||||
#[allow(unused_imports)]
|
||||
use driver_fn::check_txn_input;
|
||||
use scalar_row_admission::check_txn_input;
|
||||
#[allow(unused_imports)]
|
||||
use driver_fn::driver;
|
||||
use scalar_row_admission::driver;
|
||||
#[allow(unused_imports)]
|
||||
use driver_fn::scalar_gate;
|
||||
#[path = "qsa_resident_scalar/impl_residentqsascalar.rs"]
|
||||
mod impl_residentqsascalar;
|
||||
use scalar_row_admission::scalar_gate;
|
||||
#[path = "qsa_resident_scalar/scalar_row_run.rs"]
|
||||
mod scalar_row_run;
|
||||
#[allow(unused_imports)]
|
||||
use impl_residentqsascalar::apply_gate;
|
||||
use scalar_row_run::apply_gate;
|
||||
#[allow(unused_imports)]
|
||||
use impl_residentqsascalar::upload_gate_inputs;
|
||||
#[path = "qsa_resident_scalar/project_gated_out_fn.rs"]
|
||||
mod project_gated_out_fn;
|
||||
use scalar_row_run::upload_gate_inputs;
|
||||
#[path = "qsa_resident_scalar/gated_out_projection.rs"]
|
||||
mod gated_out_projection;
|
||||
#[allow(unused_imports)]
|
||||
use project_gated_out_fn::gate_and_out;
|
||||
use gated_out_projection::gate_and_out;
|
||||
#[allow(unused_imports)]
|
||||
use project_gated_out_fn::project_gated_out;
|
||||
use gated_out_projection::project_gated_out;
|
||||
#[allow(unused_imports)]
|
||||
use project_gated_out_fn::release_gate_buffers;
|
||||
use gated_out_projection::release_gate_buffers;
|
||||
|
||||
Reference in New Issue
Block a user