diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/original_serve_mode.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/original_serve_mode.rs index 073a8536..c3fd96ec 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/original_serve_mode.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/original_serve_mode.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeMode, impl ExpertSource, fn -//! published_prefix_summary, impl PrefixTail, impl Default_for_OriginalServeOptions, impl OriginalServeOptions .... +//! Methods of `OriginalServeMode`: `parse`, `as_str`. Methods of `ExpertSource`: `parse`, `as_str`. +//! Implements `Default for OriginalServeOptions`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/runner.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/runner.rs index ea03af0a..3d9fe5e9 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/runner.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/runner.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Defines `GpuProbe`, `Run`. +//! Split out of `original_serve` to keep its files under the line limit. use super::super::{ ActiveGuard, BackendError, Command, DeferredTail, ErrorCode, FinishReason, GENERATION_TIMEOUT, GenerationEvent, diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/command_loop.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/command_loop.rs index 616e8ae7..ae4676f5 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/command_loop.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/command_loop.rs @@ -1,8 +1,11 @@ //! The command loop of the Original owner, moved out of `run` by STRA-338 (size): receive, sweep the idle sessions, //! and answer each command in the order `run` did. -#[allow(unused_imports)] -use super::*; +use super::{ + BackendError, Command, Duration, GenerateEnv, IdleSweep, Live, LoadPhase, LoadedModel, Ordering, + OriginalServeStack, Receiver, ReopenEnv, Reply, Shared, SystemClock, Tokenizer, abandon_stack, exhausted, invalid, + load_failure, mpsc, reconfigure, serve_generate, sweep_idle, unavailable, +}; /// What the loop reads and does not change: the channel, the flags, the model handle and the clock. pub(super) struct LoopCtx<'r, 'a, 'ctx> { diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/owner_run.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/owner_run.rs index 0879f144..87138849 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/owner_run.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/owner_run.rs @@ -1,7 +1,9 @@ //! The owner loop of the Original serve stack: open it, answer the load, serve commands until unload. -#[allow(unused_imports)] -use super::*; +use super::{ + BackendError, Duration, Live, LoopCtx, Ordering, Rc, RecordedModel, ReopenEnv, Run, announce, answer_unload, + close_context, close_stack, command_loop, gpu_probe, open_run_stack, publish_open, +}; use leleka_memory::telemetry; use leleka_memory_os::HostProc; diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/reconfigure_parts.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/reconfigure_parts.rs index 27036ae9..a967ed22 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/reconfigure_parts.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/reconfigure_parts.rs @@ -1,8 +1,11 @@ //! `Command::Reconfigure` of the Original owner loop, moved out of `owner_run_steps` by STRA-338 (size): close the //! old stack, open one with the new settings, or reopen the previous ones. -#[allow(unused_imports)] -use super::*; +use super::{ + BackendError, Clock, Duration, ErrorCode, ModelBinding, Ordering, OriginalServeOptions, OriginalServeStack, + RECONFIGURE_HEADROOM_BYTES, Rc, Shared, SystemClock, open_error, publish_prefix_summary, stack_config, thread, + unavailable, +}; use leleka_cuda_driver::Context; use std::time::Instant; diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/request_generation.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/request_generation.rs index 037bacb2..74629c4a 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/request_generation.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/request_generation.rs @@ -1,8 +1,12 @@ //! One request over the Original serve stack: the token delivery to the client, the stop signals and the final //! usage, telemetry and operator lines. -#[allow(unused_imports)] -use super::*; +use super::{ + AtomicBool, CapturedIds, Clock, FinishReason, ForwardError, GENERATION_TIMEOUT, GenerationEvent, GenerationFailure, + GenerationRequest, GenerationSink, Ordering, PhaseDurations, ServeDevice, ServeError, ServeRequest, ServeStop, + Shared, Tokenizer, Usage, Utf8Pending, admission_error, capture_request, clock_seed, emit_event, invalid, + log_request_end, request_sampler, unavailable, +}; use crate::qwen_forward::original_serve_engine::ServeOutcome; use crate::qwen_forward::original_serve_request::RequestSampling; use crate::qwen_forward::original_serve_residency::ResidencyStats; diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/stack_config_and_reports.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/stack_config_and_reports.rs index b47b2e9c..258895bc 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/runner/stack_config_and_reports.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/runner/stack_config_and_reports.rs @@ -1,8 +1,11 @@ //! The stack configuration and the reports around it: GPU probe, start-up facts, error classes, the per-request //! log line and the offline capture of served requests. -#[allow(unused_imports)] -use super::*; +use super::{ + Admission, BackendError, ErrorCode, ForwardError, GenerationRequest, GpuProbe, LoadPhase, Ordering, + OriginalServeOptions, OriginalServeStack, PREFIX_SUMMARY, PREFIX_SUMMARY_HEADS, PREVIOUS_TIER, PrefixTail, + ServeFailure, Shared, StackConfig, Usage, exhausted, invalid, load_failure, +}; /// The telemetry sampler's view of the GPU: NVML when `libnvidia-ml` loads, otherwise polling `nvidia-smi` (WSL2, /// containers without the management library), otherwise nothing (the document then has no `gpu` block). diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve/tests.rs b/crates/engine-qwen35-cuda/src/backend_original_serve/tests.rs index 95712f3d..b54f0e21 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve/tests.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve/tests.rs @@ -1,4 +1,4 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Unit tests of `original_serve`. use super::*; diff --git a/crates/engine-qwen35-cuda/src/backend_original_serve_replay/required_path.rs b/crates/engine-qwen35-cuda/src/backend_original_serve_replay/required_path.rs index 2b038d62..3b7f62fd 100644 --- a/crates/engine-qwen35-cuda/src/backend_original_serve_replay/required_path.rs +++ b/crates/engine-qwen35-cuda/src/backend_original_serve_replay/required_path.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn required_path. +//! Functions: `required_path`. +//! Split out of `original_serve_replay` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/input_binding_error_display_error.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/input_binding_error_display_error.rs index 785f1577..492d8f53 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/input_binding_error_display_error.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/input_binding_error_display_error.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl fmt_Display_for, impl std_error_Error, impl BindingIdentity, impl -//! BoundLayer, impl InputConstants. +//! Methods of `BindingIdentity`: `matches`. Methods of `BoundLayer`: `index`, `kind`. +//! Implements `Display for InputBindingError`, `Error for InputBindingError`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/model_binding.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/model_binding.rs index 24de8586..d53eb7d3 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/model_binding.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/model_binding.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ModelBinding, fn bind_expert_counts. +//! Methods of `ModelBinding`: `bind`, `from_artifact`, `from_artifact_with_kar_ple`, `with_kar_expert_source` and 22... +//! Functions: `bind_expert_counts`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/validate_ple_descriptor.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/validate_ple_descriptor.rs index e76baa57..f9e30568 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/validate_ple_descriptor.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_input/validate_ple_descriptor.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn validate_ple_descriptor, impl InputConstants, fn bind_layers, fn -//! bind_layer, impl BindingIdentity. +//! Methods of `InputConstants`: `test_fixture`. Methods of `BindingIdentity`: `test_identity`. +//! Functions: `validate_ple_descriptor`, `bind_layers`, `bind_layer`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/inherited_kar_archive.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/inherited_kar_archive.rs index f7ff1747..d2b5d9e6 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/inherited_kar_archive.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/inherited_kar_archive.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl InheritedKarArchive, fn open_sealed_archive_fd, fn -//! open_read_only_archive, fn check_read_only_archive, fn reopen_read_only_archive, fn verify_open_provenance. +//! Methods of `InheritedKarArchive`: `open`, `open_sparse`, `open_sparse`, `sparse_extents` and 7 more. +//! Functions: `open_sealed_archive_fd`, `open_read_only_archive`, `check_read_only_archive`, `reopen_read_only_archi... #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/load_pinned_inherited_archive.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/load_pinned_inherited_archive.rs index 7f6f7438..9d2540d3 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/load_pinned_inherited_archive.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/load_pinned_inherited_archive.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn load_pinned_inherited_archive, fn log_startup_read, fn -//! load_pinned_inherited_archive, fn load_pinned_inherited_archive, impl KarRowPacket, impl KarRowReader .... +//! Methods of `KarRowPacket`: `payload`, `partition`. Methods of `KarRowReader`: `read_rows`. +//! Functions: `open_archive_reader`, `load_pinned_inherited_archive`, `log_startup_read`, `load_pinned_inherited_arc... #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile.rs index cc13525e..54a64455 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn pinned_profile, fn pinned_parts, fn pinned_profile_spec, fn -//! load_pinned_archive, fn verify_pinned_provenance, fn load_pinned_archive .... +//! Methods of `InheritedKarArchive`: `expert_capture_observation`. +//! Functions: `pinned_profile`, `pinned_parts`, `pinned_profile_spec`, `load_pinned_archive` and 3 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile_tests.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile_tests.rs index 8f9fce36..e7c24590 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile_tests.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/pinned_profile_tests.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Implements `Write for BrokenSink`. +//! Functions: `diagnostic_cases`, `assert_kar_diagnostic_redacts`, `assert_input_diagnostic_survives_broken_sink`, `... use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy.rs index d0c49a31..192da567 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Defines `Inode`, `IoPhase`, `OwnedCopy`. +//! Split out of `qwen4exp_kar_ple` to keep its files under the line limit. use super::{InputBindingError, InputResult, LoadPhase, input_failure}; #[cfg(target_os = "linux")] diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/checked_reader.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/checked_reader.rs index d4b95d6b..15ca77af 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/checked_reader.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/checked_reader.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn checked_reader, fn copy_exact, fn copy_exact_reporting. +//! Functions: `checked_reader`, `copy_exact`, `copy_exact_reporting`, `copy_buffer` and 1 more. +//! Split out of `private_copy` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/inode.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/inode.rs index 112d9a3b..c08842b8 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/inode.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/private_copy/inode.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn inode, fn diagnostic, fn report_io, fn phase_error, fn -//! provenance_error, fn open_regular .... +//! Methods of `OwnedCopy`: `create`, `created`, `writer`, `detach` and 2 more. Implements `Drop for OwnedCopy`. +//! Functions: `inode`, `diagnostic`, `report_io`, `phase_error` and 8 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/win_archive.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/win_archive.rs index e78770bf..57a94c1a 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/win_archive.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_kar_ple/win_archive.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Functions: `io_error`, `open_regular`, `open_read_only_archive`, `check_len` and 3 more. +//! Split out of `qwen4exp_kar_ple` to keep its files under the line limit. use super::{InputBindingError, InputResult}; use std::{ diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding.rs index d06149eb..c530e0f6 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ModelBinding. +//! Groups the submodules `model_binding_moe_descriptors`, `moe_expert_block_reads`. +//! Split out of `moe_expert` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding/model_binding_moe_descriptors.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding/model_binding_moe_descriptors.rs index af6f53ed..03af6212 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding/model_binding_moe_descriptors.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/model_binding/model_binding_moe_descriptors.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ModelBinding. +//! Methods of `ModelBinding`: `moe_expert_weights`, `moe_preload_descriptor`, `check_preload_key`, `moe_preload_bloc... +//! Functions: `moe_matrix`, `check_gate_scalar`, `preload_key`, `preload_matrix_role` and 1 more. use super::super::routed_source_descriptor::validate_rows_finite; use super::super::routed_source_descriptor::{check_matrix_tensor, check_moe_metadata, selected_expert}; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_expert_weights.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_expert_weights.rs index ddde4d56..d6b5e839 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_expert_weights.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_expert_weights.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl MoeExpertWeights, impl MoeExpertBlock, fn index, fn matrix_kind, fn -//! descriptor, fn validate_selected .... +//! Methods of `MoeExpertWeights`: `matches`, `matrix`, `shape`, `kind`. +//! Methods of `MoeExpertBlock`: `kind`, `columns`, `rows`, `bytes` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, E, EXPERTS, FF, InputResult, Matrix, MoeExpertBlock, MoeExpertSelection, MoeExpertWeights, + MoeMatrixKind, MoeMatrixRole, N, SELECTED, TILE, +}; impl MoeExpertWeights { pub(crate) fn matches(&self, binding: &BindingIdentity, layer: u32) -> bool { diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_routed_source_scope.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_routed_source_scope.rs index 1285923a..8765a843 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_routed_source_scope.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/moe_routed_source_scope.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeRoutedSourceScope, impl ModelBinding, impl ModelBinding. +//! Methods of `MoeRoutedSourceScope`: `retarget`, `check_first_member`, `check_members`. +//! Methods of `ModelBinding`: `with_moe_routed_group_source`, `moe_shared_preload_descriptors`, `moe_shared_preload_... use super::routed_source_descriptor::check_moe_metadata; #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/routed_source_descriptor.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/routed_source_descriptor.rs index e52519d6..ee312cc1 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/routed_source_descriptor.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_moe_expert/routed_source_descriptor.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn routed_source_descriptor, fn routed_source_role, impl -//! MoeRoutedSourceScope, impl ModelBinding. +//! Methods of `MoeRoutedSourceScope`: `validate_binding`, `descriptor`, `block`, `bank_span` and 2 more. +//! Methods of `ModelBinding`: `with_moe_routed_source`, `check_members_select`, `open_routed_source`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/backing.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/backing.rs index a7f50b54..144d6228 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/backing.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/backing.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Methods of `OwnedCopy`: `create`, `writer`, `owns_directory`, `owns_file` and 1 more. +//! Implements `Drop for OwnedCopy`. Functions: `inode`, `regular`, `root`, `copy_exact` and 8 more. use super::*; use sha2::{Digest, Sha256}; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/dense_bytes_types.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/dense_bytes_types.rs index ba2f9cd2..7111885e 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/dense_bytes_types.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/dense_bytes_types.rs @@ -1,8 +1,7 @@ -//! Moved out of the parent module by STRA-338: DENSE_BYTES, EXPERT_BYTES, EXPERT_BLOB, INDEX_BYTES, MAX_ROWS, MAX_READ -//! .... +//! Defines `MtpIndex`, `MtpRows`, `MtpWeights`. +//! DENSE_BYTES, EXPERT_BYTES, EXPERT_BLOB, INDEX_BYTES, MAX_ROWS, MAX_READ .... -#[allow(unused_imports)] -use super::*; +use super::{BindingIdentity, File, MtpKind}; pub(super) const DENSE_BYTES: u64 = 116_099_072; pub(super) const EXPERT_BYTES: u64 = 707_788_800; diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/descriptors_types.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/descriptors_types.rs index 668a0597..1e6b5260 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/descriptors_types.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/descriptors_types.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: DESCRIPTORS. +//! Items of the parent module. +//! Split out of `mtp` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Dense, Descriptor, MtpKind, MtpRole}; pub(super) const DESCRIPTORS: [Descriptor; 31] = [ Descriptor { diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/mtp_kind_types.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/mtp_kind_types.rs index 769d368d..1271f2e4 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/mtp_kind_types.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/mtp_kind_types.rs @@ -1,7 +1,6 @@ -//! Moved out of the parent module by STRA-338: MtpKind, MtpExpertMatrix, MtpRole, Descriptor, Dense. +//! Defines `MtpKind`, `MtpExpertMatrix`, `MtpExpertRef` and 3 more. +//! MtpKind, MtpExpertMatrix, MtpRole, Descriptor, Dense. -#[allow(unused_imports)] -use super::*; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub(crate) enum MtpKind { diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/pack_identity.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/pack_identity.rs index 48007cff..45917a99 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/pack_identity.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/pack_identity.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn pack_identity, fn descriptor, fn pinned_dense_bytes, fn -//! rt_dense_roles, fn rt_dense_name, fn rt_dense_shape .... +//! Methods of `IndexScan`: `accept`, `fits`, `complete`. Methods of `MtpIndex`: `inspect`. +//! Functions: `pack_identity`, `descriptor`, `pinned_dense_bytes`, `rt_dense_roles` and 6 more. -#[allow(unused_imports)] -use super::*; +use super::{ + DENSE_BYTES, DESCRIPTORS, Dense, Descriptor, FILE_PINS, INDEX_LIMIT, InputBindingError, InputResult, MtpIndex, + MtpKind, MtpRole, MtpRows, +}; pub(in super::super) fn pack_identity() -> [&'static str; 3] { FILE_PINS.map(|(_, _, digest)| digest) diff --git a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/read_expert_rows.rs b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/read_expert_rows.rs index bfcb2a31..47521e8b 100644 --- a/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/read_expert_rows.rs +++ b/crates/engine-qwen35-cuda/src/model_binding/qwen4exp_mtp/read_expert_rows.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn read_expert_rows, fn row_range, fn allocate, fn read_exact_range, fn -//! interleave_q2, fn validate_numeric. +//! Functions: `read_expert_rows`, `read_expert_row`, `row_range`, `allocate` and 3 more. +//! Split out of `mtp` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_mapped_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_mapped_stage.rs index 430b20b4..04563ab5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_mapped_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_mapped_stage.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl Drop_for_EphemeralRoutedOwner, impl MappedStageShape, impl -//! EphemeralRoutedOwner, impl MappedStage, impl Drop_for_MappedStage. +//! Methods of `MappedStageShape`: `slots`. +//! Methods of `EphemeralRoutedOwner`: `new_mapped`, `slot_count`, `uses_mapped`, `mapped_eligible`. -#[allow(unused_imports)] -use super::*; +use super::{ + Buffers, Context, DeviceBuffer, EphemeralRoutedOwner, Error, HOST_LIMIT, MappedExpertCopyScratch, MappedSlot, + MappedStage, MappedStageShape, ModelBinding, MoeRoutedSourceScope, MoeWeightDescriptor, ROLES, Rc, Result, SLOTS, + TripletLoanRequest, binding_error, close_buffers, combine, driver_error, empty_slot, +}; type CompletedLoan<'ctx> = ([MoeWeightDescriptor; 3], Buffers<'ctx>, Option>); diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner.rs index 4299998b..33da87e5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl EphemeralRoutedOwner. +//! Groups the submodules `ephemeral_owner_allocation`, `ephemeral_owner_loans_and_drain`, `ephemeral_owner_stage_tra... +//! Split out of `cache_ephemeral_routed` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Buffers, CLOSED_MAXIMUM, Cell, Context, DeviceBuffer, EphemeralRoutedOwner, Error, HOST_LIMIT, MappedStage, + ModelBinding, MoeExpertBlock, MoeRoutedSourceScope, MoeWeightDescriptor, OwnedCopyPoll, PendingOwnedCopy, RESERVE, + ROLES, Result, SLOTS, Slot, TripletLoanRequest, binding_error, close_buffers, close_slot, combine, driver_error, + empty_slot, healthy_cancel, +}; #[path = "ephemeral_routed_owner/ephemeral_owner_allocation.rs"] mod ephemeral_owner_allocation; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_allocation.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_allocation.rs index decfa752..2956ac23 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_allocation.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_allocation.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl EphemeralRoutedOwner. +//! Methods of `EphemeralRoutedOwner`: `new`, `validate_maximum`, `allocate_idle`, `room` and 9 more. +//! Functions: `key_identity_ok`, `key_shape_ok`. -#[allow(unused_imports)] -use super::*; +use super::{ + CLOSED_MAXIMUM, Context, DeviceBuffer, EphemeralRoutedOwner, Error, MappedStage, ModelBinding, + MoeRoutedSourceScope, MoeWeightDescriptor, RESERVE, ROLES, Result, SLOTS, Slot, binding_error, driver_error, + empty_slot, +}; impl<'ctx> EphemeralRoutedOwner<'ctx> { /// Maximum is a sizing prediction from Root's actual 48 descriptor triplets, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_loans_and_drain.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_loans_and_drain.rs index accb5d67..2a1aa7f6 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_loans_and_drain.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_loans_and_drain.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl EphemeralRoutedOwner (3). +//! Methods of `EphemeralRoutedOwner`: `loan_completed`, `borrow_triplet`, `with_triplet_inner`, `settle_inner_loan` ... +//! Split out of `ephemeral_routed_owner` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Buffers, DeviceBuffer, EphemeralRoutedOwner, Error, MappedStage, MoeRoutedSourceScope, MoeWeightDescriptor, + PendingOwnedCopy, Result, SLOTS, Slot, TripletLoanRequest, close_slot, combine, driver_error, empty_slot, +}; impl<'ctx> EphemeralRoutedOwner<'ctx> { fn loan_completed( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_stage_transfer.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_stage_transfer.rs index c4783ab9..1f4e1d17 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_stage_transfer.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/ephemeral_routed_owner/ephemeral_owner_stage_transfer.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl EphemeralRoutedOwner (2). +//! Methods of `EphemeralRoutedOwner`: `stage_inner`, `fixed_preparation`, `admit_stage`, `install_idle_buffers` and ... +//! Functions: `check_block_matches`. Defines `DetachedPayloads`. -#[allow(unused_imports)] -use super::*; +use super::{ + Buffers, Cell, DeviceBuffer, EphemeralRoutedOwner, Error, HOST_LIMIT, ModelBinding, MoeExpertBlock, + MoeRoutedSourceScope, MoeWeightDescriptor, OwnedCopyPoll, ROLES, Result, Slot, TripletLoanRequest, binding_error, + close_buffers, combine, driver_error, healthy_cancel, +}; /// Host payloads taken out of the source blocks, with the pair vector reserved for the copy. struct DetachedPayloads<'ctx> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/healthy_cancel.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/healthy_cancel.rs index bd2117aa..df7531ee 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/healthy_cancel.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_ephemeral_routed/healthy_cancel.rs @@ -1,8 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn healthy_cancel, fn observe_cancel, fn combine, fn close_buffers, fn -//! close_slot, fn empty_slot. +//! Functions: `healthy_cancel`, `observe_cancel`, `combine`, `close_buffers` and 2 more. +//! Split out of `cache_ephemeral_routed` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Buffers, Cell, Error, Result, Slot, Stage, driver_error}; /// A genuinely observed cancellation: the executor's cancelled closure returned true during /// THIS loan. The error code alone never qualifies (it is shared with other producers). diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index.rs index 62b9da5f..65b517d9 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl LruIndex. +//! Methods of `LruIndex`: `new`, `with_capacity`, `metadata_bytes`, `len` and 15 more. +//! Split out of `cache_lru_index` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index_seeding.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index_seeding.rs index 9b09424c..f7e49433 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index_seeding.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/lru_index_seeding.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl LruIndex. +//! Methods of `LruIndex`: `seed_existing`, `is_pristine`, `load_seed`, `seed_insert` and 5 more. +//! Split out of `cache_lru_index` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/slot.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/slot.rs index 359caf86..1aeb438a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/slot.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_lru_index/slot.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn slot. +//! Functions: `slot`. +//! Split out of `cache_lru_index` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Error, MAX_KEYS, MoeWeightDescriptor, PER_LAYER, Result}; pub(super) fn slot(key: MoeWeightDescriptor) -> Result { let layer = usize::try_from(key.layer).map_err(|_| Error::Overflow)?; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/dense_copies_equal.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/dense_copies_equal.rs index 1bafc7cf..49ff3200 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/dense_copies_equal.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/dense_copies_equal.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn dense_copies_equal, impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `share_rt_mtp_dense`, `share_entry`, `device_copies_equal`, `adopt_rt_buffer` and 2 ... +//! Functions: `dense_copies_equal`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/retained_original_mtp_weights.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/retained_original_mtp_weights.rs index 66faa2cd..eee43417 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/retained_original_mtp_weights.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_mtp_weights/retained_original_mtp_weights.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl RetainedOriginalMtpWeights, fn rt_kind. +//! Methods of `RetainedOriginalMtpWeights`: `from_rt_bank`, `rt_dense`, `rt_extras`, `dense_file_bytes` and 11 more. +//! Functions: `rt_kind`. Defines `HeadBinding`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weight_cache.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weight_cache.rs index 47767cc0..5f9a50cd 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weight_cache.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weight_cache.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `new_original_prompt_arena`, `retained_bank_mapping`, `arena_workspace`, `attach_are... +//! Functions: `arena_driver_error`, `shared_descriptors`, `shared_bytes`. Defines `ArenaPlan`, `ExpertBankMapping`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weights_original_prompt.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weights_original_prompt.rs index b9d004ec..b9b5fe56 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weights_original_prompt.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/moe_weights_original_prompt.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (2). +//! Methods of `MoeWeightCache`: `original_prompt_moe`, `original_prompt_parts`, `original_prompt_precheck`. +//! Functions: `raw_weight`, `shared_formats`, `shared_weights`. #[allow(unused_imports)] use super::prompt_layer_fns::{PromptIo, PromptParts, PromptWeightOwners, SpanScan, run_prompt_layer}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/prompt_stream_settings.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/prompt_stream_settings.rs index ba2e046a..c8626a2e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/prompt_stream_settings.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_original_prompt/prompt_stream_settings.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn prompt_stream_settings, fn native_format, fn span_cache_enabled, fn -//! set_span_cache_override. +//! Functions: `prompt_stream_settings`, `native_format`, `span_cache_enabled`, `set_span_cache_override`. +//! Split out of `cache_original_prompt` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/ranked_profile.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/ranked_profile.rs index 96965101..54861722 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/ranked_profile.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/ranked_profile.rs @@ -1,7 +1,9 @@ -//! Moved out of the parent module by STRA-338: impl RankedProfile, impl PrefixPlan. +//! Methods of `RankedProfile`: `parse`, `check_header`, `parse_pair`, `ordered_pairs` and 1 more. +//! Methods of `PlanBudget`: `capacity`, `new`. Defines `PlanBudget`. -#[allow(unused_imports)] -use super::*; +use super::{ + Digest, EXPERTS, Error, HOST_CAP, LAYERS, PAIRS, PrefixPlan, ProfileLimits, RankedProfile, Result, Sha256, +}; const RANKED_BASE: usize = 24 + PAIRS * 4; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/shared_permanent_pool.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/shared_permanent_pool.rs index e2c69593..37bd6688 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/shared_permanent_pool.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile/shared_permanent_pool.rs @@ -1,8 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl SharedPermanentPool, fn remaining_shared_main, fn -//! learned_main_slot_bound. +//! Methods of `SharedPermanentPool`: `new`, `contains`, `quartet`, `descriptor_count` and 7 more. +//! Functions: `remaining_shared_main`, `learned_main_slot_bound`. -#[allow(unused_imports)] -use super::*; +use super::{Error, LAYERS, MoeWeightDescriptor, Result, RoleTraffic, SHARED_MAX_BYTES, SharedPermanentPool}; impl SharedPermanentPool { pub(in super::super) fn new(descriptors: Vec<[MoeWeightDescriptor; 4]>) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/learned_main_lru_profile.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/learned_main_lru_profile.rs index c636ebb9..ebec66d8 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/learned_main_lru_profile.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/learned_main_lru_profile.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache, impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `new_profile_shared_permanent_learned_main_lru`, `learned_main_totals`, `check_learn... +//! Split out of `cache_profile_fill` to keep its files under the line limit. #[allow(unused_imports)] #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache.rs index f6b73f10..5e97c6ff 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Groups the submodules `pinned_triplet_preload`, `profile_ranked_fill_and_pool`. +//! Split out of `cache_profile_fill` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/pinned_triplet_preload.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/pinned_triplet_preload.rs index ea7e081e..c1976144 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/pinned_triplet_preload.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/pinned_triplet_preload.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (2). +//! Methods of `MoeWeightCache`: `preload_pinned_triplet`, `admit_pinned_triplet`, `pinned_layouts`, `check_pinned_ro... +//! Defines `PinnedLayouts`, `PinnedSource`, `PinnedAdmission`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/profile_ranked_fill_and_pool.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/profile_ranked_fill_and_pool.rs index 4cb84190..9493d790 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/profile_ranked_fill_and_pool.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/moe_weight_cache/profile_ranked_fill_and_pool.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `new_native_integer_iq3_mmq_retained_mtp_kv_shared_tail_profile`, `new_native_intege... +//! Functions: `ranked_keys`. Defines `MapReservation`, `ProfileFill`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/profile_window_spill.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/profile_window_spill.rs index b28629f1..68fe85a5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/profile_window_spill.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/profile_window_spill.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn profile_window_spill, fn profile_window_spill_with_floor. +//! Functions: `profile_window_spill`, `profile_window_spill_with_floor`. +//! Split out of `cache_profile_fill` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/shared_quartet_preload.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/shared_quartet_preload.rs index e4f6962a..be970cc5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/shared_quartet_preload.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/shared_quartet_preload.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `new_native_integer_iq3_mmq_retained_mtp_kv_shared_tail_profile_mtp_input_spill_floo... +//! Defines `QuartetRoom`. #[allow(unused_imports)] #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/strata_adaptive_shared_pool.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/strata_adaptive_shared_pool.rs index 4baf9c9d..fe340f66 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/strata_adaptive_shared_pool.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_profile_fill/strata_adaptive_shared_pool.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `new_native_strata_adaptive_shared_permanent`, `new_native_strata_adaptive_shared_pe... +//! Functions: `adaptive_template`. Defines `AdaptivePlan`, `SharedKeys`. #[allow(unused_imports)] use super::profile_build::ProfileFile; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache.rs index aaa0ac77..8edda57d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl AdaptiveCache. +//! Methods of `AdaptiveCache`: `preload`, `unpublished`, `validate`, `revalidate_keys` and 19 more. +//! Defines `StagedPairs`, `Staged`, `UploadReserve` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + ADAPT_EVERY, ADAPT_SWAPS, AdaptiveCache, AdaptivePolicy, AdaptiveSizing, AdaptiveWitness, CachedMoeMatrix, Context, + DeviceBuffer, Error, HOST_CAP, ModelBinding, MoeExpertSelection, MoeExpertWeights, MoeMatrixRole, + MoeWeightDescriptor, OwnedCopyPoll, Result, Swap, Transfer, WORKING_RESERVE, binding_error, blob_bytes, cell, + driver_error, reserve, +}; #[path = "adaptive_cache/preload.rs"] mod preload; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache/preload.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache/preload.rs index 03db0acb..5f484479 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache/preload.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/adaptive_cache/preload.rs @@ -1,7 +1,9 @@ //! Slot preload phases of the adaptive cache: reservation, per-role admission and upload. -#[allow(unused_imports)] -use super::*; +use super::{ + ADAPT_SWAPS, AdaptiveCache, AdaptivePolicy, DeviceBuffer, Error, HOST_CAP, ModelBinding, MoeWeightDescriptor, + Reserved, Result, Transfer, UploadReserve, WORKING_RESERVE, binding_error, driver_error, reserve, +}; impl<'ctx> AdaptiveCache<'ctx> { pub(super) fn reserve_owners(policy: &AdaptivePolicy, external_metadata: usize) -> Result> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/reserve.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/reserve.rs index 8533f840..30892856 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/reserve.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/reserve.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn reserve, fn cell, fn blob_bytes, impl AdaptivePolicy. +//! Methods of `AdaptivePolicy`: `new`, `template_charges`, `initial_slots_for`, `measure_metadata` and 13 more. +//! Functions: `reserve`, `cell`, `blob_key_identity_ok`, `blob_key_shape_ok` and 2 more. Defines `InitialSlots`. -#[allow(unused_imports)] -use super::*; +use super::{ + ADAPT_EVERY, ADAPT_SWAPS, AdaptivePolicy, CELLS, EXPERTS, Error, HOST_CAP, LAYERS, MoeWeightDescriptor, PrefixPlan, + ProfileLimits, RankedProfile, Result, Slot, Swap, +}; pub(super) fn reserve(count: usize) -> Result> { let mut v = Vec::new(); diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/transfer_metadata_bound.rs b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/transfer_metadata_bound.rs index 3bae9aab..bcbb6a6a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/transfer_metadata_bound.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/cache_strata_adaptive/transfer_metadata_bound.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn transfer_metadata_bound. +//! Functions: `transfer_metadata_bound`. +//! Split out of `cache_strata_adaptive` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ADAPT_SWAPS, Transfer}; pub(in super::super) fn transfer_metadata_bound() -> usize { ADAPT_SWAPS * std::mem::size_of::>() diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_slab_policy.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_slab_policy.rs index 2caed67a..a22f67fb 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_slab_policy.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_slab_policy.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn dense_slab_policy, fn startup_step. +//! Functions: `dense_slab_policy`, `startup_step`. +//! Split out of `dense_weight_cache` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods.rs index ba4cf56b..8d9a666b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache. +//! Groups the submodules `dense_cache_buffers_and_close`, `dense_cache_eager_layer_load`, `dense_cache_gdn_qsa_works... +//! Split out of `dense_weight_cache` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_buffers_and_close.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_buffers_and_close.rs index c5671290..6aa87b3f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_buffers_and_close.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_buffers_and_close.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache (7). +//! Methods of `DenseWeightCache`: `gr_buffers`, `counters`, `chunk_modules`, `close` and 4 more. +//! Functions: `close_into`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_eager_layer_load.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_eager_layer_load.rs index 82fff4dd..d2c04e14 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_eager_layer_load.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_eager_layer_load.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache (3). +//! Methods of `DenseWeightCache`: `new_with_selected`, `unloaded`, `load_eager`, `reserve_layer_tables` and 6 more. +//! Functions: `reserve_table`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_gdn_qsa_workspaces.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_gdn_qsa_workspaces.rs index c0012fa6..3fb8b921 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_gdn_qsa_workspaces.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_gdn_qsa_workspaces.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache (5). +//! Methods of `DenseWeightCache`: `gdn_batch_resources`, `qsa_native_workspace`, `test_record_gr_batch_completed`, `... +//! Split out of `dense_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_matrix_registration.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_matrix_registration.rs index 975185a3..81e7c176 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_matrix_registration.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_matrix_registration.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache (4). +//! Methods of `DenseWeightCache`: `add`, `add_f32`, `add_bf16`, `add_gr` and 13 more. Defines `ExpectedPleMatrix`. +//! Split out of `dense_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_ple_and_verify_weights.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_ple_and_verify_weights.rs index 1a73325a..816d8ed4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_ple_and_verify_weights.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_ple_and_verify_weights.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache (6). +//! Methods of `DenseWeightCache`: `ple`, `ple_key`, `ple_value`, `ple_value_tile` and 16 more. +//! Functions: `gdn_native_type`, `qsa_native_type`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_prompt_and_gdn_scratch.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_prompt_and_gdn_scratch.rs index 6e71fae7..b4774df9 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_prompt_and_gdn_scratch.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_cache_prompt_and_gdn_scratch.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache (2). +//! Methods of `DenseWeightCache`: `new_original_prompt_capacity`, `load_prompt_owners`, `load_prompt_workspaces`, `l... +//! Split out of `dense_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_weight_cache_constructors.rs b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_weight_cache_constructors.rs index 573b3e7b..166ba461 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_weight_cache_constructors.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/dense_weight_cache/dense_weight_cache_methods/dense_weight_cache_constructors.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseWeightCache. +//! Methods of `DenseWeightCache`: `new`, `new_qsa_selected`, `new_qsa_selected_router`, `new_qsa_selected_router_gr_... +//! Split out of `dense_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor/prefill_step_product.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor/prefill_step_product.rs index 01ec6777..10479cfe 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor/prefill_step_product.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor/prefill_step_product.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl PrefillStepProduct, impl TargetStepProduct, fn diagnose. +//! Methods of `PrefillStepProduct`: `mtp_source`. +//! Methods of `TargetStepProduct`: `test_prefix_residual`, `mtp_source`, `predicted`, `position` and 1 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward.rs index 1414440a..b18b5b57 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenForward. +//! Groups the submodules `qwen_forward_reset`, `step_core`, `step_entries`. +//! Split out of `executor` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward/qwen_forward_reset.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward/qwen_forward_reset.rs index 9af2c91c..2a09389f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward/qwen_forward_reset.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor/qwen_forward/qwen_forward_reset.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenForward (3). +//! Methods of `QwenForward`: `reset`. +//! Split out of `qwen_forward` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor/read_layer_attention.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor/read_layer_attention.rs index b32f0f28..fb3245dc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor/read_layer_attention.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor/read_layer_attention.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn read_layer_attention, fn prepare_layer_attention_micro, fn -//! validate_layer_plan, fn validate_descriptors. +//! Functions: `read_layer_attention`, `read_layer_one`, `prepare_layer_attention_micro`, `prepare_layer_one_micro` a... +//! Defines `LayerEntry`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor.rs index dff5281f..007fa65c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor. +//! Groups the submodules `construction_and_parking`, `prompt_executor_forward_and_close`, `prompt_executor_retire_ow... +//! Split out of `original_prompt` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking.rs index c65a5417..6e232caf 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor. +//! Groups the submodules `executor_construction`, `session_park_and_qsa_owners`. +//! Split out of `original_prompt_executor` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/executor_construction.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/executor_construction.rs index 077cd6a8..2de80d8c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/executor_construction.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/executor_construction.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor. +//! Methods of `OriginalPromptExecutor`: `new`, `new_with_mtp_weights`, `check_construction`, `empty` and 17 more. +//! Split out of `construction_and_parking` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/session_park_and_qsa_owners.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/session_park_and_qsa_owners.rs index 37a30ccc..df444b1f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/session_park_and_qsa_owners.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/construction_and_parking/session_park_and_qsa_owners.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor (2). +//! Methods of `OriginalPromptExecutor`: `take_qsa_owners`, `adopt_qsa_owners`, `rebuild_qsa_layers`, `checkpoint_ses... +//! Defines `QsaOwners`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close.rs index b163aca0..fe654b3e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor (2). +//! Groups the submodules `prompt_chunk_forward`, `prompt_executor_close`. +//! Split out of `original_prompt_executor` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_chunk_forward.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_chunk_forward.rs index 588698cd..2cbc9f37 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_chunk_forward.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_chunk_forward.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor. +//! Methods of `OriginalPromptExecutor`: `forward`, `arena_holds_window`, `admit_window`, `finish_forward` and 4 more. +//! Functions: `trace_step`, `arena_serves_chunk`, `trace_error`. Defines `ForwardDone`, `StagedRows`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_executor_close.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_executor_close.rs index 76d30ca0..69beec37 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_executor_close.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_forward_and_close/prompt_executor_close.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor (2). +//! Methods of `OriginalPromptExecutor`: `close`. +//! Split out of `prompt_executor_forward_and_close` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_retire_owners.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_retire_owners.rs index 43c80f39..c169895c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_retire_owners.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor/prompt_executor_retire_owners.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor (3). +//! Methods of `OriginalPromptExecutor`: `close_inner`, `retire_device_owners`, `retire_mtp_and_layers`. +//! Split out of `original_prompt_executor` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor_drop.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor_drop.rs index 87784906..508412e6 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor_drop.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/original_prompt_executor_drop.rs @@ -1,6 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Drop_for_OriginalPromptExecutor, impl OriginalPromptPending, impl -//! Drop_for_OriginalPromptPending, impl OriginalPromptHooks_for_NoPromptHooks, impl crate_backend_original_prompt, fn -//! run_original_prompt .... +//! Methods of `OriginalPromptPending`: `publish`. +//! Implements `Drop for OriginalPromptExecutor`, `Drop for OriginalPromptPending` and 2 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/staged_input_enabled.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/staged_input_enabled.rs index d913f24d..b0c01a68 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/staged_input_enabled.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_original_prompt/staged_input_enabled.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn staged_input_enabled. +//! Functions: `staged_input_enabled`. +//! Split out of `original_prompt` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/check_chunk_on_loaded.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/check_chunk_on_loaded.rs index 39b84303..98430e36 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/check_chunk_on_loaded.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/check_chunk_on_loaded.rs @@ -1,6 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn check_chunk_on_loaded. -//! -//! STRA-338 size: the check runs as a scalar baseline, the two cancellation checks and the chunk comparison. +//! Methods of `Ids`: `new`, `position`. +//! Methods of `Rig`: `snapshot`, `prefill`, `step_final`, `prefill_chunk` and 7 more. #![cfg(all(test, any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_micro_ffn_rows.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_micro_ffn_rows.rs index f359f7c2..906e7d78 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_micro_ffn_rows.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_micro_ffn_rows.rs @@ -1,7 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn prepare_micro_ffn_rows. -//! -//! STRA-338 size: the phases live in the child modules: the attention blocks (native GDN, native QSA or row by row), -//! then the FFN read of the retained bank and the routing of every row. +//! Methods of `MicroRows`: `reserve`, `push`, `collect`, `inject`. Functions: `prepare_micro_ffn_rows`. +//! Defines `MicroEnv`, `MicroSources`, `MicroBlockSources` and 2 more. #![cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_q6_layer_columns.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_q6_layer_columns.rs index 22266d26..81c16cc4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_q6_layer_columns.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/prepare_q6_layer_columns.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn prepare_q6_layer_columns. +//! Functions: `prepare_q6_layer_columns`, `q6_inputs`, `q6_roles`, `q6_project` and 1 more. +//! Split out of `prefill_chunk` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward.rs index d7f1835a..74b0560d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenForward. +//! Groups the submodules `joint_chunk`, `prefill_chunk_cached_windowed`, `prefill_chunk_native_windowed` and 1 more. +//! Split out of `prefill_chunk` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_cached_windowed.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_cached_windowed.rs index bbbe8e2b..3993333a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_cached_windowed.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_cached_windowed.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenForward. +//! Methods of `QwenForward`: `test_chunk_on_loaded`, `prefill_chunk_mmq_joint`, `prefill_chunk_cached_joint`, `prepa... +//! Split out of `qwen_forward` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_native_windowed.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_native_windowed.rs index 546dc25b..e88a4942 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_native_windowed.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_native_windowed.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenForward (2). +//! Methods of `QwenForward`: `prefill_chunk_native_integer_iq3_windowed256_retained_gr_joint`, `prepare_prefill_chun... +//! Split out of `qwen_forward` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_planned.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_planned.rs index 2a75ef02..5a107cef 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_planned.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/qwen_forward/prefill_chunk_planned.rs @@ -1,7 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenForward (3). -//! -//! `prepare_prefill_chunk_with_policy_windowed` is the batched prefill of one chunk. STRA-338 size: its phases live in -//! the child modules, in the order they run: setup, layer loop, window attention, window FFN rows, expert execution. +//! Methods of `ChunkEnv`: `new`, `with_boundary`, `native_prompt`. Methods of `ChunkRun`: `window`. +//! Defines `MicroBank`, `MicroBank`, `NativeMoe` and 6 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/read_chunk_attention_ffn.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/read_chunk_attention_ffn.rs index f36b111f..20f5e318 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/read_chunk_attention_ffn.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/read_chunk_attention_ffn.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn read_chunk_attention_ffn, impl QwenForward. +//! Methods of `AttentionHandoff`: `new`. +//! Methods of `QwenForward`: `test_layer0_pair_on_loaded`, `run_layer0_diagnostic`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/target_step_product.rs b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/target_step_product.rs index caa3d87b..19afb783 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/target_step_product.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/executor_prefill_chunk/target_step_product.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl TargetStepProduct, fn chunk_diagnostic. +//! Methods of `TargetStepProduct`: `from_chunk_commit`. Functions: `chunk_diagnostic`. +//! Split out of `prefill_chunk` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/cached_step.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/cached_step.rs index 63aa28cf..9f03f6fb 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/cached_step.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/cached_step.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn step_cached, fn project_chain_input, fn preflight_budget. +//! Methods of `CachedGdn`: `project`, `run`, `leading_products`, `recurrence` and 3 more. +//! Functions: `step_cached`, `open_chain`, `settle_cached`, `chain_output_role` and 3 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/driver_error.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/driver_error.rs index f25aedf4..af9719f4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/driver_error.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/driver_error.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn driver_error, fn validate_candidates, fn state_index, fn key_head. +//! Functions: `driver_error`, `validate_candidates`, `state_index`, `key_head`. +//! Split out of `gdn` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gates.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gates.rs index c32eb447..da5ce83d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gates.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gates.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn gates, fn recur, fn out_norm, fn allocate, fn upload, fn -//! pool_enabled .... +//! Methods of `RecurHost`: `validate`, `upload_all`. +//! Functions: `gates`, `upload_gate_inputs`, `run_gate_kernels`, `release_owned` and 16 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gdn_ready.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gdn_ready.rs index 27728da5..64125c6d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gdn_ready.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/gdn_ready.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnReady. +//! Methods of `GdnReady`: `identity`, `output`, `validate_origin`, `take_pending`. +//! Split out of `gdn` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/projection.rs index cf4a99e4..5e16ba82 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/projection.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project, fn dispatch_projection, fn project_retained, fn convolve, -//! fn normalize_qk. +//! Methods of `ProjectionOperands`: `without_cache`. +//! Functions: `project`, `project_leased`, `project_uploaded`, `upload_matrix_block` and 10 more. use super::gates::{release_with_owned, upload_unless_resident}; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/stage_steps.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/stage_steps.rs index e0f464b8..76124595 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn/stage_steps.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn/stage_steps.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnStage. +//! Methods of `GdnStage`: `step_chunk_selected`, `step`, `step_projected`, `step_impl` and 4 more. +//! Split out of `gdn` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/allocate_qk_slot.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/allocate_qk_slot.rs index c1fb57a8..f0041212 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/allocate_qk_slot.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/allocate_qk_slot.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn allocate_qk_slot, fn normalize_retained_qk, impl QkScratch, impl -//! Role, impl Product, impl RecurrenceBorrow .... +//! Methods of `QkScratch`: `test_slot_bytes`, `new`, `validate`, `take` and 2 more. Methods of `Role`: `count`. +//! Functions: `allocate_qk_slot`, `normalize_retained_qk`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain.rs index 5730e7b4..74c72e31 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Chain. +//! Groups the submodules `chain_construction_and_buffers`, `chain_projection_convolution`, `chain_readout_and_finish... +//! Split out of `chain` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_construction_and_buffers.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_construction_and_buffers.rs index db3eb7cd..67ea5185 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_construction_and_buffers.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_construction_and_buffers.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Chain. +//! Methods of `Chain`: `new`, `validate`, `set_verification_pool`, `return_fixed` and 15 more. +//! Split out of `chain` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_projection_convolution.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_projection_convolution.rs index cd0ede09..70d3cb7c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_projection_convolution.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_projection_convolution.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Chain (3). +//! Methods of `Chain`: `upload_values`, `note`, `note_err`, `free` and 10 more. +//! Split out of `chain` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_readout_and_finish.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_readout_and_finish.rs index f3b32b96..182cdeac 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_readout_and_finish.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_readout_and_finish.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Chain (4). +//! Methods of `Chain`: `import_chunk_readout`, `out_norm`, `drain`, `finish`. +//! Split out of `chain` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_row_queue.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_row_queue.rs index 7b3c2efe..f58f7126 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_row_queue.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain/chain_row_queue.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Chain (2). +//! Methods of `Chain`: `run_row_queue`, `reserve_row_slots`, `drain_row_queue`, `row_input_buffers` and 12 more. +//! Functions: `check_distinct_slots`. Defines `RowSlots`, `RowInputBuffers`, `RowOutputBuffers`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain_drop.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain_drop.rs index e6118358..c8796370 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain_drop.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chain/chain_drop.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Drop_for_Chain. +//! Implements `Drop for Chain`. +//! Split out of `chain` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods.rs index 16e8bc5e..1df139a3 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnChunkDevice. +//! Groups the submodules `chunk_device_batch_compute`, `chunk_device_construction`, `chunk_device_finish_cleanup`. +//! Split out of `chunk_device` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_batch_compute.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_batch_compute.rs index d03b6c7e..4969f312 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_batch_compute.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_batch_compute.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnChunkDevice (2). +//! Methods of `GdnChunkDevice`: `finish_batch`, `history`, `step_source`, `read_checked` and 13 more. +//! Split out of `gdn_chunk_device_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_construction.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_construction.rs index 4116ea7a..2f97e217 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_construction.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_construction.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnChunkDevice. +//! Methods of `GdnChunkDevice`: `new`, `empty`, `copy_history`, `take_prior_owners` and 16 more. +//! Split out of `gdn_chunk_device_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_finish_cleanup.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_finish_cleanup.rs index 09722905..75cd9a18 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_finish_cleanup.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/gdn_chunk_device_methods/chunk_device_finish_cleanup.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnChunkDevice (3). +//! Methods of `GdnChunkDevice`: `finish`, `sealed_prior`, `return_scratch_and_guard`, `adopt_final_state` and 5 more. +//! Split out of `gdn_chunk_device_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/mirror_reuse_enabled.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/mirror_reuse_enabled.rs index 2574b718..365f5b27 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/mirror_reuse_enabled.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/mirror_reuse_enabled.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn mirror_reuse_enabled, impl ChunkEdge, fn micro_rows, impl -//! ChunkReadout, impl Drop_for_ChunkReadout. +//! Methods of `ChunkEdge`: `into_parts`, `into_row`. Methods of `ChunkReadout`: `into_parts`, `same_owner`. +//! Implements `Drop for ChunkReadout`. Functions: `mirror_reuse_enabled`, `micro_rows`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/native_fused_step.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/native_fused_step.rs index 88adf0e4..d132602b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/native_fused_step.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_device/native_fused_step.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Drop_for_GdnChunkDevice, impl GdnChunkDevice. +//! Methods of `GdnChunkDevice`: `bind_native_fused`, `native_fused_operands`, `complete_native_fused_step`. +//! Implements `Drop for GdnChunkDevice`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/batch_adoption.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/batch_adoption.rs index 98074b91..54cff189 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/batch_adoption.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/batch_adoption.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn batch_adoption. +//! Functions: `batch_adoption`, `adoption_rows`, `adoption_phase`, `batch_operand_guards` and 6 more. +//! Split out of `numeric_gpu` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/exercise.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/exercise.rs index 54b28719..fe326ba3 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/exercise.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/exercise.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn exercise, fn run_gdn_chunk_numeric. +//! Methods of `Fixture`: `new`, `row_guards`, `run_rows`, `compute_row` and 12 more. +//! Functions: `require_rejected_clean`, `exercise`, `run_gdn_chunk_numeric`. Defines `Fixture`, `ComputedRow`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/operands.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/operands.rs index 311e1492..8ebe6aec 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/operands.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_chunk_numeric_gpu/operands.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn operands, fn convolution_input, fn convolution_weights, fn -//! difference, fn require, fn reference .... +//! Methods of `Operands`: `recurrence`. +//! Functions: `operands`, `convolution_input`, `convolution_weights`, `difference` and 3 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/buffers.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/buffers.rs index d0122590..86d432f0 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/buffers.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/buffers.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Buffers, fn release_pool. +//! Methods of `Buffers`: `allocated_bytes`, `new`, `pool_sizes`, `from_pool` and 1 more. Methods of `Images`: `take`. +//! Functions: `next_buffer`, `release_pool`. Defines `PoolIter`, `Images`, `Projections` and 1 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_batch_resources.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_batch_resources.rs index d917d02b..c0179af6 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_batch_resources.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_batch_resources.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnBatchResources, fn admit_batch_bytes, impl -//! Drop_for_GdnBatchResources, fn native_format, fn batch_device_bytes, fn f32_bytes. +//! Methods of `GdnBatchResources`: `new`, `new_for_prompt`, `new_capacity`, `admit_capacity` and 8 more. +//! Implements `Drop for GdnBatchResources`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_stage.rs index f10221ac..a070706b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_prefill_batch/gdn_stage.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnStage. +//! Methods of `GdnStage`: `step_chunk_batch`. +//! Split out of `prefill_batch` to keep its files under the line limit. #[allow(unused_imports)] use super::step_batch::{ diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods.rs index c32acff2..ef167ce7 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl GdnStateMirror. +//! Groups the submodules `state_mirror_compute_and_admit`, `state_mirror_publish_and_close`. +//! Split out of `mirror` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Cell, Context, DeviceBuffer, Error, GdnPending, GdnPrior, GdnStateKey, GdnStateMirror, + MIRROR_BYTES, MirrorAuthority, MirrorNext, MirrorReadout, PendingContents, Rc, RecurrenceOperands, Result, + STATE_ELEMENTS, StepBuffers, TokenLayer, VALUES, allocate, download, driver_error, preflight_budget, + upload_checked, validate_values, +}; #[path = "gdn_state_mirror_methods/state_mirror_compute_and_admit.rs"] mod state_mirror_compute_and_admit; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_compute_and_admit.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_compute_and_admit.rs index ca77be15..9af89767 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_compute_and_admit.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_compute_and_admit.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl GdnStateMirror. +//! Methods of `GdnStateMirror`: `new`, `allocate_mirror`, `compute`, `compute_retained` and 13 more. +//! Split out of `gdn_state_mirror_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Cell, Context, DeviceBuffer, Error, GdnPrior, GdnStateMirror, MIRROR_BYTES, MirrorNext, + MirrorReadout, Rc, RecurrenceOperands, Result, STATE_ELEMENTS, StepBuffers, TokenLayer, VALUES, allocate, download, + driver_error, preflight_budget, upload_checked, validate_values, +}; impl<'ctx> GdnStateMirror<'ctx> { pub(in crate::qwen_forward) fn new( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_publish_and_close.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_publish_and_close.rs index 0d6ee25d..afc3ac2a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_publish_and_close.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/gdn_state_mirror_methods/state_mirror_publish_and_close.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl GdnStateMirror (2). +//! Methods of `GdnStateMirror`: `compute_borrowed`, `step_products`, `publish`, `admit_publish` and 5 more. +//! Split out of `gdn_state_mirror_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DeviceBuffer, Error, GdnPending, GdnPrior, GdnStateKey, GdnStateMirror, MIRROR_BYTES, MirrorAuthority, + MirrorNext, MirrorReadout, PendingContents, Result, STATE_ELEMENTS, StepBuffers, TokenLayer, VALUES, allocate, + driver_error, validate_values, +}; impl<'ctx> GdnStateMirror<'ctx> { pub(in super::super::super) fn compute_borrowed( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/mirror_readout.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/mirror_readout.rs index 51288de2..a61eec38 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/mirror_readout.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/mirror_readout.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MirrorReadout, impl Drop_for_MirrorReadout. +//! Methods of `MirrorReadout`: `test_values`, `into_parts`, `same_owner`, `into_host`. +//! Implements `Drop for MirrorReadout`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/upload_checked.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/upload_checked.rs index 6f597d4c..fd54ab2f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/upload_checked.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_state_mirror/upload_checked.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn upload_checked. +//! Functions: `upload_checked`. +//! Split out of `mirror` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Cell, Context, DeviceBuffer, Error, Result, driver_error}; pub(super) fn upload_checked<'ctx>( context: &'ctx Context<'ctx>, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row.rs index 5647affc..c90e18a5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn compute_row, impl ActiveLease, impl VerifiedRow, impl Workspace, -//! impl Drop_for_Workspace, impl ReplaySeal .... +//! Groups the submodules `verified_row_compute_and_lease`, `workspace`, `workspace_replay`. +//! Split out of `verification` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/verified_row_compute_and_lease.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/verified_row_compute_and_lease.rs index 95906dff..b2453b9b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/verified_row_compute_and_lease.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/verified_row_compute_and_lease.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn compute_row, impl ActiveLease, impl VerifiedRow. +//! Methods of `ActiveLease`: `validate`, `refuse`. Methods of `VerifiedRow`: `history`, `validate`. +//! Functions: `compute_row`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace.rs index da045100..3b5f5d91 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Workspace. +//! Methods of `Workspace`: `new`, `empty`, `reserve_slot_tables`, `allocate_owners` and 15 more. +//! Split out of `compute_row` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace_replay.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace_replay.rs index 9dd91c6f..bf3ecb19 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace_replay.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/compute_row/workspace_replay.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Workspace (2), impl Drop_for_Workspace, impl ReplaySeal, impl -//! PoolRow, impl Drop_for_PoolRow. +//! Methods of `Workspace`: `replay`, `replayed_prior`, `replay_row`, `settle_replay` and 9 more. +//! Methods of `ReplaySeal`: `validate_prior`. Implements `Drop for Workspace`, `Drop for PoolRow`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/workspace.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/workspace.rs index 1a430da0..7526b288 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/workspace.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gdn_verification/workspace.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Workspace. +//! Methods of `Workspace`: `bind_native_fused`. +//! Split out of `verification` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/diagnose.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/diagnose.rs index e83515ce..50c757a2 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/diagnose.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/diagnose.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: fn diagnose, fn diagnose_extrema, impl GrScratch, impl -//! Drop_for_GrScratch, impl GrRead. +//! Methods of `GrScratch`: `new`, `new_identity`, `allocate_owned`, `buffer` and 5 more. +//! Methods of `GrRead`: `ready`, `finish`. Implements `Drop for GrScratch`. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Cell, Context, DeviceBuffer, Error, GR_INJECT_BYTES, GR_OUTPUT_BYTES, GR_OWNED_DEVICE_BYTES, + GrPhase, GrRead, GrScratch, InjectedResidual, ModelBinding, Rc, RefCell, ResidualReady, Result, admit_budget, + driver_error, release_all, validate_streams, +}; pub(super) fn diagnose(phase: GrPhase, result: Result) -> Result { result.inspect_err(|error| { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/download_f32.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/download_f32.rs index 92a47dce..6996c3e0 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/download_f32.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/download_f32.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn download_f32, fn driver_error, fn binding_error, fn -//! validate_values, fn validate_layer, fn validate_streams .... +//! Methods of `GrStage`: `validate_detached_ffn`, `validate_ffn_ready`. +//! Functions: `download_f32`, `driver_error`, `binding_error`, `validate_values` and 2 more. -#[allow(unused_imports)] -use super::*; +use super::{ + DetachedGrRead, DeviceBuffer, Dimension, DriverError, Error, GrRole, GrStage, InputBindingError, LayerId, + ModelBinding, QwenStepTxn, ResidualReady, Result, Stage, +}; pub(super) fn download_f32(buffer: &DeviceBuffer<'_>, count: usize) -> Result> { let byte_count = count.checked_mul(4).ok_or(Error::Overflow)?; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/gr_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/gr_stage.rs index a373da11..04b4fff7 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/gr_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/gr_stage.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GrStage. +//! Methods of `GrStage`: `apply`, `read_ffn`, `read_attention`, `read_attention_after_ple` and 6 more. +//! Functions: `copy_streams`, `resolve_gr_weights`, `read_candidate`, `check_injection_origin` and 2 more. #[allow(unused_imports)] use super::super::dense_weight_cache::GrResident; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu.rs index 895e2b2f..0c79ccd4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Functions: `run_proof`, `compare_outputs`, `release_owners`, `original_first_fixed_outputs_repeat_overwrite_abort... +//! Defines `Tally`. use super::*; use leleka_cuda_driver::Driver; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/check_handoff.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/check_handoff.rs index f993c48f..9b430423 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/check_handoff.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/check_handoff.rs @@ -1,7 +1,18 @@ -//! Moved out of the parent module by STRA-338: fn check_handoff. +//! Functions: `check_handoff`, `handoff_reference`, `residual_differences`, `ffn_differences`. +//! Split out of `output_workspace_gpu` to keep its files under the line limit. +use super::{ + BindingIdentity, Context, DeviceBuffer, Error, GR_OUTPUT_DEVICE_BYTES, GrScratch, ReadCandidate, Result, block, + download_f32, driver_error, fresh_inject, fresh_read, poison_all, read_cached_cuda, retained_handoff, streams, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AttentionBlockOutput, Cell, DenseWeightCache, DetachedGrRead, Dimension, Driver, DriverError, GrBatchRow, + GrMicroAttention, GrMicroAttentionBank, GrMicroAttentionBlock, GrMicroBlock, GrMicroInput, GrRole, GrWeights, + InputBindingError, LayerId, MicroBlockRequest, ModelBinding, PleReady, QwenStepTxn, Rc, RefCell, RefMut, Stage, + TokenLayer, coefficients, +}; pub(super) fn check_handoff<'ctx>( scratch: &mut GrScratch<'ctx>, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/fresh_read.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/fresh_read.rs index c7ea7a09..769e3688 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/fresh_read.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/output_workspace_gpu/fresh_read.rs @@ -1,7 +1,15 @@ -//! Moved out of the parent module by STRA-338: fn fresh_read, fn fresh_inject, fn block, fn coefficients, fn streams. +//! Functions: `fresh_read`, `release_reverse`, `fresh_read_launch`, `queue_fresh_read` and 5 more. +//! Split out of `output_workspace_gpu` to keep its files under the line limit. +use super::{Context, DeviceBuffer, Error, GR_OUTPUT_BYTES, GrScratch, Result, download_f32, driver_error, upload_f32}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AttentionBlockOutput, BindingIdentity, Cell, DenseWeightCache, DetachedGrRead, Dimension, Driver, DriverError, + GrBatchRow, GrMicroAttention, GrMicroAttentionBank, GrMicroAttentionBlock, GrMicroBlock, GrMicroInput, GrRole, + GrWeights, InputBindingError, LayerId, MicroBlockRequest, ModelBinding, PleReady, QwenStepTxn, Rc, RefCell, RefMut, + Stage, TokenLayer, +}; pub(super) fn fresh_read( context: &Context<'_>, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cached_cuda.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cached_cuda.rs index cb588faf..1bc8ae74 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cached_cuda.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cached_cuda.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn read_cached_cuda, fn inject_cached_cuda, fn copy_cached_f32, fn -//! upload_cached_f32, fn release_all, fn admit_budget .... +//! Functions: `read_cached_cuda`, `borrow_read_outputs`, `borrow_read_inject`, `cached_read_body` and 12 more. +//! Split out of `gr` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cuda.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cuda.rs index 06430a13..167e5ada 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cuda.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/read_cuda.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn read_cuda. +//! Methods of `OwnedReadWeights`: `upload`, `select`, `release`. +//! Methods of `ReadWork`: `allocate`, `norm_down_silu`, `up_gates`, `release`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/residual_ready.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/residual_ready.rs index 9709966a..470e7651 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/residual_ready.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/residual_ready.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ResidualReady, impl InjectedResidual. +//! Methods of `ResidualReady`: `oracle_inject`, `validate_origin`, `identity`, `streams` and 1 more. +//! Methods of `InjectedResidual`: `from_candidates`, `validate_origin`, `identity`, `streams`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr/tests.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr/tests.rs index 813a3a55..c1c260cd 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr/tests.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr/tests.rs @@ -1,4 +1,4 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Unit tests of `gr`. use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_micro_input.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_micro_input.rs index 8231fe8f..7f0837fc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_micro_input.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_micro_input.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl GrMicroInput, impl GrMicroAttention, impl GrMicroDevice, fn -//! save_micro_values, fn micro_driver_error, impl GrMicroAttentionBank .... +//! Methods of `GrMicroInput`: `validate_origin`, `identity`. Methods of `GrMicroAttention`: `into_parts`. +//! Implements `Drop for GrMicroAttentionBank`. Functions: `save_micro_values`, `micro_driver_error`. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, DetachedGrRead, DeviceBuffer, DriverError, Error, GrBatchScope, GrMicroAttention, + GrMicroAttentionBank, GrMicroDevice, GrMicroInput, GrRole, Result, TokenLayer, driver_error, validate_streams, + validate_values, +}; impl GrMicroInput { pub(in crate::qwen_forward) fn validate_origin(&self, binding: &BindingIdentity, role: GrRole) -> Result<()> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage.rs index 3cf4e09a..b6f4945a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GrStage. +//! Methods of `GrStage`: `mint_micro_input`, `prepare_micro_initial`, `prepare_micro_after_ple`, `prepare_micro_afte... +//! Methods of `GrBatchScope`: `detach_rows`, `refuse_device`, `seal`. #[allow(unused_imports)] use super::super::super::dense_weight_cache::GrResident; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage_prepare_injection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage_prepare_injection.rs index 121b48eb..a7cc5585 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage_prepare_injection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/gr_batch_chunk/gr_stage_prepare_injection.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GrStage. +//! Methods of `GrStage`: `prepare_detached_batch_injection`, `prepare_batch_injection`, `inject_batch`. +//! Functions: `check_batch_read`. #[allow(unused_imports)] use super::batch_inject::{device_inject, gather_batch}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/input/gather_rows.rs b/crates/engine-qwen35-cuda/src/qwen_forward/input/gather_rows.rs index 6f3441bf..3dfa1c29 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/input/gather_rows.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/input/gather_rows.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn gather_rows, fn binding_error, impl InputReady, impl PleOwner, impl -//! PlePrior, impl PlePending .... +//! Methods of `InputReady`: `test_fixture`. Methods of `PleOwner`: `new`, `matches`. +//! Functions: `gather_rows`, `binding_error`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage.rs index 4fe24b41..6949a8df 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl InputStage, fn trace_ple, fn validate_ids, fn gather_ple. +//! Methods of `InputStage`: `consume`, `consume_kar`, `consume_kar_deferred`, `ple_rows_ahead` and 3 more. +//! Functions: `admit_kar_input`, `stage_new_embedding`, `window_ple_row`, `gather_window_rows` and 3 more. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, Dimension, EMBEDDING_VALUES, Error, InputBindingError, InputError, InputReady, InputStage, ModelBinding, + Position, QwenStepTxn, ResidualStreams, Result, Stage, StagedInput, TokenId, VOCABULARY, binding_error, + gather_rows, hash, kar_cache, +}; /// A prompt token with the position it occupies in the transaction. #[derive(Clone, Copy)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage_ple_micro.rs b/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage_ple_micro.rs index ba64adb1..2de47d9e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage_ple_micro.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/input/input_stage_ple_micro.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl InputStage, fn ple_cuda_cached. +//! Methods of `InputStage`: `prepare_ple_micro_input`, `apply_ple_micro_cached`, `apply_ple`, `apply_ple_cached`. +//! Functions: `check_micro_origin`, `check_micro_source`, `copy_ple_values`, `check_micro_admission` and 12 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_cuda.rs b/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_cuda.rs index d1b35291..da7d7a26 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_cuda.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_cuda.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: fn ple_cuda, fn ple_project, fn ple_budget, fn ple_values, fn -//! ple_zeros, fn ple_upload. +//! Methods of `PleUploads`: `upload`. Methods of `OwnedPleAux`: `upload`, `select`, `release`. +//! Functions: `ple_cuda`, `project_key_value`, `ple_project`, `project_resident_key` and 6 more. -#[allow(unused_imports)] -use super::*; +use super::{ + Bf16ProjectionShape, Context, DenseWeightCache, DeviceBuffer, Error, ModelBinding, PLE_DEVICE_PEAK, PLE_HC, + PLE_HISTORY, PleCandidate, PleMatrixRole, PleResident, PleWeights, Result, binding_error, ple_download, + ple_driver_error, ple_upload_f32, ple_upload_u16, +}; pub(super) fn ple_cuda( context: &Context<'_>, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_upload_f32.rs b/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_upload_f32.rs index 7de6b83c..52738791 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_upload_f32.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/input/ple_upload_f32.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn ple_upload_f32, fn ple_upload_u16, fn ple_download, fn -//! ple_driver_error, impl InputStage. +//! Methods of `InputStage`: `prepare_original_prompt_history`, `finish_original_prompt_history`, `prepare_prompt_dev... +//! Functions: `ple_upload_f32`, `ple_upload_u16`, `ple_download`, `ple_driver_error`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/input/residual_streams.rs b/crates/engine-qwen35-cuda/src/qwen_forward/input/residual_streams.rs index c9415b72..664e8e89 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/input/residual_streams.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/input/residual_streams.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl ResidualStreams, impl InputReady, impl StagedInput, impl -//! From_for_Error. +//! Methods of `ResidualStreams`: `broadcast`, `values`. +//! Methods of `InputReady`: `binding_identity`, `token`, `position`, `streams` and 3 more. Implements `From for Error`. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, EMBEDDING_VALUES, Error, InputError, InputReady, Position, ResidualStreams, Result, StagedInput, + TokenId, binding_error, +}; impl ResidualStreams { pub(super) fn broadcast(embedding: &[f32]) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/ahead_rows.rs b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/ahead_rows.rs index ee567923..24512ba7 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/ahead_rows.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/ahead_rows.rs @@ -1,7 +1,6 @@ //! Window PLE rows decoded ahead of their window (`LELEKA_PLE_ON_CHAIN`): impl KarPleCache. -#[allow(unused_imports)] -use super::*; +use super::{AHEAD_ROWS_KEEP, AheadRow, Error, KarPleBinding, KarPleCache, Result}; impl<'ctx> KarPleCache<'ctx> { /// The decoded values of the sixteen rows: the ones `gather_ahead` already decoded when it holds them, else a diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/kar_ple_cache_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/kar_ple_cache_methods.rs index b74ba3b6..1fa25287 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/kar_ple_cache_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/kar_ple_cache_methods.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl KarPleCache. +//! Methods of `KarPleCache`: `new`, `admit_budget`, `allocate_scratch`, `admit_binding` and 15 more. +//! Functions: `check_stage_rows`, `encode_staged`, `verify_ahead_packets`, `serialize_books` and 4 more. -#[allow(unused_imports)] -use super::*; +use super::{ + AHEAD_KEEP, AHEAD_THREADS, Ahead, Arc, CACHE_BYTES, Context, DeviceBuffer, Error, GatherPlan, KarPleBinding, + KarPleCache, KarPleStaged, KarRowPacket, KarRowReader, Lookup, MAX_MISSES, Miss, OUTPUT_BYTES, PLE_ROWS, + PlannedMiss, Residents, Result, RowMap, SLOTS, UPDATE_RECORD_BYTES, ahead_enabled, assign_slots, lookup_rows, + plan_gather, publish_gather, scratch_bytes, +}; impl<'ctx> KarPleCache<'ctx> { pub(crate) fn new(context: &'ctx Context<'ctx>, binding: &KarPleBinding) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/lru_tests.rs b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/lru_tests.rs index e98e135f..ebd71eda 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/lru_tests.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/lru_tests.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Methods of `Rng`: `next`, `row`. Methods of `Scan`: `new`, `victim`, `plan`, `gather`. +//! Functions: `token`, `gather_equals_the_full_scan_on_random_sequences`, `chunks_and_gathers_interleaved_keep_every... use super::*; use std::collections::HashMap; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/publish_gather.rs b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/publish_gather.rs index eb35eb36..7dc91ff8 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/publish_gather.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/publish_gather.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn publish_gather, fn ahead_enabled, impl Ahead. +//! Methods of `Ahead`: `collect`. Functions: `publish_gather`, `ahead_enabled`. +//! Split out of `kar_ple_cache` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Ahead, PlannedMiss, Residents}; /// Publish a gather the device accepted: evict the victims, map the new rows, and age the sixteen rows `age_base + /// 1..=16` in order (a row named twice keeps the later age), as the scan-based code did. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/row_parity_probe.rs b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/row_parity_probe.rs index 05f8f2ee..55c269cf 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/row_parity_probe.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/row_parity_probe.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Functions: `fnv`, `probe_binding`, `probe_rows`, `dump_decoded_rows_for_original_comparison` and 2 more. +//! Split out of `kar_ple_cache` to keep its files under the line limit. use super::*; use crate::model_binding::qwen4exp_kar_ple::pinned_profile; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/scratch_bytes.rs b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/scratch_bytes.rs index 7f0ac984..94838bc2 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/scratch_bytes.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/scratch_bytes.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn scratch_bytes, impl Hasher_for_RowHasher, impl Residents, impl -//! KarPleStaged, fn lookup_rows, fn assign_slots .... +//! Methods of `Residents`: `len`, `get`, `contains_key`, `try_reserve` and 7 more. +//! Methods of `KarPleStaged`: `updates`, `slots`. Implements `Hasher for RowHasher`. -#[allow(unused_imports)] -use super::*; +use super::{ + Entry, Error, GatherPlan, Hasher, KarPleStaged, Lookup, MAX_MISSES, PlannedMiss, Residents, Result, RowHasher, + RowMap, UPDATE_RECORD_BYTES, +}; /// Bytes of the staging buffers for 1..=16 misses. pub(super) fn scratch_bytes() -> usize { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/slot_tests.rs b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/slot_tests.rs index 0cd146f4..ecf1b60b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/slot_tests.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/kar_ple_cache/slot_tests.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Functions: `apply`, `the_scatter_staging_buffers_match_the_update_records`, `chunk`, `consistent` and 9 more. +//! Defines `Given`. use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/encoded.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/encoded.rs index 0746f8bc..30a9a28a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/encoded.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/encoded.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn encoded, fn exact, fn bounded_gate_up, fn down_projection, fn raw, fn -//! down .... +//! Functions: `block_geometry`, `fill_block`, `encoded`, `exact` and 9 more. +//! Split out of `moe_activation_reuse_gpu` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/former_fixture_domain_refusal.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/former_fixture_domain_refusal.rs index 601da80d..4ca35c3a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/former_fixture_domain_refusal.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_activation_reuse_gpu/former_fixture_domain_refusal.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn former_fixture_domain_refusal, fn saturation_and_refusals. +//! Methods of `DomainFixture`: `build`, `release`. +//! Functions: `hidden_extrema`, `former_fixture_domain_refusal`, `nonfinite_hidden_refused`, `late_nan_projection_re... #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/down_scope.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/down_scope.rs index 4794c90a..706731a6 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/down_scope.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/down_scope.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl DownScope. +//! Methods of `DownScope`: `new`, `with_routed_finite`, `with_routed_workspace`, `with_workspace` and 15 more. +//! Functions: `check_grouped_selections`, `completed_row_source`. Defines `GroupedColumn`, `GroupedHandoff`. -#[allow(unused_imports)] -use super::*; +use super::{ + Cell, CompletedCpuRow, Context, DeviceBuffer, DownScope, DownSelection, Error, K, N, Rc, Result, RetainedDown, + RetainedScalar, RoutedFiniteOwner, RoutedFiniteStage, RoutedGroupWorkspace, RoutedWorkspaceOwner, TransportBuffer, + download_f32, driver_error, validate_values, +}; impl<'ctx> DownScope<'ctx> { pub(in super::super) fn new(context: &'ctx Context<'ctx>, failed: Rc>) -> Self { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/resident_packed_down.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/resident_packed_down.rs index 60777a3e..1eed90dc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/resident_packed_down.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/resident_packed_down.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl ResidentPackedDown. +//! Methods of `ResidentPackedDown`: `new`, `validate`, `complete`, `with_completed` and 7 more. +//! Split out of `moe_down` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{DeviceBuffer, DownScope, Error, K, N, Rc, ResidentPackedDown, Result, ScaledDown}; impl<'ctx> ResidentPackedDown<'ctx> { pub(in super::super) fn new(scope: &DownScope<'ctx>) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/retained_scalar.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/retained_scalar.rs index 8cfa5749..17e2405e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/retained_scalar.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down/retained_scalar.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl RetainedScalar, impl TransportBuffer, impl -//! Drop_for_TransportBuffer, impl RetainedDown, impl ScaledDown, impl PackedDown. +//! Methods of `RetainedScalar`: `close`. Methods of `TransportBuffer`: `buffer`, `buffer_mut`, `close`, `release`. +//! Implements `Drop for TransportBuffer`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down_reuse_gpu/exact.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down_reuse_gpu/exact.rs index eb32d921..610fcd73 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_down_reuse_gpu/exact.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_down_reuse_gpu/exact.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn exact, fn down_weights, fn scalar_weights, fn project, fn -//! original_down, fn retained .... +//! Functions: `exact`, `down_weights`, `scalar_weights`, `project` and 3 more. +//! Split out of `moe_down_reuse_gpu` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/cached_expert_run.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/cached_expert_run.rs index 0266c4cc..5b55e826 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/cached_expert_run.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/cached_expert_run.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn finish_with_parts, impl ActualSlotPacket, impl ActualDown, fn -//! execute_cuda_cached. +//! Methods of `ActualSlotPacket`: `validate`. Methods of `ActualDown`: `take`. +//! Functions: `shared_scalar_buffers`, `release_shared_inputs`, `scaled_shared`, `finish_with_parts` and 1 more. #[allow(unused_imports)] use super::moe_down::{RetainedScalar, ScaledDown}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_matrix_projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_matrix_projection.rs index 25bd8d4a..5eb0486b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_matrix_projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_matrix_projection.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_matrix, fn collect_rows, fn dual_format_kind, fn -//! dual_routed_format, fn launch_cached_projection, fn launch_cached_prepared .... +//! Functions: `matrix_dims`, `gate_up_dims`, `prepared_routed_format`, `gate_up_prepared_format` and 15 more. +//! Defines `MatrixDims`, `ExpertMatrix`, `ExpertActivation` and 2 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_mlp_values.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_mlp_values.rs index 17b840bb..59b2447a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_mlp_values.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_mlp_values.rs @@ -1,5 +1,5 @@ -//! 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. +//! Functions: `expert_mlp`, `cached_expert_mlp`, `uncached_hidden`, `project_cached_gate_up` and 3 more. +//! Split out of `moe_expert` to keep its files under the line limit. use super::expert_matrix_projection::{gate_up_dims, gate_up_prepared_format}; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_step.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_step.rs index 0db8714c..99b2a563 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_step.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/expert_step.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ExpertReady, impl MoeExpertStage, fn execute_cuda, fn -//! execute_cuda_kar, fn kar_error. +//! Methods of `ExpertReady`: `identity`, `output`, `validate_origin`, `from_completed`. +//! Methods of `StepCuda`: `dispatch`, `dispatch_prepared`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/scoped_expert_mlp.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/scoped_expert_mlp.rs index 72ee6771..eb5073d2 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/scoped_expert_mlp.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/scoped_expert_mlp.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn cached_mlp_down, fn cached_gate_up_scoped. +//! Functions: `check_origin`, `swiglu_hidden`, `project_down`, `close_down_parts` and 4 more. Defines `DownProvenance`. +//! Split out of `moe_expert` to keep its files under the line limit. use super::expert_matrix_projection::{MatrixDims, gate_up_dims, gate_up_prepared_format}; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/validate_values.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/validate_values.rs index 05c6b973..dcffa8a3 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/validate_values.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_expert/validate_values.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn validate_values, fn upload_bytes, fn upload_f32, fn download_f32, fn -//! binding_error, fn driver_error. +//! Functions: `validate_values`, `upload_bytes`, `upload_f32`, `download_f32` and 2 more. +//! Split out of `moe_expert` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/adaptive_packet_projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/adaptive_packet_projection.rs index b4b6e69f..62897b4f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/adaptive_packet_projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/adaptive_packet_projection.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_adaptive_packets. +//! Functions: `project_adaptive_packets`. +//! Split out of `adaptive_packets` to keep its files under the line limit. use super::super::direct_packets_fns::PacketRun; use super::super::packet_run_project_group_direct::DirectRun; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/packet_wave_projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/packet_wave_projection.rs index 15c15ad0..bb1e2a4e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/packet_wave_projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_adaptive_packets/packet_wave_projection.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_inner. +//! Functions: `project_inner`, `observe_adaptive`, `ephemeral_slot_count`. +//! Split out of `adaptive_packets` to keep its files under the line limit. use super::super::direct_packets_fns::PacketRun; use super::super::packet_run_project_group_direct::DirectRun; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/execute_bound.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/execute_bound.rs index 9202a4aa..e726cc28 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/execute_bound.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/execute_bound.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn execute_bound. +//! Functions: `execute_bound`, `open_bound`, `finish_bound`, `is_extended_group` and 8 more. +//! Split out of `grouped` to keep its files under the line limit. use super::bound_rows::{BoundRows, DirectPacketInputs}; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/finish_shared_with.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/finish_shared_with.rs index d85d9115..125fad39 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/finish_shared_with.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/finish_shared_with.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn finish_shared_with, fn uses_adaptive. +//! Methods of `SharedOwners`: `scale_shared`, `combine_with`, `close_all`. +//! Functions: `finish_shared_with`, `uses_adaptive`. Defines `RowTail`, `SharedOwners`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/ordered_down_refusal.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/ordered_down_refusal.rs index 4e8f058b..615f57cc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/ordered_down_refusal.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/ordered_down_refusal.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn ordered_down_refusal, fn use_direct_packets, fn -//! validate_packet_pairs, fn execute_direct_packets, fn finish_shared, fn use_shared_tail .... +//! Functions: `ordered_down_refusal`, `replay_selection`, `use_direct_packets`, `validate_packet_pairs` and 5 more. +//! Defines `PacketGroupMembers`. use super::finish_shared_with::RowTail; use super::packet_run_project_group_direct::{DownProjection, RefusalReplay}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/packet_run_project_group_direct.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/packet_run_project_group_direct.rs index 65218b0f..0f24ce3c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/packet_run_project_group_direct.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/packet_run_project_group_direct.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_group_direct. +//! Methods of `PacketRun`: `project_group_direct`. +//! Methods of `DirectGroup`: `check_descriptors`, `run`, `project_gate_up`, `project_gate_up_role` and 6 more. use super::direct_packets_fns::PacketRun; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/prepared_moe_row.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/prepared_moe_row.rs index fc9ff860..69d0045e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/prepared_moe_row.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/prepared_moe_row.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl PreparedMoeRow, impl MoeExpertStage, fn grouped_pairs. +//! Methods of `PreparedMoeRow`: `validate`, `into_read`. +//! Methods of `MoeExpertStage`: `prepare_chunk_row`, `prepare_chunk_row_detached`, `execute_chunk`, `execute_chunk_n... use super::bound_rows::DirectPacketInputs; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group.rs index 892d0f9f..27a60b66 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_group. +//! Methods of `ResidentGroup`: `run`, `project_gate_up`, `project_gate_up_role`, `finish_gate_up` and 7 more. +//! Methods of `DownArgs`: `refusal_values`. Functions: `project_group`. use super::packet_run_project_group_direct::{DownProjection, GroupBuffers, RefusalReplay}; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_consumers.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_consumers.rs index 68f0fc26..0433341e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_consumers.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_consumers.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_group_source_consumers. +//! Methods of `DirectGroup`: `run_source`, `source_gate_up`, `source_up`, `source_gate_up_role` and 5 more. +//! Functions: `project_group_source_consumers`, `check_source_members`. #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] use super::packet_run_project_group_direct::{ diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_fenced.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_fenced.rs index ebe096b8..984d3ac1 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_fenced.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_chunk/project_group_source_fenced.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_group_source_fenced. +//! Methods of `PacketRun`: `direct_group`, `project_group_fenced`. Functions: `source_members`. +//! Split out of `grouped` to keep its files under the line limit. #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] use super::direct_packets_fns::PacketRun; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/arm.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/arm.rs index e62ae7f6..b83ac0a6 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/arm.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/arm.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338. +//! Functions: `arm`, `probe_payload`, `preflight_copy`, `corrupted_bytes` and 1 more. +//! Split out of `direct_gpu` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/loaded_arms.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/loaded_arms.rs index c932072c..b71abf35 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/loaded_arms.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/loaded_arms.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl LoadedArms, impl QwenForward. +//! Methods of `LoadedArms`: `arm`, `matches_snapshot`, `precheck`, `reference_and_candidate` and 2 more. +//! Methods of `QwenForward`: `test_direct_down_on_loaded`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/policy.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/policy.rs index b206d60e..9538e1a9 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/policy.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/policy.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338. +//! Methods of `Observation`: `begin`, `take`. Methods of `DirectDownReport`: `assert_after_teardown`. +//! Implements `Drop for Observation`. Functions: `policy`, `copy_completed`, `observe_packet`, `compare` and 7 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/probe.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/probe.rs index eead1f61..f3354031 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/probe.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_group_down_direct_gpu/probe.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Probe, fn transport_probe, fn output_differences, fn same_outputs. +//! Methods of `Probe`: `run`, `fill_sentinels`, `split_and_pack_old`, `copy_direct` and 7 more. +//! Functions: `transport_probe`, `output_differences`, `same_outputs`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/device_bytes.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/device_bytes.rs index 58006bc1..95a83f12 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/device_bytes.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/device_bytes.rs @@ -1,7 +1,9 @@ -//! Moved out of the parent module by STRA-338: fn device_bytes, impl Buffers, fn release_pool. +//! Methods of `Buffers`: `new`, `from_pool`, `into_outputs`, `release`. +//! Functions: `device_bytes`, `release_pool`, `buffer_sizes`, `allocate_pool` and 4 more. -#[allow(unused_imports)] -use super::*; +use super::{ + Buffers, Context, DeviceBuffer, EXPERTS, Error, FF, MIXED, MoeBf16Profile, Result, SELECTED, driver_error, +}; /// Device bytes one batched step allocates for `tokens` rows (without the persistent scratch / owner words and /// without the caller's `dm`). diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_resources.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_resources.rs index c21b2c9a..ddcc799c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_resources.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_resources.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl MoePrefillResources, impl Drop_for_MoePrefillResources, fn admit, -//! fn gate_up_format, fn down_format, impl RouteRow .... +//! Methods of `MoePrefillResources`: `new`, `validate_context`, `allocated_bytes`, `close` and 1 more. +//! Methods of `RouteRow`: `validate_origin`. Implements `Drop for MoePrefillResources`, `Drop for MoeMicroProducts`. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Context, DeviceBuffer, EXPERTS, Error, GdnNativeFormat, GrRole, LayerId, MOE_BATCH_SCRATCH_BYTES, + MOE_PREFILL_PERSISTENT_BYTES, MoeBf16Profile, MoeMicroProducts, MoePrefillBatch, MoePrefillResources, + MoeWeightDescriptor, RESERVE, Result, RouteRow, SELECTED, TokenLayer, driver_error, +}; impl<'ctx> MoePrefillResources<'ctx> { pub(in crate::qwen_forward) fn new(context: &'ctx Context<'ctx>, profile: MoeBf16Profile) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_stage.rs index 83d8d18e..c8048bcc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/moe_prefill_stage.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl MoePrefillStage. +//! Methods of `MoePrefillStage`: `transient_bytes`, `route_shared_micro`, `combine_micro`. +//! Split out of `moe_prefill_batch` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Buffers, CombineInput, CombineOperands, CombineWindow, Error, MIXED, MicroInputs, MoeBf16Profile, MoeMicroProducts, + MoePrefillStage, PrefillLoans, Result, WindowOperands, WindowReads, admit, assemble_products, check_combine_window, + combine_on_device, device_bytes, driver_error, f32_bytes, route_on_device, validate_micro, +}; impl MoePrefillStage { /// Exact per-window device owners; the genuine caller preflights cache diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/route_micro.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/route_micro.rs index 0920b026..935ed66e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/route_micro.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_prefill_batch/route_micro.rs @@ -1,7 +1,11 @@ //! Validation and device phases of `MoePrefillStage::route_shared_micro` (STRA-338 size: extract-method only). -#[allow(unused_imports)] -use super::*; +use super::{ + Buffers, CombineInput, DeviceBuffer, Dimension, EXPERTS, Error, GdnNativeFormat, GemmRef, GrRole, LayerId, MIXED, + MOE_BATCH_MAX_TOKENS, ModelBinding, MoeMicroProducts, MoePrefillResources, MoeRouteBatch, ResidualReady, Result, + RouteRow, SELECTED, SharedWeights, TokenLayer, down_format, driver_error, gate_up_format, validate_descriptors, + validate_route_row, +}; use leleka_cuda_driver::MoeBatchPrefix; /// The validated host side of one window: the packed mixed rows, their identities and the shared formats. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/project_logits.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/project_logits.rs index cc3e6423..d2aeb334 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/project_logits.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/project_logits.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_logits, fn collect_logits, fn binding_error, fn -//! validate_request, fn validate_logits, fn route_with .... +//! Functions: `activation_bytes`, `upload_router_matrix`, `finish_logits`, `project_logits` and 9 more. +//! Defines `RouterInput`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/router_logits.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/router_logits.rs index c356b5db..1c6949c1 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/router_logits.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/router_logits.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl RouterLogits, impl RoutedExperts, impl MoeRouteStage, fn -//! validate_activation, fn admit_projection_budget. +//! Methods of `RouterLogits`: `from_preceding`, `fixture`. +//! Methods of `RoutedExperts`: `new`, `identity`, `experts`, `weights` and 2 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/run_cuda.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/run_cuda.rs index e7397a35..15b5376d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/run_cuda.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_route/run_cuda.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn run_cuda, fn map_driver_error. +//! Functions: `logits_to_bytes`, `decode_route`, `release_route_buffers`, `run_cuda` and 1 more. +//! Split out of `moe_route` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Context, DriverError, EXPERTS, Error, IDS_BYTES, LOGITS_BYTES, Result, SELECTED, Stage, WEIGHTS_BYTES}; use leleka_cuda_driver::DeviceBuffer; fn logits_to_bytes(values: &[f32; EXPERTS]) -> [u8; LOGITS_BYTES] { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_cache_routed_owners.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_cache_routed_owners.rs index 730d6782..e7093f6e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_cache_routed_owners.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_cache_routed_owners.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `routed_output_owner`, `uses_mapped_expert_source`, `ephemeral_routed_owner`, `route... +//! Functions: `triplet_keys`, `adaptive_raw_triplet`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods.rs index 9f1511c9..1e80d504 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Groups the submodules `moe_cache_close_owners`, `moe_cache_compose_shared_and_mtp`, `moe_cache_lru_updates` and 7... +//! Split out of `moe_weight_cache` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_close_owners.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_close_owners.rs index cf1b30b0..bc6a0b85 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_close_owners.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_close_owners.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (10). +//! Methods of `MoeWeightCache`: `close_original_owners`, `close_original_owners`, `close_shared_owners`, `close_work... +//! Functions: `close_shared`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_compose_shared_and_mtp.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_compose_shared_and_mtp.rs index 747311c0..7828b03a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_compose_shared_and_mtp.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_compose_shared_and_mtp.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (4). +//! Methods of `MoeWeightCache`: `compose_target_shared_tail`, `compose_shared`, `compose_fixed_mtp_experts`, `admit_... +//! Split out of `moe_weight_cache_methods` to keep its files under the line limit. use super::super::super::shared_expert_workspace::{SharedTailInputs, SharedTailKeys, WorkspaceOwner}; use super::moe_cache_lru_updates::shared_keys::{raw_shared_buffers, shared_descriptors}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_lru_updates.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_lru_updates.rs index 39215708..2f31b170 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_lru_updates.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_lru_updates.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (3). +//! Methods of `MoeWeightCache`: `prepare_lru_updates`, `spill_updates`, `pinned_updates_allowed`, `commit_lru_update... +//! Split out of `moe_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_main_entry_routed_source.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_main_entry_routed_source.rs index 8f08b7e4..c66edb54 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_main_entry_routed_source.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_main_entry_routed_source.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (8). +//! Methods of `MoeWeightCache`: `main_entry`, `main_entry_owned_gate_up`, `with_matrix_routed_source`, `source_healt... +//! Split out of `moe_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_matrix_and_mtp_lookup.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_matrix_and_mtp_lookup.rs index 2ce6d891..c9ea1914 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_matrix_and_mtp_lookup.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_matrix_and_mtp_lookup.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (9). +//! Methods of `MoeWeightCache`: `matrix`, `shared_scalar`, `admit_mtp_input_workspace`, `mtp_input_workspace_support... +//! Split out of `moe_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_chunk_admission.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_chunk_admission.rs index f8ee88a9..0bffb767 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_chunk_admission.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_chunk_admission.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (5). +//! Methods of `MoeWeightCache`: `note_test_mmq_dispatch`, `mmq_context`, `weight_layout`, `has_original_prompt_mmq` ... +//! Functions: `admit_triplets`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_constructors.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_constructors.rs index 21b44cff..1ec88c96 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_constructors.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_mmq_constructors.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache. +//! Methods of `MoeWeightCache`: `new_native_integer_iq3_mmq_retained_mtp_kv_shared_tail_profile_mtp_input_spill_floo... +//! Functions: `dense_f32_words`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_shared_tail_constructors.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_shared_tail_constructors.rs index 7d2e3e51..220f9ffd 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_shared_tail_constructors.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_shared_tail_constructors.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (2). +//! Methods of `MoeWeightCache`: `new_native_integer_iq3_mmq_retained_mtp_kv_shared_tail`, `new_native_integer_iq3_mm... +//! Split out of `moe_weight_cache_methods` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_triplet_plan_upload.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_triplet_plan_upload.rs index bc566864..f3174a3c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_triplet_plan_upload.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_triplet_plan_upload.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (6). +//! Methods of `MoeWeightCache`: `with_integer_mmq_triplet`, `triplet_fill`, `triplet_owners`, `triplet_admit` and 16... +//! Functions: `read_triplet`. Defines `TripletAccounting`, `TripletPlan`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_validate_prepare_step.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_validate_prepare_step.rs index a59091e7..cc278679 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_validate_prepare_step.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/moe_weight_cache_methods/moe_cache_validate_prepare_step.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MoeWeightCache (7). +//! Methods of `MoeWeightCache`: `owners_failed`, `validate_original_owners`, `validate_original_owners`, `validate` ... +//! Split out of `moe_weight_cache_methods` to keep its files under the line limit. use super::moe_cache_main_entry_routed_source::fill_fns::Room; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_source_health.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_source_health.rs index 20b6c771..387176bf 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_source_health.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_source_health.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl RoutedSourceHealth, impl MoeWeightCache. +//! Methods of `RoutedSourceHealth`: `validate`. +//! Methods of `MoeWeightCache`: `note_permanent_lookup`, `note_permanent_hit`, `note_permanent_fill`, `note_permanen... #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_workspace_owner.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_workspace_owner.rs index 9ad20d41..ba6800a6 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_workspace_owner.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/routed_workspace_owner.rs @@ -1,6 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl RoutedWorkspaceOwner, impl Drop_for_RoutedWorkspaceOwner, impl -//! RoutedResidentOwner, impl Drop_for_RoutedResidentOwner, impl MtpInputWorkspaceOwner, impl -//! Drop_for_MtpInputWorkspaceOwner. +//! Methods of `RoutedWorkspaceOwner`: `new`, `matches_context`, `is_failed`, `with_workspace` and 1 more. +//! Methods of `RoutedResidentOwner`: `new`, `matches_context`, `is_failed`, `with_queue` and 1 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/validate_ranked_profile.rs b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/validate_ranked_profile.rs index da0147ec..9002e713 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/validate_ranked_profile.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/moe_weight_cache/validate_ranked_profile.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn validate_ranked_profile, fn room_fits, fn oldest_weight, impl -//! EncodedWeight, fn dual_layout, fn original_dual_layout .... +//! Methods of `EncodedWeight`: `close`. +//! Methods of `RoutedFiniteOwner`: `new`, `matches_context`, `is_failed`, `check_stage` and 1 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp/mtp_frame.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp/mtp_frame.rs index 973a4808..c94e2d16 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp/mtp_frame.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp/mtp_frame.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MtpFrame, impl MtpInput, fn queued_fc_shape, fn input_refusal, impl -//! MtpStepProduct. +//! Methods of `MtpFrame`: `within_bounds`, `validate`, `token`, `position` and 1 more. +//! Methods of `MtpInput`: `from_previous`, `frame`, `streams`, `from_target` and 5 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp/project_attention_out_numeric.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp/project_attention_out_numeric.rs index 06f1ef8c..cd1e2f04 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp/project_attention_out_numeric.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp/project_attention_out_numeric.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_attention_out_numeric. +//! Functions: `project_gated`, `project_attention_out_numeric`. +//! Split out of `mtp` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp/step.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp/step.rs index 9a05ea0f..c341cd3d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp/step.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp/step.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn step, fn warm_step, fn warm_chunk_row, fn step_core, impl -//! MtpFinalMixed, fn preflight .... +//! Methods of `MtpFinalMixed`: `from_native_mixer`, `frame`, `values`. +//! Functions: `step`, `warm_step`, `warm_chunk_row`, `run_blocks` and 12 more. Defines `MtpBlocks`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_stage.rs index 80a4c8c7..8e7ede5c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_stage.rs @@ -1,8 +1,14 @@ -//! Moved out of the parent module by STRA-338: impl MtpAttentionReady, impl MtpAttentionStage, fn produce_kv_cell, impl -//! MtpGated, impl RetainedAttended, impl Drop_for_RetainedAttended .... +//! Methods of `MtpAttentionReady`: `frame`, `output`, `streams`, `inject` and 2 more. +//! Methods of `MtpAttentionStage`: `run`. Implements `Drop for RetainedAttended`, `Drop for RetainedGated`. -#[allow(unused_imports)] -use super::*; +use super::{ + Cell, Context, DenseGeometry, DenseKv, DeviceBuffer, Error, KV, KvWindow, ModelBinding, MoeWeightCache, + MtpAttentionRead, MtpAttentionReady, MtpAttentionStage, MtpFrame, MtpGated, MtpKind, MtpRole, MtpSession, + MtpStepOwners, N, NormGamma, PackedKv, Q, QGate, QwenSession, Rc, Result, RetainedAttended, RetainedGated, + RingSource, attend_retained, attend_ring_retained, binding_error, close_transport, f32_weights, gate_retained, + geometry, norm_rope, pack_kv, preflight, project, project_attention_output, release_transport, reserve, split, + validate_values, validate_window, +}; impl MtpAttentionReady { pub(in super::super) fn frame(&self) -> &MtpFrame { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_transport.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_transport.rs index c5e949a3..f062d5d3 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_transport.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/attention_transport.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn release_transport, fn close_transport, fn note_transport, fn -//! upload_transport, fn upload_transport_f32, fn attend_retained .... +//! Methods of `AttendBuffers`: `upload_window`, `attend`, `attend_ring`. Methods of `GateBuffers`: `apply`. +//! Functions: `release_transport`, `close_transport`, `note_transport`, `upload_transport` and 7 more. -#[allow(unused_imports)] -use super::*; +use super::{ + Cell, Context, DenseGeometry, DeviceBuffer, Error, KvWindow, Q, Rc, Result, RetainedAttended, RetainedGated, + RingSource, Stage, allocate, download, driver_error, preflight, reserve, validate_values, validate_window, +}; pub(super) fn release_transport( buffers: [Option>; C], diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/dense_geometry.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/dense_geometry.rs index e7431581..1923060f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/dense_geometry.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention/dense_geometry.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: fn geometry, fn validate_window, fn norm_rope, fn pack_kv, fn split, fn -//! attend .... +//! Functions: `geometry`, `validate_window`, `norm_rope_launch`, `norm_rope` and 6 more. +//! Split out of `mtp_attention` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseGeometry, DeviceBuffer, Error, HALF_CELL, KV, NormGamma, PackedKv, Q, QGate, Result, WINDOW, + allocate, attention_driver_error, download, download_bytes, preflight, release, upload, upload_bytes, + validate_values, +}; pub(super) fn geometry(position: u64) -> Result { if position >= crate::qwen_forward::contract::serving_cells() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention_reuse_gpu/phases.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention_reuse_gpu/phases.rs index cf51a66b..ce1f9e04 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention_reuse_gpu/phases.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_attention_reuse_gpu/phases.rs @@ -1,7 +1,15 @@ //! The phases of the retained attention proof (one body per phase, STRA-338). +use super::{ + AttendInput, Cell, Context, DenseGeometry, DeviceBuffer, Error, KvWindow, Q, Rc, RetainedAttended, RetainedGated, + attend_retained, exact, gate_retained, geometry, half_kv, original_transfer_chain, out_weights, upload_bytes, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + DenseFormat, DenseKv, Driver, ModelBinding, MoeWeightCache, MtpAttentionRead, MtpFrame, MtpKind, MtpRole, + MtpSession, ProjectionKind, ProjectionSpec, QwenSession, Result, Stage, attend, release, +}; /// One context and the shared failure bit every phase works against. pub(super) struct Env<'c> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/first_seed_reuse_enabled.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/first_seed_reuse_enabled.rs index 4f732bc7..0cba07f7 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/first_seed_reuse_enabled.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/first_seed_reuse_enabled.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn first_seed_reuse_enabled, fn needed_draft_predictions, fn -//! window_limit, fn window_stage_error. +//! Functions: `first_seed_reuse_enabled`, `needed_draft_predictions`, `window_limit`, `window_stage_error`. +//! Split out of `mtp_decode` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder.rs index 94ecf179..6db17283 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MtpDecoder. +//! Groups the submodules `batched_support`, `batched_window`, `draft_warm_and_window` and 1 more. +//! Split out of `mtp_decode` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/batched_window.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/batched_window.rs index 53073a44..9ecf510a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/batched_window.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/batched_window.rs @@ -1,7 +1,11 @@ //! The batched MTP window: draft chain, rewind, then the joint target window (IQ3 integer/native Down policy). -#[allow(unused_imports)] -use super::*; +use super::{ + Error, KnownNext, MoeWeightCache, MtpDecoder, MtpInput, MtpVerifiedWindow, MtpWindowError, MtpWindowRequest, + QwenForward, QwenSession, Result, StepSessions, TargetStepProduct, TokenId, VerificationChunk, VerificationSource, + WindowCaches, WindowOwners, first_seed_reuse_enabled, mtp, needed_draft_predictions, reserve, window_limit, + window_stage_error, +}; use super::batched_support::*; use crate::qwen_forward::mtp::RetainedFirstSeed; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/scalar_window.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/scalar_window.rs index a8f50f47..f7572575 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/scalar_window.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_decoder/scalar_window.rs @@ -1,7 +1,10 @@ //! The scalar MTP window: draft chain, rewind, then verified catch-up one target step at a time. -#[allow(unused_imports)] -use super::*; +use super::{ + DenseWeightCache, Error, KnownNext, ModelBinding, MtpDecoder, MtpInput, MtpVerifiedWindow, MtpWindowError, + MtpWindowRequest, MtpWindowSpec, OutputStage, Position, QwenForward, QwenSession, Result, StepSessions, + TargetStepProduct, TokenId, WindowOwners, mtp, reserve, window_limit, +}; use crate::qwen_forward::executor::{StepCaches, StepRequest}; use crate::qwen_forward::mtp::MtpCheckpoint; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_window_spec.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_window_spec.rs index f6c9d16f..678df959 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_window_spec.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decode/mtp_window_spec.rs @@ -1,8 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl MtpWindowSpec, impl From_for_MtpWindowError, impl -//! MtpVerifiedWindow, fn kv_prefill_host_charge. +//! Methods of `MtpWindowSpec`: `new`. Methods of `MtpVerifiedWindow`: `tokens`, `draft_steps`, `into_parts`. +//! Implements `From for MtpWindowError`. Functions: `kv_prefill_host_charge`. -#[allow(unused_imports)] -use super::*; +use super::{Dimension, Error, MtpVerifiedWindow, MtpWindowError, MtpWindowSpec, Result, TargetStepProduct, TokenId}; impl MtpWindowSpec { pub(crate) fn new(depth: usize, remaining: usize, eos: Option) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded.rs index b31a638c..30bd87ba 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded.rs @@ -1,7 +1,18 @@ -//! Moved out of the parent module by STRA-338: fn check_loaded (one body per phase of the authentic boundary). +//! Defines `Shared`, `Refs`, `Chain` and 2 more. +//! Split out of `batch_gpu` to keep its files under the line limit. +use super::{ + AssertUnwindSafe, Collection, DenseWeightCache, Dimension, DraftHeadOwners, Driver, Error, Expected, + InheritedKarArchive, KarPleCache, KnownNext, ModelBinding, MoeWeightCache, MtpDecoder, MtpInput, MtpSession, + MtpWindowError, MtpWindowRequest, MtpWindowSpec, OutputStage, PathBuf, Position, PostcommitCancellation, + PrefillStepProduct, Qwen4ExpArtifact, QwenForward, QwenSession, ROW_CAP, Rc, ReadyMtpChunk, RefCell, Report, + ResetReplaySnapshot, Result, SNAPSHOT_CAP, Stage, StepSessions, TRANSACTION_CAP, TargetStepProduct, TokenId, VOCAB, + VerificationChunk, VerificationSource, VerifiedGgufFile, WindowCaches, WindowOwners, collection, different_token, + mtp, observe, row_matches, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::path; use crate::qwen_forward::mtp_decode::MtpVerifiedWindow; /// The window preparation of one flow against the candidate cache. The prepared window borrows the target session diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow.rs index d96951c0..63835492 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow.rs @@ -1,7 +1,19 @@ -//! Moved out of the parent module by STRA-338: impl Flow. +//! Methods of `Flow`: `step`, `warm`, `observe`, `matches_state` and 8 more. Defines `CancelledWindow`. +//! Split out of `check_loaded` to keep its files under the line limit. +use super::{ + Chain, Collection, Error, Expected, Flow, MoeWeightCache, MtpDecoder, MtpWindowError, MtpWindowSpec, + PostcommitCancellation, Prefix, QwenForward, Refs, ResetReplaySnapshot, Result, Stage, TRANSACTION_CAP, + TargetStepProduct, TokenId, VOCAB, different_token, mtp, observe, row_matches, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AssertUnwindSafe, DenseWeightCache, Dimension, DraftHeadOwners, Driver, InheritedKarArchive, KarPleCache, + ModelBinding, MtpInput, MtpSession, MtpVerifiedWindow, MtpWindowRequest, OutputStage, PathBuf, Position, + PrefillStepProduct, Qwen4ExpArtifact, QwenSession, Rc, ReadyMtpChunk, RefCell, Shared, StepSessions, + VerificationChunk, VerificationSource, VerifiedGgufFile, WindowCaches, WindowOwners, collection, flow, +}; use crate::qwen_forward::mtp::KnownNext; /// What the cancelled T3 window is compared with: the reference tokens, the two accepted row expectations and the tail diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow_decode_edge_scenarios.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow_decode_edge_scenarios.rs index b4251c37..1552af05 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow_decode_edge_scenarios.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/flow_decode_edge_scenarios.rs @@ -1,7 +1,18 @@ -//! Moved out of the parent module by STRA-338: impl Flow (2), fn check_loaded. +//! Methods of `Flow`: `eos_prefix`, `max_one`, `idle_window`, `no_advance`. Functions: `check_loaded`. +//! Split out of `check_loaded` to keep its files under the line limit. +use super::{ + Chain, Collection, Expected, Flow, MoeWeightCache, MtpDecoder, MtpWindowSpec, QwenForward, Rc, Refs, Report, + ResetReplaySnapshot, Shared, TRANSACTION_CAP, TargetStepProduct, TokenId, VOCAB, admit_binding, mtp, row_matches, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AssertUnwindSafe, DenseWeightCache, Dimension, DraftHeadOwners, Driver, Error, InheritedKarArchive, KarPleCache, + KnownNext, ModelBinding, MtpInput, MtpSession, MtpVerifiedWindow, MtpWindowRequest, OutputStage, PathBuf, Position, + PrefillStepProduct, Qwen4ExpArtifact, QwenSession, ReadyMtpChunk, RefCell, Result, Stage, StepSessions, + VerificationChunk, VerificationSource, VerifiedGgufFile, WindowCaches, WindowOwners, collection, flow, +}; impl<'ctx> Flow<'_, 'ctx, '_, '_, '_, '_> { /// Automatic full restore invalidates the consumed source. Recover via diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/position_at.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/position_at.rs index 7842c914..b8cc98e0 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/position_at.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/check_loaded/position_at.rs @@ -1,7 +1,19 @@ -//! Moved out of the parent module by STRA-338: fn position_at, fn admit_binding, impl Shared, impl Flow. +//! Methods of `Shared`: `step`, `window`. Methods of `Flow`: `open`. Functions: `position_at`, `admit_binding`. +//! Split out of `check_loaded` to keep its files under the line limit. +use super::{ + Dimension, Flow, ModelBinding, MoeWeightCache, MtpDecoder, MtpVerifiedWindow, MtpWindowError, MtpWindowSpec, + Position, QwenForward, QwenSession, ROW_CAP, Rc, Report, Result, SNAPSHOT_CAP, Shared, TRANSACTION_CAP, + TargetStepProduct, TokenId, VOCAB, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AssertUnwindSafe, DenseWeightCache, DraftHeadOwners, Driver, Error, InheritedKarArchive, KarPleCache, KnownNext, + MtpInput, MtpSession, OutputStage, PathBuf, PrefillStepProduct, Qwen4ExpArtifact, ReadyMtpChunk, RefCell, + ResetReplaySnapshot, Stage, StepSessions, VerificationChunk, VerificationSource, VerifiedGgufFile, WindowCaches, + flow, +}; use crate::qwen_forward::executor::{StepCaches, StepRequest}; use crate::qwen_forward::mtp_decode::{MtpWindowRequest, WindowOwners}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/collection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/collection.rs index 5f9ff8e3..c76cd619 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/collection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_decoder_batch_gpu/collection.rs @@ -1,8 +1,19 @@ -//! Moved out of the parent module by STRA-338: impl Collection, impl Drop_for_Collection, impl PostcommitCancellation, -//! impl Drop_for_PostcommitCancellation, fn after_joint_publish, fn collecting .... +//! Methods of `Collection`: `begin`, `finish`. Methods of `PostcommitCancellation`: `arm`, `cancelled`. +//! Implements `Drop for Collection`, `Drop for PostcommitCancellation`. +use super::{ + COLLECTOR, Collection, Collector, Dimension, Error, Expected, ModelBinding, OutputStage, POSTCOMMIT_CANCEL, + PathBuf, Position, PostcommitCancellation, QwenSession, ROW_CAP, Rc, Report, ResetReplaySnapshot, Result, + RowObservation, TargetStepProduct, TokenId, VOCAB, env, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AssertUnwindSafe, DenseWeightCache, DraftHeadOwners, Driver, InheritedKarArchive, KarPleCache, KnownNext, + MoeWeightCache, MtpInput, MtpSession, MtpWindowRequest, PrefillStepProduct, Qwen4ExpArtifact, QwenForward, + ReadyMtpChunk, RefCell, Shared, Stage, StepSessions, VerificationChunk, VerificationSource, VerifiedGgufFile, + WindowCaches, WindowOwners, +}; impl Collection { pub(super) fn begin(count: usize) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/role.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/role.rs index f0dd63c7..34d3c647 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/role.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/role.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl Role, impl Transport, impl Drop_for_Transport, fn at, fn routed. +//! Methods of `Role`: `count`. Methods of `Transport`: `new`, `note`, `allocate`, `buffer` and 9 more. +//! Implements `Drop for Transport`. -#[allow(unused_imports)] -use super::*; +use super::{ + Cell, Context, DEVICE_PEAK, DeviceBuffer, Error, FF, Finite, K, N, Rc, Result, Role, Transport, download, + moe_driver_error, preflight, validate_values, +}; impl Role { pub(super) fn count(self) -> usize { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/shared_project.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/shared_project.rs index b8c6a758..f4b5cb04 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/shared_project.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport/shared_project.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn shared_project, fn shared, impl Packed, fn compose, fn compose_inner, -//! fn compose_observed .... +//! Methods of `Packed`: `new`, `pack`, `observe_packed`, `combine`. +//! Functions: `shared_project`, `shared_hidden`, `shared_down`, `shared_scaled` and 6 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/exact.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/exact.rs index 4009ad22..4c85019d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/exact.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/exact.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn exact, fn bytes, fn bank_fixture, fn matrix, fn scalar_matrix, fn -//! original_project .... +//! Methods of `Env`: `compare_observed`. Functions: `exact`, `bytes`, `fill_blob_part`, `bank_fixture` and 12 more. +//! Defines `SharedStage`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/owner_guards.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/owner_guards.rs index 69b8d9a3..e06464f4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/owner_guards.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_transport_gpu/owner_guards.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn private_owner_guards. +//! Methods of `Env`: `private_owner_guards`. Functions: `gate_guards`, `slot_guards`. Defines `Count`. +//! Split out of `mtp_expert_transport_gpu` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/fixed_buffers.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/fixed_buffers.rs index b0f4477a..6d833944 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/fixed_buffers.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/fixed_buffers.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl FixedBuffers, impl Drop_for_FixedBuffers, impl MtpExpertWorkspace. +//! Methods of `FixedBuffers`: `new`, `check`, `take`, `put` and 1 more. +//! Methods of `MtpExpertWorkspace`: `new`, `compose`, `close`. Implements `Drop for FixedBuffers`. -#[allow(unused_imports)] -use super::*; +use super::{ + ALLOCATED_BYTES, BindingIdentity, CHARGES, Cell, Context, DEVICE_PEAK, DeviceBuffer, Error, ExpertInputs, + FixedBuffers, FrameAnchor, MtpExpertWorkspace, Rc, Result, Slot, WorkspaceClaim, compose, moe_driver_error, + preflight, +}; impl<'ctx> FixedBuffers<'ctx> { pub(super) fn new(context: &'ctx Context<'ctx>) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/role.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/role.rs index 50cde780..b1813f4d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/role.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/role.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Role, impl Transport. +//! Methods of `Role`: `slot`, `output_slot`, `count`. +//! Methods of `Transport`: `new`, `note`, `allocate`, `buffer` and 11 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/transport_drop.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/transport_drop.rs index 2b226023..f7588007 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/transport_drop.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_expert_workspace/transport_drop.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl Drop_for_Transport, fn at, fn routed, fn shared_project, fn shared, -//! impl Packed .... +//! Methods of `Packed`: `new`, `pack`, `observe_packed`, `combine`. Methods of `Slot`: `bytes`. +//! Implements `Drop for Transport`. Functions: `at`, `routed_hidden`, `routed_down`, `routed` and 8 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/append_row.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/append_row.rs index a630c0c2..147bdac3 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/append_row.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/append_row.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn append_row. +//! Functions: `append_row`. +//! Split out of `mtp_experts` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Error, Result, S2Tile}; pub(super) fn append_row(tile: &mut S2Tile, row: &[u8]) -> Result<()> { for block in row.as_chunks::<18>().0 { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/mtp_block.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/mtp_block.rs index 2fccddbe..7fe81e49 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/mtp_block.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/mtp_block.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338. +//! Methods of `MtpBlock`: `frame`, `output`. Methods of `MtpExpertStage`: `run`, `run_checked`. +//! Functions: `admit_input`, `route_mixed`, `compose_bound`, `moe_driver_error` and 1 more. use super::mtp_expert_transport::SelectedRoute; #[allow(unused_imports)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/routed_and_shared_experts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/routed_and_shared_experts.rs index 979f68e3..f74804f5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/routed_and_shared_experts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_experts/routed_and_shared_experts.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338. +//! Functions: `route`, `route_on_device`, `compose`, `routed_parts` and 9 more. Defines `MtpRoutingScope`. +//! Split out of `mtp_experts` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DeviceBuffer, Error, FF, K, ModelBinding, MoeWeightCache, MtpRole, N, Result, S2Tile, allocate, + append_row, download, download_bytes, moe_driver_error, project, release, reserve, upload, validate_route, + validate_values, +}; pub(super) fn route(context: &Context<'_>, logits: &[f32]) -> Result<([u32; K], [f32; K])> { let x = upload(context, logits)?; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/driver_error.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/driver_error.rs index f55e07fd..c3f2b2aa 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/driver_error.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/driver_error.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn driver_error, impl MtpAttentionRead, impl MtpMlpReady, impl -//! MtpDraftFinal, fn attention_read, fn mlp_read .... +//! Methods of `MtpAttentionRead`: `frame`, `streams`, `mixed`, `inject`. +//! Methods of `MtpMlpReady`: `frame`, `streams`, `mixed`, `inject`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/finalize.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/finalize.rs index 4c1ba3c1..057ac3c7 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/finalize.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_gr/finalize.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn finalize, fn finalize_legacy, fn inject_residual, fn down_silu, fn -//! final_gate. +//! Functions: `admit_final_inputs`, `finalize`, `finalize_checked`, `final_matrix` and 7 more. +//! Defines `FinalStageInputs`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/dense_kv.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/dense_kv.rs index 6ea0f0e1..1eae641c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/dense_kv.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/dense_kv.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl DenseKv, fn validate_half. +//! Methods of `DenseKv`: `empty`, `append`, `ring_validate`, `ring_same` and 6 more. Functions: `validate_half`. +//! Split out of `state` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/mtp_session.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/mtp_session.rs index 1c996a92..fac213ee 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/mtp_session.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/mtp_session.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MtpSession. +//! Methods of `MtpSession`: `new`, `frame`, `prior`, `validate_frame` and 17 more. Functions: `seed_frame_foreign`. +//! Split out of `state` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/prefix_draft_snapshot.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/prefix_draft_snapshot.rs index e80d7766..ae8d78aa 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/prefix_draft_snapshot.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state/prefix_draft_snapshot.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl PrefixDraftSnapshot, impl MtpSession, fn -//! first_seed_retained_charge, impl Drop_for_MtpCheckpoint. +//! Methods of `PrefixDraftSnapshot`: `has_prefix`, `numeric_eq`, `retained_bytes`. +//! Methods of `MtpSession`: `test_prefix_snapshot`, `admit_snapshot_owner`, `admit_snapshot_frame`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/checked_chunk_end.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/checked_chunk_end.rs index ea751556..6358a365 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/checked_chunk_end.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/checked_chunk_end.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn checked_chunk_end, impl ValidatedWarmEnd, impl MtpSession, impl -//! MtpChunkStage. +//! Methods of `ValidatedWarmEnd`: `from_txn`. +//! Methods of `MtpSession`: `stage_chunk`, `stage_chunk_bound`, `stage_chunk_with_end`, `admit_chunk_start` and 2 more. -#[allow(unused_imports)] -use super::*; +use super::{ + Error, ModelBinding, MtpChunkStage, MtpSession, Position, QwenChunkTxn, QwenSession, Rc, Result, TargetStepOrigin, + ValidatedWarmEnd, +}; pub(super) fn checked_chunk_end(start: u64, rows: usize, limit: usize) -> Result { if !matches!(limit, 64 | 256) || rows == 0 || rows > limit { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/mtp_session.rs b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/mtp_session.rs index 01234f1b..72626b18 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/mtp_session.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/mtp_state_chunk/mtp_session.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl MtpSession. +//! Methods of `MtpSession`: `test_chunk_snapshot`, `test_chunk_eq`. +//! Split out of `chunk` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_cache_startup/open_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_cache_startup/open_parts.rs index 256268d9..d9ce6afd 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_cache_startup/open_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_cache_startup/open_parts.rs @@ -1,8 +1,10 @@ //! Steps of `original_cache_startup::open`, moved out of it by STRA-338 (size): the slot count, the sizes of the slots, //! and the open-and-squeeze retry, in the order `open` ran them. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, Error, Geometry, OriginalCacheOptions, OriginalExpertCache, OriginalRankedExperts, Plan, Result, align, + driver, sized_per_layer, usable_room, +}; /// The room the cache may be sized against right now: the card's free bytes under the Context budget. fn room(context: &Context<'_>) -> Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/mtp_full_owner_actor_close.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/mtp_full_owner_actor_close.rs index e43f11db..0532d79a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/mtp_full_owner_actor_close.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/mtp_full_owner_actor_close.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338. +//! Methods of `OriginalMtpFullOwner`: `validate`, `actor_mut`, `actor`, `close` and 1 more. +//! Implements `Drop for OriginalMtpFullOwner`. Functions: `driver_error`. -#[allow(unused_imports)] -use super::*; +use super::{Context, Error, ModelBinding, OriginalMtpActor, OriginalMtpFullOwner, Result, Stage}; impl<'ctx> OriginalMtpFullOwner<'ctx> { pub(in crate::qwen_forward) fn validate( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_full_owner_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_full_owner_methods.rs index d8c11122..9d85da25 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_full_owner_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_full_owner_methods.rs @@ -1,7 +1,14 @@ -//! Moved out of the parent module by STRA-338: impl OriginalMtpFullOwner. +//! Methods of `OriginalMtpFullOwner`: `bind_reserve`, `assemble_rt`, `assemble`, `assemble_core` and 5 more. +//! Split out of `original_mtp_full_owner` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AdoptParts, Context, DraftAttachmentTables, DraftAttachmentTarget, Error, ModelBinding, MoeWeightCache, + MtpHeadSources, MtpOriginalInt8, OriginalDraftSession, OriginalMtpActor, OriginalMtpDraftHead, OriginalMtpDrafter, + OriginalMtpFullAssembly, OriginalMtpFullOwner, OriginalMtpLoadError, OriginalMtpLoadMeter, OriginalMtpLoadPlan, + OriginalMtpRequest, OriginalMtpRetainedFullWeights, OriginalMtpRetainedPrefix, OriginalNativeOutput, + OriginalPromptEmbedding, Path, PreparedLoad, QwenSession, Rc, Result, RetainedOriginalMtpWeights, RtMtpLoad, + capture_of, driver_error, plan_error, +}; impl<'ctx> OriginalMtpFullOwner<'ctx> { /// `bind_bytes` for the startup reserve (generate.cpp `mtp.bind_bytes(...)`): diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_request.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_request.rs index 7897192a..98a2a695 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_request.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_full_owner/original_mtp_request.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338. +//! Methods of `OriginalMtpRequest`: `ring_int8`. +//! Implements `From for OriginalMtpLoadError`, `From for OriginalMtpLoadError`. Functions: `plan_error`, `capture_of`. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, Error, ModelBinding, OriginalMtpCapture, OriginalMtpKvStartup, OriginalMtpLoadError, + OriginalMtpLoadFailure, OriginalMtpPlanError, OriginalMtpRequest, Stage, +}; impl OriginalMtpRequest { /// Original defaults: window 32768 and the INT8 window-ring draft state. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/driver_error.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/driver_error.rs index 80158cc6..df7e03da 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/driver_error.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/driver_error.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn driver_error. +//! Functions: `driver_error`. +//! Split out of `original_mtp_verified_adapter` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::Error; pub(super) fn driver_error(error: leleka_cuda_driver::Error) -> Error { if crate::driver_errors_traced() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_mtp_draft_receipt.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_mtp_draft_receipt.rs index a0f032c2..f4ab3d3c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_mtp_draft_receipt.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_mtp_draft_receipt.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338. +//! Methods of `OriginalMtpDraftReceipt`: `ids`, `probabilities`, `count`, `first_position` and 2 more. +//! Methods of `OriginalVerifiedMtpReceipt`: `new`, `commit_origin_foreign`, `after_target_commit`. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, Error, ModelBinding, NativeHeadSelection, OriginalCommittedMtpReceipt, OriginalDraftSession, + OriginalMtpDraftReceipt, OriginalVerifiedMtpReceipt, OriginalVerifyWindow, QwenSession, Result, TargetStepOrigin, + TargetStepProduct, VerifiedWindow, driver_error, +}; impl<'ctx> OriginalMtpDraftReceipt<'ctx> { pub(in crate::qwen_forward) fn ids(&self) -> &[i32] { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_prompt_executor.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_prompt_executor.rs index aaffa468..0d766959 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_prompt_executor.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_mtp_verified_adapter/original_prompt_executor.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptExecutor. +//! Methods of `OriginalPromptExecutor`: `launch_committing_mtp`, `admit_launch`, `launch_origin`, `finish_committing... +//! Split out of `original_mtp_verified_adapter` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AcceptedWindow, CompletedOriginalMtpDraft, DraftLaunch, DraftTarget, Error, ModelBinding, MtpDraftOwners, + NativeHeadSelection, OriginalCommittedMtpReceipt, OriginalLaunchedMtpDraft, OriginalMtpDraftReceipt, + OriginalPromptExecutor, OriginalVerifyWindow, QwenSession, RepeatRowWindow, Result, SamplerParams, + TargetStepOrigin, WindowOrigins, driver_error, +}; impl<'ctx> OriginalPromptExecutor<'ctx> { /// generate.cpp's order without the host wait between them: the verifier commit of `accepted_row + 1` rows is diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion.rs index e1ec98bb..466ee814 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl DraftCompletion, impl ServedWindow, impl OriginalServeEngine, impl -//! OriginalDraftEngine_for_OriginalServeEngine, impl OriginalSpecEngine_for_OriginalServeEngine. +//! Groups the submodules `original_serve_engine_original_spec_engine`, `serve_engine_draft_commit`. +//! Split out of `original_serve_engine` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + CommittedWindow, DraftCompletion, DraftLimits, DraftPick, DraftStage, Error, FirstStage, MAX_T, + OriginalDraftEngine, OriginalServeEngine, OriginalServePort, OriginalSpecEngine, Rc, Result, ServedWindow, + TargetSeedRow, +}; mod original_serve_engine_original_spec_engine; mod serve_engine_draft_commit; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/original_serve_engine_original_spec_engine.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/original_serve_engine_original_spec_engine.rs index fe8e4a5a..80d3aebc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/original_serve_engine_original_spec_engine.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/original_serve_engine_original_spec_engine.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl OriginalSpecEngine_for_OriginalServeEngine. +//! Implements `OriginalSpecEngine for OriginalServeEngine`. +//! Split out of `draft_completion` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Error, OriginalServeEngine, OriginalServePort, OriginalSpecEngine, Rc, Result, ServedWindow}; impl OriginalSpecEngine for OriginalServeEngine

{ type Verified = ServedWindow; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/serve_engine_draft_commit.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/serve_engine_draft_commit.rs index 0363e579..3889d20e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/serve_engine_draft_commit.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/draft_completion/serve_engine_draft_commit.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl DraftCompletion, impl ServedWindow, impl OriginalServeEngine, impl -//! OriginalDraftEngine_for_OriginalServeEngine. +//! Methods of `DraftCompletion`: `validate`. Methods of `ServedWindow`: `rows`, `committed_rows`. +//! Implements `OriginalDraftEngine for OriginalServeEngine`. -#[allow(unused_imports)] -use super::*; +use super::{ + CommittedWindow, DraftCompletion, DraftLimits, DraftPick, DraftStage, Error, FirstStage, MAX_T, + OriginalDraftEngine, OriginalServeEngine, OriginalServePort, Rc, Result, ServedWindow, TargetSeedRow, +}; impl DraftCompletion { pub(in super::super) fn validate(&self, vocabulary: u32, max_picks: usize, cell: i64, row: usize) -> Result<()> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally.rs index e2937095..c96ee985 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338. +//! Defines `RoundTally`. +//! Split out of `original_serve_engine` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + ADAPTIVE_DEFAULT, AdaptiveConfig, CommittedWindow, DraftCompletion, DraftLimits, DraftPick, DraftStage, EnvSource, + Error, FirstDraftSeed, FirstStage, MAX_T, NanGuard, OriginalFirstDraftEngine, OriginalServeEngine, + OriginalServePort, OriginalServeSettings, OriginalSpecController, OriginalSpecEngine, Result, ServeOutcome, + ServeStop, SpecConfig, SpecError, SpecWindow, TracePort, +}; /// The produced-token and round counters of one served request, and why it stopped if a round decided that. struct RoundTally { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_engine_original_first_draft.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_engine_original_first_draft.rs index ed1f4806..42f26fd1 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_engine_original_first_draft.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_engine_original_first_draft.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl OriginalFirstDraftEngine_for_OriginalServeEngine. +//! Implements `OriginalFirstDraftEngine for OriginalServeEngine`. +//! Split out of `round_tally` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + DraftLimits, DraftPick, DraftStage, Error, FirstDraftSeed, FirstStage, OriginalFirstDraftEngine, + OriginalServeEngine, OriginalServePort, Result, +}; /// Seed receipt for the CLI `draft_first` path; same one-shot caching. impl OriginalFirstDraftEngine for OriginalServeEngine

{ diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_settings.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_settings.rs index b0c5802b..3750c636 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_settings.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/original_serve_settings.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeSettings, fn serve_request. +//! Methods of `OriginalServeSettings`: `mode17`, `from_environment`, `adaptive_wanted`, `arms_from_environment` and ... +//! Methods of `SpeculativeRequest`: `from_request`. Functions: `serve_request`. -#[allow(unused_imports)] -use super::*; +use super::{ + ADAPTIVE_DEFAULT, AdaptiveConfig, EnvSource, MAX_T, NanGuard, OriginalServeSettings, OriginalSpecController, + OriginalSpecEngine, Result, RoundTally, ServeOutcome, ServeStop, SpecConfig, SpecError, SpecWindow, serve_rounds, +}; impl OriginalServeSettings { pub(crate) fn mode17(max_context: i64, vocabulary: u32, coupled: bool) -> Self { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/serve_rounds.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/serve_rounds.rs index 31da9df6..532074f8 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/serve_rounds.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/round_tally/serve_rounds.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338. +//! Implements `OriginalServePort for TracePort`. Functions: `serve_rounds`, `serve_round`, `tr_port`. +//! Split out of `round_tally` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + CommittedWindow, DraftCompletion, DraftLimits, FirstDraftSeed, OriginalServePort, OriginalSpecController, + OriginalSpecEngine, Result, RoundTally, ServeStop, SpecError, TracePort, +}; pub(super) fn serve_rounds( controller: &mut OriginalSpecController, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/constructor_validates_dimensions.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/constructor_validates_dimensions.rs index a3e306bf..d9f50afa 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/constructor_validates_dimensions.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/constructor_validates_dimensions.rs @@ -2,8 +2,17 @@ //! verify_returns_all_t_outputs_and_requires_a_drained_window, out_of_range_tokens_never_reach_the_port, //! a_short_or_invalid_window_is_drained_not_leaked .... +use super::{ + Error, Fake, OriginalDraftEngine, OriginalServeEngine, OriginalSpecEngine, VOCAB, engine, events, idx, model, + prompt, seed_row, verify_commit, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AdaptiveConfig, DraftPick, DraftPreparation, DraftSampling, EnvSource, MAX_T, NanGuard, OriginalFirstDraftEngine, + OriginalServePort, OriginalSpecController, Rc, RefCell, Result, ServeCallbacks, SpecConfig, SpecError, SpecWindow, + SpeculativeRequest, TargetSeedRow, VerifiedWindow, +}; #[test] fn constructor_validates_dimensions() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/restore_attempts_do_not_depend.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/restore_attempts_do_not_depend.rs index e9b295ac..94500fb0 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/restore_attempts_do_not_depend.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_engine/tests/restore_attempts_do_not_depend.rs @@ -3,8 +3,18 @@ //! a_refused_window_is_taken_back_only_after_it_drained_and_a_failed_take_back_poisons, //! first_draft_path_is_cached_and_drains, controller_over_the_engine_emits_the_greedy_continuation .... +use super::{ + ADAPTIVE_DEFAULT, AdaptiveConfig, DraftPreparation, DraftSampling, Error, Fake, OriginalDraftEngine, + OriginalFirstDraftEngine, OriginalServeEngine, OriginalServeSettings, OriginalSpecController, OriginalSpecEngine, + ServeStop, SpecConfig, SpecError, SpecWindow, SpeculativeRequest, VOCAB, VerifiedWindow, engine, events, idx, + model, prompt, prompt_long, run_request, seed_row, serve, serve_in, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + DraftPick, EnvSource, MAX_T, NanGuard, OriginalServePort, Rc, RefCell, Result, ServeCallbacks, TargetSeedRow, + verify_commit, +}; #[test] fn restore_attempts_do_not_depend_on_engine_health_and_reset_draft_state() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/original_serve_host_native_serve_host.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/original_serve_host_native_serve_host.rs index aa829ee8..9dce20ea 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/original_serve_host_native_serve_host.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/original_serve_host_native_serve_host.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl NativeServeHost_for_OriginalServeHost. +//! Implements `NativeServeHost for OriginalServeHost`. +//! Split out of `original_serve_host` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AcceptedWindow, DraftCompletion, DraftLaunch, Error, LedgerCheckpoint, MtpDraftOwners, NativeServeHost, + OriginalCommittedMtpReceipt, OriginalDraftCheckpoint, OriginalGpuEvent, OriginalNativeHeadGraphResources, + OriginalServeHost, OriginalVerifier, OriginalVerifyGraphResources, OriginalVerifyWindowResult, Result, Stage, + adapt_defer, ple_on_chain, profile, report_window, +}; use crate::qwen_forward::original_mtp_verified_adapter::VerifiedWindow; use crate::qwen_forward::original_serve_engine::{DraftLimits, FirstDraftSeed}; use crate::qwen_forward::original_serve_native::NativeCommittedWindow; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/ple_on_chain.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/ple_on_chain.rs index 93a5ed8b..8f292303 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/ple_on_chain.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/ple_on_chain.rs @@ -7,8 +7,7 @@ //! only the last draft's row is gathered after the chain. The values are the ones the window would gather itself: //! same provider, same sixteen rows. -#[allow(unused_imports)] -use super::*; +use super::{Context, InputStage, KarPleCache, ModelBinding, OriginalServeHost, Result, profile}; use crate::settings::PleOnChain; use leleka_cuda_driver::compute_drain::LocalDrain; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/request_sampling.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/request_sampling.rs index 9a04a1e2..7ca6ca10 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/request_sampling.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/request_sampling.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl RequestSampling, fn serial_publish, fn operator_line, impl -//! OriginalServeHost, fn adapt_defer, impl OriginalServeHost. +//! Methods of `RequestSampling`: `new`, `enabled`. +//! Methods of `OriginalServeHost`: `new`, `from_owners`, `position`, `settle_state` and 10 more. -#[allow(unused_imports)] -use super::*; +use super::{ + BoundLayerKind, DraftCompletion, Error, GdnPrior, HostOutcome, HostOwners, OriginalNativeHeadGraphResources, + OriginalServeHost, OriginalVerifier, OriginalVerifyGraphResources, PlePrior, RequestSampling, Result, + SamplerParams, SamplerPath, ServeFailure, ServeLedger, TargetStepOrigin, driver_error, profile, read_ple_history, +}; use crate::qwen_forward::{ original_mtp_verified_adapter::OriginalMtpDraftReceipt, qsa_index::prompt_device::resident_device::ResidentQsaPrior, }; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/window_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/window_parts.rs index 7c37d233..12dddeb4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/window_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_host/window_parts.rs @@ -4,8 +4,11 @@ use super::super::original_serve_pool::window_trace; use super::super::output_native::{HeadSamplerChoice, SamplingWindow}; -#[allow(unused_imports)] -use super::*; +use super::{ + Error, InputStage, OriginalNativeHeadGraphResources, OriginalServeHost, OriginalServePool, OriginalVerifier, + OriginalVerifyGraphResources, OriginalVerifyWindowResult, Result, ServeFailure, TargetStepOrigin, operator_line, + profile, +}; use leleka_cuda_driver::{ NativeHeadSampling, OriginalGpuStream, OriginalVerifyCpuRows, OriginalVerifyCpuSink, OriginalVerifyWindowTokens, }; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_serve_port_original_serve_port.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_serve_port_original_serve_port.rs index 03a87919..642e2022 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_serve_port_original_serve_port.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_serve_port_original_serve_port.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServePort_for_NativeServePort. +//! Implements `OriginalServePort for NativeServePort`. Functions: `start_foreign`, `check_completed`. +//! Split out of `original_serve_native` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + CommittedWindow, DraftCompletion, DraftLimits, Error, FirstDraftSeed, NativeServeHost, NativeServePort, + NativeWindow, OriginalNativeHeadGraphResources, OriginalServePort, OriginalVerifyGraphResources, + OriginalVerifyWindow, RefCell, Result, overlap, profile, trace_draft_line, +}; impl<'ctx, R, H> OriginalServePort for NativeServePort<'ctx, R, H> where diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_window.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_window.rs index 10addb08..1c4c78e9 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_window.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_native/native_window.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl NativeWindow, impl NativeServePort, fn trace_logprobs, fn -//! trace_draft, fn trace_draft_line, fn trace_residual .... +//! Methods of `NativeWindow`: `generation`. +//! Methods of `NativeServePort`: `new`, `verifier`, `verifier_mut`, `host` and 13 more. -#[allow(unused_imports)] -use super::*; +use super::{ + DraftCompletion, DraftLimits, Error, NativeCommittedWindow, NativeServeHost, NativeServePort, NativeWindow, + OriginalNativeHeadGraphResources, OriginalVerifier, OriginalVerifyGraphResources, Result, profile, +}; impl NativeWindow { pub(in crate::qwen_forward) fn generation(&self) -> u64 { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/cpu_expert_pool.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/cpu_expert_pool.rs index 3f37cd30..cf28cdb8 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/cpu_expert_pool.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/cpu_expert_pool.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl CpuExpertPool. +//! Methods of `CpuExpertPool`: `run_entries`, `admit_rows`, `plan_group`, `run_direct` and 6 more. +//! Functions: `legacy_batch`, `prepare_legacy_jobs`, `validate_legacy_job`, `compare_rows` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + BATCH_ALLOWANCE, ComputeSample, CpuExpertPool, CpuMissWorkspace, Error, ExpertJob, GroupTraceInfo, GroupWork, + HIDDEN, JOBS_PER_BATCH, ModelBinding, MoeMatrixRole, OriginalVerifyCpuRows, OriginalVerifyCpuSink, + ResidentExpertBankSpan, Result, TOP_K, binding_error, borrow_experts, compute_into_sink, group_formats, + output_offset, plan_experts_where, runtime_error, scatter, selection, sink_result, window_trace, +}; /// One group of CPU expert entries: its input rows, the sink their outputs are written to and which entries the CPU /// owns (`None`: all). diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_parts.rs index 7e1214be..9e8f3fbb 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_parts.rs @@ -2,8 +2,11 @@ //! the //! order `run_direct` ran it. -#[allow(unused_imports)] -use super::*; +use super::{ + BorrowedExpert, BorrowedGroup, DirectCpuPool, DirectTier, DownFormat, Error, ExpertJob, GateUpFormat, + GroupTraceInfo, HIDDEN, ModelBinding, Opened, OriginalVerifyCpuRows, OriginalVerifyCpuSink, ResidentExpertBankSpan, + Result, TOP_K, native_cpu_error, prefetch_off_file_exists, runtime_error, window_trace, +}; /// The experts of the plan as ids for `open_group`. pub(super) fn plan_expert_ids(plan: &[ExpertJob]) -> Result> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier.rs index 26eff3e9..b6c812aa 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier.rs @@ -1,8 +1,13 @@ -//! Moved out of the parent module by STRA-338: impl DirectTier, impl CpuExpertPool, impl -//! OriginalServePool_for_CpuExpertPool. +//! Methods of `DirectTier`: `admit_all`, `start_lookahead`, `layer_layout`, `index` and 7 more. +//! Methods of `CpuExpertPool`: `new`, `with_path`. Implements `OriginalServePool for CpuExpertPool`. -#[allow(unused_imports)] -use super::*; +use super::{ + ComputeSample, CpuExpertPool, CpuMissWorkspace, CrosscheckCounts, DirectCpuPool, DirectTier, EXPERTS, Error, + LayerLayout, ModelBinding, MoeExpertWeights, MoeMatrixRole, MoeRoutedSourceScope, Opened, OriginalGpuStream, + OriginalServePool, OriginalVerifyCpuRows, OriginalVerifyCpuSink, PoolPath, ResidentExpertBankSpan, Result, + RouterLookahead, TOP_K, admit_eager, admit_job, binding_error, native_cpu_error, open_job, runtime_error, + same_spans, +}; impl DirectTier { /// Admit every routed expert of every layer now (stack open), through the same `open_group` admission the decode diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier_drop.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier_drop.rs index 1e225e49..d51d6204 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier_drop.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/direct_tier_drop.rs @@ -1,8 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl Drop_for_DirectTier, fn admit_eager, fn sink_result, fn -//! native_cpu_error, fn selection. +//! Implements `Drop for DirectTier`. Functions: `admit_eager`, `sink_result`, `native_cpu_error`, `selection`. +//! Split out of `original_serve_pool` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{DirectTier, Error, Result, TOP_K}; impl Drop for DirectTier { fn drop(&mut self) { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/prefetch_off_file_exists.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/prefetch_off_file_exists.rs index 08d057f8..fa1e207c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/prefetch_off_file_exists.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_pool/prefetch_off_file_exists.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn prefetch_off_file_exists, fn plan_experts, fn plan_experts_where, fn -//! output_offset, fn scatter, impl PoolPath .... +//! Methods of `PoolPath`: `from_env`. +//! Functions: `prefetch_off_file_exists`, `plan_experts`, `plan_experts_where`, `plan_row` and 7 more. -#[allow(unused_imports)] -use super::*; +use super::{ + EXPERTS, Error, ExpertJob, HIDDEN, ModelBinding, MoeMatrixRole, MoeRoutedSourceScope, Opened, PoolPath, + ResidentExpertBankSpan, Result, TOP_K, binding_error, runtime_error, validate_triplet, +}; /// A bring-up file (`LELEKA_CPU_PREFETCH_OFF_FILE`, A/B inside one engine): while it exists the page-touch pass is /// skipped, whatever the policy says. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_config.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_config.rs index 434963a0..20d4ac6d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_config.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_config.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl PrefixConfig, fn admission_reading, fn wall_ms, fn lcp. +//! Methods of `PrefixConfig`: `auto`, `validate`, `resolved_block`, `resolve_budget`. +//! Functions: `admission_reading`, `lcp`. -#[allow(unused_imports)] -use super::*; +use super::{Error, PolicyParams, PrefixBudget, PrefixConfig, TailMode, budget}; impl PrefixConfig { pub(crate) fn auto() -> Self { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve.rs index bdc1eed0..2f130e79 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl PrefixServe. +//! Groups the submodules `prefix_serve_after_phase_parking`, `prefix_serve_store_and_shedding`. +//! Split out of `prefix` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AnyClock, ByteSize, ChunkOutcome, Clock, Consider, Error, PendingTail, PrefixConfig, PrefixDevice, PrefixMatch, + PrefixServe, PrefixStore, PrefixSummary, Req, Start, Stats, Stopwatch, StoreConfig, TailMode, admission_reading, + budget, fingerprint, lcp, +}; #[path = "prefix_serve/prefix_serve_after_phase_parking.rs"] mod prefix_serve_after_phase_parking; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_after_phase_parking.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_after_phase_parking.rs index dd78e3ce..241c511c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_after_phase_parking.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_after_phase_parking.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl PrefixServe (2). +//! Methods of `PrefixServe`: `after_chunk`, `plan_chunk`, `park_chunk`, `park_missing` and 16 more. Defines `Point`. +//! Split out of `prefix_serve` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + ByteSize, ChunkOutcome, Clock, Consider, Error, PendingTail, PrefixDevice, PrefixServe, PrefixStore, TailMode, + admission_reading, budget, +}; use crate::prefix_cache::store::{Candidate, KeptTail, NodePayload}; use std::ops::ControlFlow; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_store_and_shedding.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_store_and_shedding.rs index b712b8fc..0112cd61 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_store_and_shedding.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/prefix_serve/prefix_serve_store_and_shedding.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl PrefixServe. +//! Methods of `PrefixServe`: `new`, `new_store`, `with_clock`, `wall_ms` and 23 more. Defines `ImportPlan`. +//! Split out of `prefix_serve` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AnyClock, ByteSize, Clock, Error, PrefixConfig, PrefixDevice, PrefixMatch, PrefixServe, PrefixStore, PrefixSummary, + Req, Start, Stats, Stopwatch, StoreConfig, fingerprint, lcp, +}; use crate::prefix_cache::store::Match; /// Where a prefix hit lands in the positional buffer. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/one_token_prompt_reads.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/one_token_prompt_reads.rs index de6aec91..aac693e0 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/one_token_prompt_reads.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/one_token_prompt_reads.rs @@ -4,8 +4,17 @@ //! the_budget_bounds_the_store_and_the_newest_frontier_survives, //! a_memory_shed_evicts_to_the_target_and_the_configured_budget_comes_back .... +use super::{ + Block, ChunkOutcome, Fake, G, PrefixBudget, PrefixConfig, PrefixServe, State, cfg, doc, full_digest, governor, + request, serve, session, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AnyClock, ByteSize, Bytes, Clock, Consider, Error, PlanLimits, PolicyParams, PrefixDevice, PrefixMatch, + PrefixStore, PrefixSummary, PromptOptions, PromptPath, PromptPlan, Reject, ResumePoint, Stats, Stopwatch, + StoreConfig, budget, turn, +}; /// Upstream 41cf05a0 `aece46db` (a 1-token prompt with `--spec`): the prompt has no token to read (the single token is /// the first diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/second_session.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/second_session.rs index a78870b1..df0c7671 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/second_session.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_prefix/tests/second_session.rs @@ -4,8 +4,15 @@ //! a_miss_resets_the_owners_so_nothing_is_claimed_even_if_the_request_is_cancelled_before_its_first_chunk, //! a_checkpoint_at_the_end_of_the_prefill_lets_the_next_turn_resume_at_the_exact_position .... +use super::{ + Block, Fake, G, PrefixServe, State, TailMode, cfg, doc, full_digest, request, serve, session, tail_serve, turn, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AnyClock, ByteSize, Clock, Consider, Error, PlanLimits, PolicyParams, PrefixDevice, PrefixMatch, PrefixStore, + PrefixSummary, PromptOptions, PromptPath, PromptPlan, Reject, ResumePoint, Stats, Stopwatch, StoreConfig, +}; #[test] fn a_second_session_with_the_same_system_prompt_resumes_from_the_shared_blocks_and_ends_in_the_full_reads_state() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_request/tests.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_request/tests.rs index f03769ef..833a3add 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_request/tests.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_request/tests.rs @@ -1,4 +1,4 @@ -//! Moved out of the parent file by STRA-338 (same module path as before). +//! Unit tests of `original_serve_request`. use super::super::original_serve_engine::ServeStop; use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/open_tier.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/open_tier.rs index 2a87c035..ee346b0c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/open_tier.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/open_tier.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn open_tier, fn pin_resident_complement, fn loan_slots, fn -//! refill_lent (per copy or batched), fn settle_refill, fn refill_defer_enabled, fn refill_batch_enabled. +//! Functions: `open_tier`, `fill_and_pin`, `read_profile`, `warn_decode_headroom` and 15 more. +//! Split out of `original_serve_residency` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/source_spans.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/source_spans.rs index 8895ecab..b0bb7b5a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/source_spans.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/source_spans.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn source_spans, impl OriginalServePool_for_GpuExpertPool, fn swap_wait. +//! Methods of `GpuExpertPool`: `admit_group`, `note_usage`, `split_group`, `current_pcie_num` and 7 more. +//! Implements `OriginalServePool for GpuExpertPool`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/span_cache_and_pcie_lag.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/span_cache_and_pcie_lag.rs index a6c5ed90..0ee82e2a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/span_cache_and_pcie_lag.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/span_cache_and_pcie_lag.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl std_fmt_Debug, fn span_cache_enabled, impl SpanCache, impl -//! PcieLag, impl PcieAuto, impl ResidencyState .... +//! Methods of `SpanCache`: `key`, `get`, `contains`, `insert`. +//! Methods of `PcieLag`: `from_environment`, `pcie_num`, `measure`, `round`. Implements `Debug for SpanCache`. -#[allow(unused_imports)] -use super::*; +use super::{ + EXPERTS, ExpertTierConfig, GpuExpertPool, LAYERS, PcieAuto, PcieLag, ResidencyState, ResidencyStats, + ResidentExpertBankSpan, Result, SpanCache, SwapSources, TOP_K, source_spans, +}; impl std::fmt::Debug for SpanCache { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/split_group_pcie.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/split_group_pcie.rs index 0d48bfb6..1c6688b9 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/split_group_pcie.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/split_group_pcie.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn split_group_pcie, fn pcie_locked_only, fn adapt_tuning, fn -//! adapt_decay, fn choose_swaps, fn choose_swaps_reference .... +//! Methods of `RoutedGroup`: `new`. Methods of `PcieShare`: `takes`. +//! Functions: `split_group_pcie`, `is_valid_expert`, `is_miss`, `group_firsts` and 14 more. -#[allow(unused_imports)] -use super::*; +use super::{ + ADAPT_DECAY_DEFAULT, EXPERTS, Error, GroupSplit, LAYERS, MAX_WINDOW_ENTRIES, ORIGINAL_VERIFY_MAX_PCIE_FETCHES, + OriginalVerifyGpuPlan, ResidencyStats, Result, Swap, TieOrder, +}; /// `split_group_tail` with a say in which misses may take the PCIe share: only an expert `pcie_ok` accepts is staged, /// the share diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/strata_pcie_auto_glue.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/strata_pcie_auto_glue.rs index 350b77c1..f75e8774 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/strata_pcie_auto_glue.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/strata_pcie_auto_glue.rs @@ -4,8 +4,7 @@ use super::super::original_serve_config::ExpertBlobSizes; use super::strata_pcie_auto::{PcieAutoInputs, PoolWork}; -#[allow(unused_imports)] -use super::*; +use super::{GpuExpertPool, LAYERS, ModelBinding, StrataPcieAuto, strata_pcie_auto}; /// The mean routed-expert blob size over the layers (Strata: the sum of `blob_bytes(l)` over `n_layers`); 0 when the /// layout cannot be read. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/tail_skip_rank.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/tail_skip_rank.rs index 8e90874a..594a7c04 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/tail_skip_rank.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_residency/tail_skip_rank.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: fn tail_skip_rank, fn set_tail_skip_arm, fn effective_tail_rank, impl -//! PcieMode, impl ExpertTierConfig, fn split_group .... +//! Methods of `PcieMode`: `graph_mode`. +//! Methods of `ExpertTierConfig`: `decode_headroom_mib`, `off`, `enabled`, `effective_slots` and 14 more. -#[allow(unused_imports)] -use super::*; +use super::{ + AtomicU32, EXPERTS, EnvSource, Error, ExpertTierConfig, GroupSplit, LAYERS, Ordering, OriginalExpertCache, PathBuf, + PcieMode, PcieSplitPolicy, Result, RoutedGroup, TAIL_SKIP_RANK, TAIL_UNRESOLVED, TOP_K, VERIFIER_ASSEMBLY_MIB, + split_group_pcie, strata_pcie_auto, +}; /// The tail-skip rank in force (0 = off): the environment, read once, unless a replay arm set it. pub(crate) fn tail_skip_rank() -> u32 { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_device_ports.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_device_ports.rs index aa4027a7..f154bb10 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_device_ports.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_device_ports.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl PrefixDevice_for_OriginalServeStack, impl -//! RequestOwners_for_OriginalServeStack. +//! Methods of `OriginalServeStack`: `settle_lent_refills`, `report_tier_request`, `pcie_num_for_report`, `report_req... +//! Implements `PrefixDevice for OriginalServeStack`, `RequestOwners for OriginalServeStack` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + Clock, Error, OriginalServeStack, PARKED_BYTES_PER_TOKEN, PARKED_STATE_ESTIMATE, ParkedBlock, PrefixDevice, + PromptWeights, RequestOwners, Result, ServeDevice, ServeError, ServeOutcome, ServeRequest, SpecError, StackBlock, + StackState, operator_text, original_serve_residency, profile, +}; /// The prefix cache's device side over the stack's own owners. impl<'a, 'ctx> PrefixDevice for OriginalServeStack<'a, 'ctx> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods.rs index ba66a301..8cfcfa68 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods.rs @@ -1,7 +1,26 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeStack. +//! Groups the submodules `decode_parts`, `decode_teardown`, `executor_opening` and 8 more. +//! Split out of `original_serve_stack` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AssembleFailure, AssembleInputs, Began, ChunkOutcome, Clock, Context, CpuExpertPool, DecodeGraphKey, + DecodeResources, DenseWeightCache, DeviceBuffer, DeviceRef, DraftAttachmentTables, DraftAttachmentTarget, Ended, + Error, ExecutorSizing, ExecutorTarget, ExpertBlobSizes, ExpertTierConfig, GpuExpertPool, GraphReuse, HostOwners, + KarPleCache, LOAN_TIER_ROWS, LoanTier, MTP_RESIDENT_CELLS, ModelBinding, MoeWeightCache, NativeHeadDispatch, + NativeServePort, OriginalDraftCheckpoint, OriginalExpertCache, OriginalMtpFullOwner, OriginalMtpFullPolicy, + OriginalMtpRequest, OriginalNativeOutput, OriginalNativePenaltyHistory, OriginalPrefillArena, + OriginalPromptEmbedding, OriginalPromptExecutor, OriginalPromptInput, OriginalServeEngine, OriginalServeHost, + OriginalServePool, OriginalServeSettings, OriginalServeStack, OriginalSessionCheckpoint, OriginalSpecController, + OriginalVerifyExpertFormats, PARKED_BYTES_PER_TOKEN, PARKED_STATE_ESTIMATE, PINNED_MODEL, PLE_HISTORY_BYTES, + PLE_SCRATCH_BYTES, PlanLimits, PrefillLayoutOptions, PrefixMatch, PrefixServe, PrefixSummary, PromptChunk, + PromptOptions, PromptPath, PromptPlan, PromptWeights, QwenSession, Rc, RearmSeed, RequestSampling, ResidencyState, + Result, ResumeDevice, ResumePoint, RopeConstants, RtMtpLoad, SeedReport, ServeConversation, ServeError, + ServeFailure, ServeOutcome, ServeRequest, SpecError, StackBlock, StackConfig, StackPoint, StackState, TailMode, + TierState, TtftMarks, VOCABULARY, VerifyWeights, Why, assemble_with_window_fallback, at, cluster_topk_requested, + dbg_el, decode_graph_reuse, disassemble, expert_formats, failure, mtp_full_policy, mtp_scalar_policy, + operator_line, operator_note, operator_text, original_serve_residency, original_serve_seed, plan_error, + prefill_bytes, prefill_layout_options, profile, report_kernel_selection, run_request, seed_ple_history, + serve_request, tier_for, vram_note, +}; mod decode_parts; use decode_parts::{ diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_parts.rs index 5aec34eb..26bb672f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_parts.rs @@ -2,8 +2,13 @@ //! fields it //! touches, so the destructured borrows of `decode_phase` stay as they were and the order of operations is unchanged. -#[allow(unused_imports)] -use super::*; +use super::{ + AssembleFailure, AssembleInputs, CpuExpertPool, DecodeResources, DenseWeightCache, Error, ExpertBlobSizes, + ExpertTierConfig, GpuExpertPool, ModelBinding, MoeWeightCache, OriginalExpertCache, OriginalPromptExecutor, + OriginalServeSettings, OriginalSpecController, QwenSession, ResidencyState, Result, ServeFailure, SpecError, + StackConfig, assemble_with_window_fallback, disassemble, failure, operator_line, operator_text, + original_serve_residency, profile, +}; use crate::qwen_forward::moe_weight_cache::SharedKeys; use crate::qwen_forward::original_serve_host::HostOutcome; use leleka_cuda_driver::{OriginalQsaMappedJournal, OriginalQsaResidentIndex}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_teardown.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_teardown.rs index 40064df6..d5cf3295 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_teardown.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/decode_teardown.rs @@ -2,8 +2,10 @@ //! and a request that ended cleanly - park it, lend the owners home and keep it for the next request (ledger row Q7). use super::decode_parts::{QsaOwnerHome, QsaOwners, adopt_disassembled, release_mtp}; -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DecodeGraphKey, DecodeResources, Ended, Error, GraphReuse, ModelBinding, MoeWeightCache, + OriginalPromptExecutor, ServeFailure, disassemble, failure, operator_line, profile, vram_note, +}; use crate::qwen_forward::moe_weight_cache::SharedKeys; use crate::qwen_forward::original_serve_host::HostOutcome; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/executor_opening.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/executor_opening.rs index 0f7f8802..71c1a6b8 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/executor_opening.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/executor_opening.rs @@ -1,7 +1,6 @@ //! How the prompt executor and its MTP drafter are opened. -#[allow(unused_imports)] -use super::*; +use super::{MTP_RESIDENT_CELLS, OriginalMtpRequest, StackConfig}; /// 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. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/open_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/open_parts.rs index 40c642cb..e43de79f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/open_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/open_parts.rs @@ -2,8 +2,15 @@ //! in the //! order `open` called it, with the same stage marks, notes and error context. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, DraftAttachmentTables, DraftAttachmentTarget, Error, ExecutorOpening, ExecutorSizing, + ExecutorTarget, KarPleCache, LOAN_TIER_ROWS, LoanTier, ModelBinding, MoeWeightCache, NativeHeadDispatch, + OriginalExpertCache, OriginalMtpFullOwner, OriginalNativeOutput, OriginalPromptEmbedding, OriginalPromptExecutor, + OriginalServeSettings, OriginalSpecController, PARKED_BYTES_PER_TOKEN, PARKED_STATE_ESTIMATE, PINNED_MODEL, + PrefillLayoutOptions, PrefixServe, PromptWeights, QwenSession, Rc, RtMtpLoad, ServeFailure, StackBlock, + StackConfig, StackState, VOCABULARY, at, dbg_el, failure, operator_note, original_serve_residency, prefill_bytes, + vram_note, +}; use crate::qwen_forward::session::original_prompt::draft::OriginalDraftSession; /// The window policies of the environment: the live one, the parked arms and the widest window any of them needs. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase.rs index 02770f07..26ec057f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase.rs @@ -1,7 +1,18 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeStack (4). +//! Methods of `OriginalServeStack`: `decode_phase`. +//! Split out of `original_serve_stack_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AssembleFailure, AssembleInputs, Began, Context, CpuExpertPool, DecodeGraphKey, DecodeResources, DenseWeightCache, + DeviceBuffer, DeviceRef, Ending, Error, ExpertBlobSizes, GpuExpertPool, GraphReuse, HostOwners, KarPleCache, + ModelBinding, MoeWeightCache, OriginalExpertCache, OriginalMtpFullPolicy, OriginalNativeOutput, + OriginalNativePenaltyHistory, OriginalPromptExecutor, OriginalServeHost, OriginalServePool, OriginalServeSettings, + OriginalServeStack, OriginalSpecController, OriginalVerifyExpertFormats, QsaOwnerHome, QsaOwners, QwenSession, Rc, + RearmSeed, RefillOwners, RequestSampling, ResidencyState, Result, RopeConstants, ServeConversation, ServeEnv, + ServeOutcome, ServeRequest, SpecError, StackConfig, StackPoint, TailMode, TierResources, TtftMarks, VerifyWeights, + Why, assemble_decode, cluster_topk_requested, dbg_el, decode_pcie_mode, gpu_expert_pool, narrow_window_policy, + operator_text, profile, resolve_assembled, retire_kept, return_owners, seed_ple_history, serve_over_host, + settle_deferred_refill, teardown_decode, vram_note, +}; #[path = "original_serve_stack_decode_phase/decode_steps.rs"] mod decode_steps; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_steps.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_steps.rs index 3f3f9771..bfc31855 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_steps.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_steps.rs @@ -4,8 +4,14 @@ #[allow(unused_imports)] use super::decode_view::{Book, DecodeView, Extra, Ids, Owners, Policy, Reads, Refill, Tier}; -#[allow(unused_imports)] -use super::*; +use super::{ + AssembleFailure, AssembleInputs, Began, DecodeGraphKey, DecodeResources, DeviceBuffer, Ending, Error, + GpuExpertPool, HostOwners, ModelBinding, OriginalServeHost, OriginalServePool, OriginalServeStack, QsaOwnerHome, + QsaOwners, Rc, RearmSeed, RefillOwners, RequestSampling, Result, ServeEnv, ServeOutcome, ServeRequest, SpecError, + TailMode, TierResources, VerifyWeights, Why, assemble_decode, cluster_topk_requested, dbg_el, decode_pcie_mode, + gpu_expert_pool, narrow_window_policy, operator_text, profile, resolve_assembled, retire_kept, return_owners, + seed_ple_history, serve_over_host, settle_deferred_refill, teardown_decode, vram_note, +}; use crate::qwen_forward::moe_weight_cache::SharedKeys; use crate::qwen_forward::session::original_verified::OriginalVerifiedBase; use leleka_cuda_driver::OriginalVerifyQsaJournal; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_view.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_view.rs index e7e6534e..9976d2aa 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_view.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_decode_phase/decode_view.rs @@ -2,8 +2,13 @@ //! The stack's own layout is flat and the verifier window resources of an assembly borrow its caches for the whole //! phase, so the phases cannot be `&mut self` methods of the stack; each phase is a method of this view instead. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, CpuExpertPool, DecodeResources, DenseWeightCache, DeviceRef, Error, ExpertBlobSizes, GraphReuse, + KarPleCache, ModelBinding, MoeWeightCache, OriginalExpertCache, OriginalMtpFullPolicy, OriginalNativeOutput, + OriginalNativePenaltyHistory, OriginalPromptExecutor, OriginalServeSettings, OriginalServeStack, + OriginalSpecController, OriginalVerifyExpertFormats, QwenSession, ResidencyState, RopeConstants, ServeConversation, + StackConfig, StackPoint, TtftMarks, +}; use crate::qwen_forward::moe_weight_cache::SharedKeys; use crate::qwen_forward::session::original_prompt::draft::OriginalDraftSession; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_memory_classes.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_memory_classes.rs index 29ec253f..09005434 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_memory_classes.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_memory_classes.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeStack (2). +//! Methods of `OriginalServeStack`: `health`, `serve`, `apply_memory_directive`, `note_memory` and 23 more. +//! Split out of `original_serve_stack_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Error, ExpertTierConfig, OriginalServeStack, PLE_HISTORY_BYTES, PLE_SCRATCH_BYTES, PrefixMatch, PrefixSummary, + Result, SeedReport, ServeError, ServeOutcome, ServeRequest, TtftMarks, operator_note, original_serve_residency, + original_serve_seed, prefill_bytes, run_request, +}; // The formulas the inventory classes of `register_memory_classes` carry (reported next to their bytes). const KV_HOST_FORMULA: &str = diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_metrics_close.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_metrics_close.rs index 73e68e73..f35e044a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_metrics_close.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_metrics_close.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeStack (3). +//! Methods of `OriginalServeStack`: `prefix_metrics`, `prefix_bytes`, `prefix_budget_bytes`, `retire_held` and 2 more. +//! Split out of `original_serve_stack_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Error, ModelBinding, OriginalServeStack, Result, retire_kept}; impl<'a, 'ctx> OriginalServeStack<'a, 'ctx> { /// The prefix cache's metrics line (`None` when the cache is off). diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open.rs index ea1ade56..6de26861 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open.rs @@ -1,7 +1,17 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeStack. +//! Methods of `OriginalServeStack`: `open`. +//! Split out of `original_serve_stack_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, CpuExpertPool, DenseWeightCache, DeviceRef, Error, ExecutorOpening, ExpertBlobSizes, GraphReuse, + KarPleCache, LoanTier, ModelBinding, MoeWeightCache, OriginalDraftCheckpoint, OriginalExpertCache, + OriginalNativeOutput, OriginalNativePenaltyHistory, OriginalPrefillArena, OriginalPromptEmbedding, + OriginalPromptExecutor, OriginalServeStack, OriginalSessionCheckpoint, OriginalVerifyExpertFormats, + PLE_HISTORY_BYTES, PLE_SCRATCH_BYTES, Policies, PrefillLayoutOptions, PrefixServe, QwenSession, Rc, ResidencyState, + RopeConstants, ServeConversation, ServeFailure, StackBlock, StackConfig, StackPoint, StackState, Weights, at, + check_open, decode_graph_reuse, expert_formats, failure, load_weights, loan_ladder, log_open_inventory, + mtp_full_policy, mtp_scalar_policy, open_executor, open_expert_cache, open_prefix, operator_text, + prefill_layout_options, report_kernel_selection, serve_policies, share_rt_dense_roles, vram_note, +}; #[path = "original_serve_stack_open/open_phases.rs"] mod open_phases; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open/open_phases.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open/open_phases.rs index 0da2bef4..6c212676 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open/open_phases.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_open/open_phases.rs @@ -1,8 +1,15 @@ //! Phases of `OriginalServeStack::open`, moved out of it by STRA-338 (size): each helper runs one step of the startup //! in the order `open` called it, with the same stage marks, notes and error context. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, CpuExpertPool, DenseWeightCache, DeviceRef, ExecutorOpening, KarPleCache, LoanTier, ModelBinding, + MoeWeightCache, OriginalDraftCheckpoint, OriginalExpertCache, OriginalNativeOutput, OriginalNativePenaltyHistory, + OriginalPrefillArena, OriginalPromptEmbedding, OriginalPromptExecutor, OriginalSessionCheckpoint, + PLE_HISTORY_BYTES, PLE_SCRATCH_BYTES, PrefillLayoutOptions, PrefixServe, QwenSession, Rc, ResidencyState, + ServeConversation, ServeFailure, StackBlock, StackConfig, StackPoint, StackState, Weights, at, load_weights, + loan_ladder, open_executor, open_expert_cache, open_prefix, report_kernel_selection, share_rt_dense_roles, + vram_note, +}; use crate::qwen_forward::session::original_prompt::draft::OriginalDraftSession; /// What every phase of the startup reads: the binding, the context, the configuration and the prompt layout. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_chunk.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_chunk.rs index c401b028..7ea70044 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_chunk.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_chunk.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeStack (6). +//! Methods of `OriginalServeStack`: `prefill_chunk`, `prefix_after_prefill`, `prefix_after_decode`, `prefix_after_re... +//! Functions: `report_decode_tail`, `lend_tail`. -#[allow(unused_imports)] -use super::*; +use super::{ + ChunkOutcome, Error, OriginalExpertCache, OriginalPrefillArena, OriginalPromptInput, OriginalServeStack, + PrefixServe, PromptChunk, Rc, ResumeDevice, ServeRequest, SpecError, StackBlock, StackState, TierState, + operator_text, profile, tier_for, +}; impl<'a, 'ctx> OriginalServeStack<'a, 'ctx> { /// One batched chunk of `count` rows from the session's position: the forward transaction and its publication. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_phase.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_phase.rs index b63a7a61..701296b1 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_phase.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/original_serve_stack_prefill_phase.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalServeStack (5). +//! Methods of `OriginalServeStack`: `prefill_phase`, `refill_deferred`, `begin_prefill`, `refill_after_read` and 8 m... +//! Functions: `trace_action`, `seed_rows_capped`, `trace_seed_report`, `coverage_by_layer`. -#[allow(unused_imports)] -use super::*; +use super::{ + Clock, Error, ModelBinding, OriginalPromptInput, OriginalServeStack, PlanLimits, PromptOptions, PromptPath, + PromptPlan, Rc, Result, ResumePoint, SeedReport, ServeRequest, SpecError, dbg_el, original_serve_residency, + original_serve_seed, plan_error, profile, +}; impl<'a, 'ctx> OriginalServeStack<'a, 'ctx> { /// Condition `prompt[resume..n-1]` through the batched Original prefill, one chunk transaction at a time diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/serve_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/serve_parts.rs index 020ed613..437a3bfa 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/serve_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/original_serve_stack_methods/serve_parts.rs @@ -1,7 +1,10 @@ //! The serve step of `OriginalServeStack::decode_phase`, moved out of `decode_parts` by STRA-338 (size). -#[allow(unused_imports)] -use super::*; +use super::{ + Clock, Error, NativeServePort, OriginalServeEngine, OriginalServeHost, OriginalServeSettings, + OriginalSpecController, Result, ServeConversation, ServeOutcome, ServeRequest, SpecError, StackConfig, StackPoint, + TtftMarks, VOCABULARY, dbg_el, operator_text, profile, serve_request, +}; use crate::qwen_forward::original_serve_engine::{OriginalServePort, ServeCallbacks, SpeculativeRequest}; use crate::qwen_forward::original_serve_host::HostOutcome; use leleka_cuda_driver::{OriginalVerifier, OriginalVerifyWindowResources}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/prompt_chunk.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/prompt_chunk.rs index 6e337048..b9a0f374 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/prompt_chunk.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/prompt_chunk.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl PromptChunk, fn vram_note, fn dbg_el, fn report_kernel_selection, -//! fn operator_note, fn operator_line .... +//! Methods of `PromptChunk`: `run`. Methods of `OriginalServeStack`: `prefix_resume`, `prefix_begin`. +//! Implements `ResumeDevice for OriginalServeStack`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_config_and_ttft_marks.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_config_and_ttft_marks.rs index 31d52b3d..04758a9b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_config_and_ttft_marks.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_config_and_ttft_marks.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl Default_for_TtftMarks, impl TtftMarks, impl StackConfig, fn -//! prefill_bytes, fn tier_for .... +//! Methods of `TtftMarks`: `start`, `since`, `note_first_round`, `as_array`. +//! Methods of `StackConfig`: `new`, `kv_footprint`, `capacity_invalid`, `context_invalid` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + ADMITTED_CAPACITIES, AnyClock, ByteSize, CPU_WORKERS, Clock, ConversationConfig, DEFAULT_CAPACITY, Error, + ExpertTierConfig, KvFormat, LoanTier, PlanError, PrefillLayoutOptions, Result, ServeFailure, StackBlock, + StackConfig, StackState, TtftMarks, +}; impl Default for TtftMarks { fn default() -> Self { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_groups.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_groups.rs index 49483b40..67232669 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_groups.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_stack/stack_groups.rs @@ -1,8 +1,11 @@ //! Groups of cohesive plain-data fields of `OriginalServeStack`, moved out of it by STRA-338 (size). None owns a //! device resource; each is declared at the position of its first member, so the stack's drop order is unchanged. -#[allow(unused_imports)] -use super::*; +use super::{ + Error, ExpertBlobSizes, LoanTier, OriginalMtpFullPolicy, OriginalMtpScalarPolicy, OriginalServeSettings, + OriginalSpecController, OriginalVerifyExpertFormats, PrefillLayoutOptions, ResidencyState, RopeConstants, + SeedReport, TtftMarks, +}; /// The per-request state the last request left behind; every field starts empty. #[derive(Default)] diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/assemble_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/assemble_parts.rs index d515e56f..253adce1 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/assemble_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/assemble_parts.rs @@ -1,8 +1,13 @@ //! Steps of `assemble`, moved out of it by STRA-338 (size): each helper does one step of the assembly in the order //! `assemble` ran it, with the same profile spans and the same failure ownership. -#[allow(unused_imports)] -use super::*; +use super::{ + AssembleFailure, AssembleInputs, Context, Error, ExpertBlobSizes, ModelBinding, OriginalNativeOutput, + OriginalQsaMappedJournal, OriginalQsaResidentIndex, OriginalVerifier, OriginalVerifyQsaJournal, + OriginalVerifyResources, OriginalVerifyWindowPolicy, OriginalVerifyWindowResources, PLE_HISTORY_BYTES, + QSA_CLUSTER_DEFAULT, QsaOwners, Rc, ServeFailure, VerifyWeights, gdn_layer_priors, verify_geometry, + window_cap_after, +}; use leleka_cuda_driver::{DeviceRef, OriginalNativeEmbedRows, OriginalVerifyCanonicalGdn, OriginalVerifyGeometry}; type Window<'ctx> = OriginalVerifyWindowResources<'ctx>; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/held.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/held.rs index ea5f9662..14bebdd0 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/held.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_serve_verifier/held.rs @@ -7,8 +7,10 @@ //! state at the start of the next. Every refusal or error answers `false` / `None`, and the policy then retires the //! assembly and records a new one: a kept assembly is never used after anything unexpected. -#[allow(unused_imports)] -use super::*; +use super::{ + DecodeResources, ModelBinding, OriginalQsaMappedJournal, OriginalQsaResidentIndex, OriginalVerifiedBase, QsaOwners, + gdn_layer_priors, place_owners, +}; use crate::qwen_forward::original_serve_stack::decode_graph_reuse::HeldAssembly; use leleka_cuda_driver::OriginalVerifyRearm; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/finish_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/finish_parts.rs index 89fb82c1..02a92ce5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/finish_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/finish_parts.rs @@ -2,8 +2,11 @@ //! the //! round's end in the order `finish_round` did it. -#[allow(unused_imports)] -use super::*; +use super::{ + AdaptivePolicy, Choice, CommittedRound, DraftBatch, DraftPlan, DraftPreparation, DraftSampling, Error, + OriginalSpecController, OriginalSpecEngine, Rc, Request, Result, SpecConfig, SpecError, SpecResult, VerifiedWindow, + trace_enabled, +}; use crate::qwen_forward::original_spec_adaptive::RoundFlags; use crate::qwen_forward::original_spec_policy::RoundOutcome; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_finish.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_finish.rs index 5010065e..e96db58b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_finish.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_finish.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl OriginalSpecController. +//! Methods of `OriginalSpecController`: `finish_round`, `finish_request`. +//! Split out of `original_spec_controller` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + CommittedRound, DraftBatch, Error, OriginalSpecController, OriginalSpecEngine, Result, RoundFacts, SpecResult, + combine_round, +}; impl OriginalSpecController { /// Call AFTER the committed tokens have been emitted. Exactly like serve, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods.rs index 11ec3cc7..cced210a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalSpecController. +//! Groups the submodules `commit_parts`, `verify_parts`, `original_spec_controller_start_request` and 1 more. +//! Split out of `original_spec_controller` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AdaptivePolicy, Choice, CommittedRound, DraftBatch, DraftPolicy, Error, MAX_T, NanGuard, Offer, Origin, + OriginalSpecController, OriginalSpecEngine, PrefixMemo, Rc, Request, Result, SpecConfig, SpecError, SpecResult, + SpecStats, SuffixDrafter, WindowFailure, +}; mod commit_parts; mod verify_parts; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/commit_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/commit_parts.rs index 5cedeb58..555124b8 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/commit_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/commit_parts.rs @@ -2,8 +2,7 @@ //! window is accepted, its prefix committed and the receipt handed back, in the order `verify_commit` did it. use super::verify_parts::{Round, WindowPlan}; -#[allow(unused_imports)] -use super::*; +use super::{CommittedRound, Error, MAX_T, OriginalSpecController, OriginalSpecEngine, Rc, SpecError, SpecResult}; /// The verified window of a round with the plan it ran under and the number of the round it completes. pub(super) type Judged<'p, V> = (V, &'p WindowPlan, u64); diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_start_request.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_start_request.rs index 20e7a07d..5aacf40b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_start_request.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_start_request.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl OriginalSpecController. +//! Methods of `OriginalSpecController`: `planned_host_bytes`, `new`, `set_final_draft`, `begin_request` and 11 more. +//! Split out of `original_spec_controller_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + AdaptivePolicy, DraftBatch, DraftPolicy, Error, MAX_T, OriginalSpecController, OriginalSpecEngine, PrefixMemo, Rc, + Request, Result, SpecConfig, SpecError, SpecStats, SuffixDrafter, +}; impl OriginalSpecController { /// Conservative preallocation ledger for Root before construction. Actual diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_verify_commit.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_verify_commit.rs index 10609935..249028bf 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_verify_commit.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/original_spec_controller_verify_commit.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl OriginalSpecController (2). +//! Methods of `OriginalSpecController`: `verify_commit`. +//! Split out of `original_spec_controller_methods` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{CommittedRound, Error, OriginalSpecController, OriginalSpecEngine, Round, SpecResult, window_inputs}; impl OriginalSpecController { pub(crate) fn verify_commit( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/verify_parts.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/verify_parts.rs index 44b3e99e..555c02c1 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/verify_parts.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/original_spec_controller_methods/verify_parts.rs @@ -2,8 +2,10 @@ //! the //! round in the order `verify_commit` did it, with the same checks, restores and log lines. -#[allow(unused_imports)] -use super::*; +use super::{ + AdaptivePolicy, Choice, DraftPolicy, Error, MAX_T, NanGuard, Offer, Origin, OriginalSpecController, + OriginalSpecEngine, Request, SpecConfig, SpecError, SpecResult, SuffixDrafter, WindowFailure, +}; /// The window the round will verify: its width and where the extra rows come from. pub(super) struct WindowPlan { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/adaptation_join_failure_is_reported.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/adaptation_join_failure_is_reported.rs index 14771078..09855f9d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/adaptation_join_failure_is_reported.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/adaptation_join_failure_is_reported.rs @@ -3,8 +3,18 @@ //! finish_round_refuses_a_receipt_from_another_controller, a_request_cannot_restart_while_a_draft_is_pending, //! policy_and_adaptive_cadence_survive_across_requests .... +use super::{ + DraftPick, DraftPreparation, DraftSampling, Error, Fake, FirstSeedPoint, OriginalFirstDraftEngine, + OriginalSpecController, Result, SpecConfig, SpecError, SpecWindow, VOCAB, begin, config, drive, expected, next, + prompt, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AdaptiveConfig, AdaptivePolicy, Choice, DraftBatch, DraftPlan, DraftPolicy, MAX_T, Offer, Origin, + OriginalDraftEngine, OriginalSpecEngine, PrefixMemo, Rc, RoundFacts, SpecStats, SuffixDrafter, TargetSeedRow, + VerifiedWindow, +}; #[test] fn adaptation_join_failure_is_reported_even_after_a_good_draft() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/config_rejects_out_of_range.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/config_rejects_out_of_range.rs index cf02f606..2354ef51 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/config_rejects_out_of_range.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/config_rejects_out_of_range.rs @@ -3,8 +3,17 @@ //! begin_request_validates_tokens_and_rejects_a_live_request, //! the_adaptive_window_emits_the_same_text_as_a_fixed_one_under_any_drafter .... +use super::{ + EndRunSetup, Error, Fake, NanGuard, OriginalSpecController, SpecConfig, SpecWindow, VOCAB, begin, config, drive, + expected, prompt, run_to_the_end, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AdaptiveConfig, AdaptivePolicy, Choice, DraftBatch, DraftPick, DraftPlan, DraftPolicy, DraftPreparation, + DraftSampling, FirstSeedPoint, MAX_T, Offer, Origin, OriginalDraftEngine, OriginalFirstDraftEngine, + OriginalSpecEngine, PrefixMemo, Rc, Result, RoundFacts, SpecStats, SuffixDrafter, TargetSeedRow, VerifiedWindow, +}; #[test] fn config_rejects_out_of_range_and_mtp_zero_means_max_t() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/non_finite_window.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/non_finite_window.rs index 5c60b962..7f81e87c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/non_finite_window.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/tests/non_finite_window.rs @@ -3,8 +3,17 @@ //! the_guard_costs_nothing_when_nothing_is_wrong, a_window_that_stays_non_finite_fails_the_request_after_the_retries, //! only_a_non_finite_failure_is_retried_and_a_guard_that_is_off_retries_nothing .... +use super::{ + Error, Fake, NanGuard, OriginalSpecController, OriginalSpecEngine, SpecError, VOCAB, begin, config, drive, + expected, guarded, prompt, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + AdaptiveConfig, AdaptivePolicy, Choice, DraftBatch, DraftPick, DraftPlan, DraftPolicy, DraftPreparation, + DraftSampling, FirstSeedPoint, MAX_T, Offer, Origin, OriginalDraftEngine, OriginalFirstDraftEngine, PrefixMemo, Rc, + Result, RoundFacts, SpecStats, SuffixDrafter, TargetSeedRow, VerifiedWindow, +}; #[test] fn a_non_finite_window_is_run_again_from_its_checkpoint_and_the_request_completes() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/trace_enabled.rs b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/trace_enabled.rs index 1cd791e1..8a3f322c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/trace_enabled.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/original_spec_controller/trace_enabled.rs @@ -1,8 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn trace_enabled, fn stats_enabled, impl From_for_SpecError, impl -//! NanGuard, impl SpecConfig, impl CommittedRound. +//! Methods of `NanGuard`: `off`, `with_retries`, `with_injection`, `parse_switch` and 5 more. +//! Methods of `SpecConfig`: `new`, `with_nan_guard`, `with_adaptive`. Implements `From for SpecError`. -#[allow(unused_imports)] -use super::*; +use super::{AdaptiveConfig, CommittedRound, Error, MAX_T, NanGuard, Result, SpecConfig, SpecError, SpecWindow}; /// `LELEKA_SPEC_TRACE`: one `DBG spec-trace` line per timed round (width, source, accepted, round ms, the policy's /// expectation). diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/output/original_prompt_sample.rs b/crates/engine-qwen35-cuda/src/qwen_forward/output/original_prompt_sample.rs index 6c3bbfbd..e40fef9c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/output/original_prompt_sample.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/output/original_prompt_sample.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptSample, impl FiniteLogits. +//! Methods of `OriginalPromptSample`: `greedy`, `conditioning`, `validate`, `matches_final` and 3 more. +//! Methods of `FiniteLogits`: `validate_for`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage.rs index 2f50a5a3..3b504d18 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage.rs @@ -1,7 +1,13 @@ -//! Moved out of the parent module by STRA-338: impl OutputStage. +//! Groups the submodules `output_stage_load_and_logits`, `output_stage_sampling_projection`. +//! Split out of `output` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + ACTIVATION_BYTES, BindingIdentity, Context, DeviceBuffer, Dimension, EMBEDDING, Error, FiniteF32, FiniteLogits, + GrStage, HEAD_GREEDY_WORKSPACE_BYTES, HeadGreedySelection, InjectedResidual, LOGIT_BYTES, LayerId, LogitValues, + LogitsRow, ModelBinding, OUTPUT_STAGE_BUDGET, OUTPUT_WEIGHT_BYTES, OutputStage, Position, Q6KProjectionShape, + QwenStepTxn, ResidualAtLayer, Result, Stage, TokenId, VOCABULARY, binding_error, combine, decode_logits, + driver_error, encode_activation, greedy, selected_token, validate_weight_owner, +}; mod output_stage_load_and_logits; mod output_stage_sampling_projection; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_load_and_logits.rs b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_load_and_logits.rs index a0011d02..4232dff4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_load_and_logits.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_load_and_logits.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OutputStage. +//! Methods of `OutputStage`: `logits_original_prompt`, `finite_final_mix`, `certify_prompt_logits`, `load` and 13 more. +//! Split out of `output_stage` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_sampling_projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_sampling_projection.rs index 52d5f7c7..3c6a362d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_sampling_projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage/output_stage_sampling_projection.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OutputStage (2). +//! Methods of `OutputStage`: `sampler_wants`, `sample_complete`, `check_projection`, `with_projected` and 8 more. +//! Split out of `output_stage` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage_test_replay.rs b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage_test_replay.rs index 6956dc48..0ca188c4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage_test_replay.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/output/output_stage_test_replay.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl OutputStage, fn greedy, fn selected_token, fn -//! validate_weight_owner, fn encode_activation, fn decode_logits .... +//! Methods of `OutputStage`: `test_prefix_begin_target`, `test_reset_replay_record`, `test_reset_replay_capture`, `s... +//! Functions: `greedy`, `selected_token`, `validate_weight_owner`, `encode_activation` and 4 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/ple_key_retained_gpu/bf16.rs b/crates/engine-qwen35-cuda/src/qwen_forward/ple_key_retained_gpu/bf16.rs index 63b1be10..684c5895 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/ple_key_retained_gpu/bf16.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/ple_key_retained_gpu/bf16.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn bf16, fn source, fn exact, impl Matrices, fn value_bytes, fn run .... +//! Methods of `Matrices`: `new`, `aux`, `unchanged`, `close`. +//! Methods of `Chain`: `key_value`, `norms`, `gate`, `gated` and 2 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/compose_inner.rs b/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/compose_inner.rs index 08994a11..b1b53abd 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/compose_inner.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/compose_inner.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn compose_inner, fn compose_observed, fn compose_queued. +//! Functions: `compose_inner`, `finish_streams`, `project_key_value`, `gate_of` and 7 more. Defines `ConvOperands`. +//! Split out of `ple_transport` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/role.rs b/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/role.rs index 6fc785a4..0d49a691 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/role.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/ple_transport/role.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl Role, impl Transport, impl Drop_for_Transport, fn at, fn compose, -//! fn admit. +//! Methods of `Role`: `count`. Methods of `Transport`: `new`, `note`, `allocate`, `buffer` and 8 more. +//! Implements `Drop for Transport`. Functions: `at`, `compose`, `admit`. -#[allow(unused_imports)] -use super::*; +use super::{ + Cell, Context, DeviceBuffer, Error, Finite, PLE_HC, PLE_HISTORY, PleCandidate, PleRows, Rc, Result, Role, + Transport, compose_inner, ple_budget, ple_download, ple_driver_error, ple_values, +}; use leleka_cuda_driver::PleClosedWeights; impl Role { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read.rs index fb0b30d3..c94fe0ca 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read.rs @@ -1,8 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl PromptDeviceRead, fn produce_original_gdn, fn -//! produce_original_qsa, impl PromptDeviceNormedRows, impl PromptDeviceRead. +//! Groups the submodules `produce_original_gdn`, `read_completion`. +//! Split out of `prompt_device_rows` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, Dimension, Error, GrRole, InputReady, LayerId, ModelBinding, OriginalDeviceBlock, + OriginalDeviceGrRead, OriginalDeviceNormedResidual, OriginalPromptDevice, OriginalPromptPhase, OriginalPromptTxn, + PromptDeviceNormedRows, PromptDeviceRead, PromptDeviceRows, PromptWeights, QwenStepTxn, Result, TokenLayer, + micro_driver_error, run_transfer, +}; mod produce_original_gdn; mod read_completion; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/produce_original_gdn.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/produce_original_gdn.rs index a11d6664..87f2787c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/produce_original_gdn.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/produce_original_gdn.rs @@ -1,8 +1,12 @@ -//! Moved out of the parent module by STRA-338: fn produce_original_gdn, fn produce_original_qsa, impl -//! PromptDeviceNormedRows, impl PromptDeviceRead. +//! Methods of `Lap`: `new`, `off`, `at`. Methods of `GdnLayer`: `enter`, `compute`, `leave`. +//! Functions: `produce_original_gdn`, `produce_original_qsa`, `normed_gamma`, `produce_block` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, Error, GrRole, InputReady, LayerId, ModelBinding, OriginalDeviceBlock, + OriginalDeviceGrRead, OriginalDeviceNormedResidual, OriginalPromptDevice, OriginalPromptTxn, + PromptDeviceNormedRows, PromptDeviceRead, PromptWeights, QwenStepTxn, Result, TokenLayer, micro_driver_error, + run_transfer, +}; use super::super::super::gdn::chunk_device::{ChunkEdge, GdnChunkDevice}; use super::super::super::gdn::{GdnPrior, PromptLayer, PromptProgram, PromptSource}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/read_completion.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/read_completion.rs index ab910c31..5a18b1bc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/read_completion.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_device_read/read_completion.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl PromptDeviceRead. +//! Methods of `PromptDeviceRead`: `validate_original_rows`, `validate_row`, `device`, `attention_layer` and 8 more. +//! Split out of `prompt_device_read` to keep its files under the line limit. use super::super::super::gdn::PromptSource; use super::produce_original_gdn::{ diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_ple_history.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_ple_history.rs index 7e9fa0f0..45667a80 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_ple_history.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/prompt_ple_history.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl PromptPleHistory, fn micro_driver_error. +//! Methods of `PromptPleHistory`: `from_prior`, `into_completed`, `close`. +//! Functions: `micro_driver_error`, `run_transfer`. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Context, Error, ModelBinding, OriginalPleHistory, OriginalPromptDevice, PlePrior, + PromptPleHistory, PromptWeights, Result, +}; use leleka_cuda_driver::NativeBatchWorkspace; impl<'ctx> PromptPleHistory<'ctx> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref.rs index 70eb67b5..cbdb16d7 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref.rs @@ -1,8 +1,13 @@ -//! Moved out of the parent module by STRA-338: impl std_ops_Deref, impl PromptDeviceSource, impl PromptDeviceFinal, -//! impl Sources, impl PromptDeviceRows. +//! Groups the submodules `prompt_device_rows`, `prompt_device_rows_ple_read`, `source_input_deref`. +//! Split out of `prompt_device_rows` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Context, DenseWeightCache, Dimension, Error, FinalProduct, GrRole, InputReady, LayerId, + ModelBinding, OriginalDeviceGrRead, OriginalDeviceResidual, OriginalPromptDevice, OriginalPromptPhase, + OriginalPromptRowKey, OriginalPromptRows, OriginalPromptTxn, Position, PromptDeviceFinal, PromptDeviceRead, + PromptDeviceRows, PromptDeviceSource, PromptPleHistory, PromptWeights, QwenStepTxn, Rc, Result, RowsUpload, + SourceInput, Sources, TokenId, TokenLayer, micro_driver_error, run_transfer, +}; mod prompt_device_rows; mod prompt_device_rows_ple_read; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows.rs index fce0eed5..3f8ec7d5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows.rs @@ -1,7 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl PromptDeviceRows. +//! Methods of `PromptDeviceRows`: `final_point`, `preview_conditioning`, `preview_final`, `with_final_residual` and ... +//! Split out of `std_ops_deref` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, Error, FinalProduct, GrRole, ModelBinding, OriginalDeviceResidual, OriginalPromptDevice, + OriginalPromptPhase, OriginalPromptRows, OriginalPromptTxn, Position, PromptDeviceFinal, PromptDeviceRows, + PromptDeviceSource, PromptWeights, QwenStepTxn, Rc, Result, RowsUpload, Sources, TokenId, TokenLayer, + micro_driver_error, run_transfer, +}; impl<'source, 'arena, 'loan, 'ctx> PromptDeviceRows<'source, 'arena, 'loan, 'ctx> { /// The final phase of `txn` is the one these rows hold: its phase, and the last row's token and position. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows_ple_read.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows_ple_read.rs index 5e057ba4..4ce3a820 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows_ple_read.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/prompt_device_rows_ple_read.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl PromptDeviceRows (2). +//! Methods of `PromptDeviceRows`: `apply_ple`, `check_ple`, `ple_weights`, `read` and 1 more. +//! Split out of `std_ops_deref` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, Error, GrRole, ModelBinding, OriginalDeviceGrRead, OriginalDeviceResidual, + OriginalPromptDevice, PromptDeviceRead, PromptDeviceRows, PromptPleHistory, PromptWeights, Result, + micro_driver_error, run_transfer, +}; impl<'source, 'arena, 'loan, 'ctx> PromptDeviceRows<'source, 'arena, 'loan, 'ctx> { pub(in crate::qwen_forward) fn apply_ple( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/source_input_deref.rs b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/source_input_deref.rs index a5507fc0..4eda4dab 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/source_input_deref.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/prompt_device_rows/std_ops_deref/source_input_deref.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl std_ops_Deref, impl PromptDeviceSource, impl PromptDeviceFinal, -//! impl Sources. +//! Methods of `PromptDeviceSource`: `from_current`, `check_input_values`, `from_original`. +//! Methods of `PromptDeviceFinal`: `validate`, `token`, `position`, `streams` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Context, DenseWeightCache, Dimension, Error, FinalProduct, GrRole, InputReady, LayerId, + ModelBinding, OriginalPromptPhase, OriginalPromptRowKey, OriginalPromptTxn, Position, PromptDeviceFinal, + PromptDeviceSource, PromptWeights, QwenStepTxn, Rc, Result, SourceInput, Sources, TokenId, TokenLayer, +}; impl std::ops::Deref for SourceInput<'_> { type Target = InputReady; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/column_projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/column_projection.rs index 1305e000..836ac057 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/column_projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/column_projection.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn project_impl. +//! Methods of `RowFactory`: `row`. +//! Functions: `check_inputs`, `check_row`, `check_successor`, `gdn_matrix_of` and 8 more. Defines `RowFactory`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/projection_row.rs b/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/projection_row.rs index 3a98ad88..0e1ad339 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/projection_row.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/projection_row.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl Role, impl RetainedColumns, impl Drop_for_RetainedColumns, impl -//! RetainedRow, impl ProjectionRow, fn project .... +//! Methods of `Role`: `rows`, `qsa`. Methods of `RetainedColumns`: `buffer`. Implements `Drop for RetainedColumns`. +//! Functions: `project`, `project_retained`. -#[allow(unused_imports)] -use super::*; +use super::{ + ColumnKey, ColumnTarget, Context, DenseWeightCache, DeviceBuffer, Error, GrRole, LayerId, ModelBinding, + ProjectionRow, Provider, QsaMatrixRole, QwenChunkTxn, Rc, ResidualReady, Result, RetainedColumns, RetainedRow, + Role, RowAdmission, project_impl, validate_values, +}; impl Role { pub(super) fn rows(self) -> usize { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/q6_numeric.rs b/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/q6_numeric.rs index 53b9b6fe..418ee618 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/q6_numeric.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/q6_attention_columns/q6_numeric.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn numeric, fn numeric_retained. +//! Methods of `Q6Job`: `fence_refusal`, `admit_budget`, `project`, `download` and 1 more. +//! Functions: `numeric`, `numeric`, `numeric_retained`, `numeric_retained` and 1 more. Defines `Q6Buffers`, `Q6Job`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/decode_selected_cached.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/decode_selected_cached.rs index 790a1572..76d8436a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/decode_selected_cached.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/decode_selected_cached.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn decode_selected_cached, fn attend_retained, fn gate_retained, fn -//! upload_retained_bytes, fn upload_retained_f32, fn release_retained .... +//! Methods of `AttendBuffers`: `upload`, `launch`. +//! Functions: `decode_selected_cached`, `attend_selected`, `settle_retained`, `attend_retained` and 8 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/native_attended.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/native_attended.rs index a38b362a..b20eb631 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/native_attended.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/native_attended.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl NativeAttended, impl NativePromptAttentionBatch. +//! Methods of `NativeAttended`: `identity`, `values`, `gate`, `validate` and 4 more. +//! Methods of `NativePromptAttentionBatch`: `complete`, `owner`, `publish_row`, `locate` and 6 more. #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] use super::super::qsa_index::QsaPending; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/qsa_ready.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/qsa_ready.rs index e0a727db..bf8a55af 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/qsa_ready.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_attention/qsa_ready.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QsaReady, impl QsaAttentionStage, impl QsaGated, fn decode_cached. +//! Methods of `QsaReady`: `identity`, `output`, `validate_origin`. +//! Methods of `QsaAttentionStage`: `decode_native`, `complete_native`, `decode`, `decode_selected` and 4 more. #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] use super::super::{ diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/context.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/context.rs index 6a24150a..22db4250 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/context.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/context.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn context, fn device_peak, impl QsaOwner, impl QsaPrior. +//! Methods of `QsaOwner`: `new`, `matches`. +//! Methods of `QsaPrior`: `oracle_capture_parts`, `test_reset_replay_numeric_eq`, `same_native_kv`, `same_pages` and... #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/index_kernels.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/index_kernels.rs index 59f770c5..75bb6d83 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/index_kernels.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/index_kernels.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: fn norm, fn rope, fn split, fn pack, fn append, fn select .... +//! Functions: `norm`, `upload_gamma`, `release_gamma`, `run_norm` and 15 more. Defines `BlockQuery`. +//! Split out of `qsa_index` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, DeviceBuffer, Error, KV, ModelBinding, Norm, PackedKv, Q, QGate, QsaLayerProjection, + QsaMatrixKind, QsaMatrixLayout, QsaMatrixRole, QsaWeights, Result, allocate, binding_error, dispatch_projection, + download, download_bytes, driver_error, release, reserve, upload, validate_ids, validate_values, +}; pub(super) fn norm( context: &Context<'_>, diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_index_stage.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_index_stage.rs index 6ca2d25a..f7b8fdd2 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_index_stage.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_index_stage.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QsaIndexStage. +//! Methods of `QsaIndexStage`: `prepare`, `prepare_projected`, `prepare_impl`, `prepare_host_rows` and 4 more. +//! Methods of `QsaPrep`: `layer_projection`, `project`, `project_column`, `key_stage` and 5 more. Defines `QsaPrep`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_pending.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_pending.rs index 8cecb516..da6fc5ca 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_pending.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_pending.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QsaPending, impl QsaPrepared. +//! Methods of `QsaPending`: `new`, `next_pooled`, `admit`, `next_page` and 5 more. +//! Methods of `QsaPrepared`: `identity`, `validate_for`, `validate_binding`, `validate_origin` and 7 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_projection.rs index fbc8ac73..c32ace55 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/qsa_projection.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: fn dispatch_projection, fn project_input_columns, fn project_input, fn -//! project_input_numeric, fn project_cached_out, fn project_out_numeric .... +//! Functions: `dispatch_projection`, `project_input`, `project_input_numeric`, `project_cached_out` and 4 more. +//! Defines `QsaMatrixLayout`, `QsaLayerProjection`, `ProjectionSources`. -#[allow(unused_imports)] -use super::*; +use super::{ + Bf16ProjectionShape, Cell, Context, DenseFormat, DenseWeightCache, DeviceBuffer, DriverError, Error, ModelBinding, + ProjectionKind, ProjectionSpec, Q5KProjectionShape, Q6KProjectionShape, QsaGated, QsaInputLease, QsaMatrixKind, + QsaMatrixRole, QsaWeights, Result, allocate, device_peak, download, driver_error, project, validate_values, +}; use crate::qwen_forward::gdn::LeaseClaim; /// The device shape of one QSA projection: the quantization kind of its matrix, the columns it reads and the rows it diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/validate_ids.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/validate_ids.rs index 2cb4ed92..3b1a0ee5 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/validate_ids.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index/validate_ids.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: fn validate_ids, fn validate_half, fn validate_values, fn reserve, fn -//! upload, fn upload_bytes .... +//! Functions: `validate_ids`, `validate_half`, `validate_values`, `reserve` and 10 more. +//! Split out of `qsa_index` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, DeviceBuffer, DriverError, Error, InputBindingError, ModelBinding, QsaMatrixKind, + QsaMatrixLayout, QsaMatrixRole, QsaWeights, Result, Stage, context, dispatch_projection, +}; pub(in super::super) fn validate_ids(ids: &[i32], n: u64) -> Result<()> { if n == 0 || n > context() as u64 || ids.len() != usize::try_from(n).map_err(|_| Error::Overflow)?.min(2051) { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/max_rows.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/max_rows.rs index 83ba4f54..bcda3540 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/max_rows.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/max_rows.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn max_rows, fn update, fn capacity, fn upload_words, fn delta, impl -//! QsaIndexKeyCache. +//! Methods of `QsaIndexKeyCache`: `layer_bytes`, `new`, `with_eager`, `admit_mirror` and 9 more. +//! Functions: `max_rows`, `update`, `append_rows`, `capacity` and 2 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/synthetic_late_prior.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/synthetic_late_prior.rs index 637eadd1..ed005940 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/synthetic_late_prior.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_index_resident/synthetic_late_prior.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn synthetic_late_prior, fn synthetic_late_prior_for. +//! Functions: `synthetic_late_prior`, `synthetic_late_prior_for`. +//! Split out of `index_resident` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/native_projection_row.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/native_projection_row.rs index 3be3d37b..a3ad4853 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/native_projection_row.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/native_projection_row.rs @@ -1,8 +1,13 @@ -//! Moved out of the parent module by STRA-338: fn native_error, fn native, impl NativeProjectionRow, fn project, fn -//! chunk_owners, fn check_batch .... +//! Methods of `NativeProjectionRow`: `validate`, `same_row`, `check_values`, `validate_fresh` and 7 more. +//! Functions: `native_error`, `native`, `project`, `chunk_owners` and 4 more. -#[allow(unused_imports)] -use super::*; +use super::{ + AttentionRow, ChunkAttentionSlot, Context, DenseWeightCache, Error, GrRole, LayerId, ModelBinding, + NativeBatchWorkspace, NativeProjectionRow, NativeQsaDevices, PromptWeights, QsaInputWeights, QsaMatrixKind, + QsaMatrixRole, QsaNativeBatchWorkspace, QsaNativeKind, QsaResident, QsaWeights, QwenChunkTxn, QwenStepTxn, ROLES, + Rc, ResidualReady, Result, Stage, TargetStepOrigin, WIDTHS, check_batches, check_shapes, concat_mixed, + retained_matrices, split_rows, validate_values, +}; pub(super) fn native_error(error: leleka_cuda_driver::Error) -> Error { match error { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/projection_rows.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/projection_rows.rs index c8e77dc4..a155312c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/projection_rows.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_prefill_batch/projection_rows.rs @@ -1,8 +1,12 @@ -//! Moved out of the parent module by STRA-338: fn concat_mixed, fn check_batches, fn check_shapes, fn -//! retained_matrices, fn split_rows, fn row_values .... +//! Methods of `NativeOutRow`: `take`. +//! Functions: `concat_mixed`, `check_batches`, `check_shapes`, `retained_matrices` and 6 more. -#[allow(unused_imports)] -use super::*; +use super::{ + AttendedRows, BindingIdentity, Context, DenseWeightCache, DeviceBuffer, Error, LayerId, ModelBinding, + NativeBatchWorkspace, NativeOutRow, NativeProjectionRow, NativeQsaDevices, QsaGatedAttention, QsaMatrixKind, + QsaMatrixRole, QsaNativeBatchWorkspace, QsaNativeWeight, QsaResident, QsaWeights, QwenChunkTxn, ROLES, Rc, + ResidualReady, Result, Stage, TargetStepOrigin, WIDTHS, check_batch, native, native_error, validate_values, +}; use crate::qwen_forward::prompt_device_rows::PromptWeights; use crate::qwen_forward::qsa_attention::{ChunkLayer, ProvenRow}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_completed.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_completed.rs index eb637e4c..45b1cb5c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_completed.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_completed.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ResidentQsaCompleted. +//! Methods of `ResidentQsaCompleted`: `first`, `rows`, `layer`, `validate_rows` and 7 more. +//! Defines `ResidentSealOwners`. #[allow(unused_imports)] use super::resident_qsa_layer::mint; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_layer.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_layer.rs index 9ae7a65d..1b9f3f5e 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_layer.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_layer.rs @@ -1,7 +1,14 @@ -//! Moved out of the parent module by STRA-338: impl ResidentQsaLayer. +//! Methods of `ResidentQsaLayer`: `new`, `empty_guards`, `current`, `validate` and 11 more. +//! Functions: `check_empty`, `mint`, `rehome`, `resident_identities` and 1 more. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Context, DenseWeightCache, Error, InputReady, LayerId, ModelBinding, NativeBatchWorkspace, + OriginalDeviceGrRead, OriginalQsaIndexCheckpoint, OriginalQsaMappedJournal, OriginalQsaMappedPrefix, + OriginalQsaPromptWeights, OriginalQsaResidentIndex, OriginalQsaResidentTransport, Prior, QsaOwner, QsaPrior, + QsaResident, QsaWeights, QwenSession, Rc, ResidentContinuation, ResidentPrepareDevices, ResidentQsaLayer, + ResidentQsaOwners, ResidentQsaPrior, ResidentQsaPublication, ResidentQsaSeal, ResidentQsaSelection, Result, + TargetStepOrigin, TokenLayer, check_prompt_shapes, device_error, native, prompt_projections, +}; impl<'ctx> ResidentQsaLayer<'ctx> { pub(in crate::qwen_forward) fn new( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_prior.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_prior.rs index 6100d34d..262a2bed 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_prior.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_prior.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl ResidentQsaPrior, impl ResidentQsaPrior, impl ParkedLayerSpan. +//! Methods of `ResidentQsaPrior`: `next_position`, `layer`, `same_prior`, `validate_for_session` and 5 more. +//! Methods of `ParkedLayerSpan`: `bytes`. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Error, LayerId, ModelBinding, OriginalQsaIndexCheckpoint, OriginalQsaMappedPrefix, + ParkedLayerSpan, Prior, QwenSession, Rc, ResidentQsaPrior, Result, TargetStepOrigin, device_error, +}; impl ResidentQsaPrior<'_> { pub(in crate::qwen_forward) fn next_position(&self) -> u64 { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_span_export_and_seal.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_span_export_and_seal.rs index a89b6af4..5b276dac 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_span_export_and_seal.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_device/resident_qsa_span_export_and_seal.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ResidentQsaLayer (2), impl ResidentQsaPublication, impl -//! ResidentQsaSeal, impl ResidentQsaSelection, impl ResidentQsaRow. +//! Methods of `ResidentQsaLayer`: `export_span`, `export_kv`, `export_index`, `export_tail` and 5 more. +//! Methods of `ResidentQsaPublication`: `publish_validated`. Functions: `span_views`. Defines `SpanViews`. #[allow(unused_imports)] use super::resident_qsa_layer::rehome; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/gated_out_projection.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/gated_out_projection.rs index 48dc752e..3fc2e878 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/gated_out_projection.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/gated_out_projection.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: fn project_gated_out, fn release_gate_buffers, fn gate_and_out. +//! Functions: `out_matrix`, `project_gated_out`, `release_gate_buffers`, `gate_and_out`. +//! Split out of `scalar` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + BoundDense, Context, DenseWeightCache, DeviceBuffer, Error, GateBuffers, GateDevices, GateRows, ModelBinding, + QsaMatrixKind, QsaMatrixRole, QsaWeights, Result, Stage, allocate, apply_gate, download, driver, + project_scratch_out_numeric, upload_gate_inputs, validate_values, +}; /// The `Out` matrix of the layer's QSA weights; the weights must be the resident ones and quantized. fn out_matrix<'a, 'ctx>( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_admission.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_admission.rs index 0d3b23cc..212c632a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_admission.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_admission.rs @@ -1,7 +1,13 @@ -//! Moved out of the parent module by STRA-338. +//! Methods of `ScalarHost`: `gather`, `select`. +//! Methods of `ResidentQsaLayer`: `scalar_guards`, `check_scalar_prior`, `prepare_scalar`. -#[allow(unused_imports)] -use super::*; +use super::{ + Context, DenseWeightCache, DeviceBuffer, Error, GrRole, LayerId, ModelBinding, NativeBatchWorkspace, + OriginalQsaIndexCheckpoint, OriginalQsaResidentIndex, OriginalQsaResidentScalarIndex, + OriginalQsaResidentScalarSelection, QsaMatrixRole, QsaResident, QwenStepTxn, Rc, ResidentContinuation, + ResidentQsaLayer, ResidentQsaPrior, ResidentQsaScalar, ResidualReady, Result, ScalarContinuation, ScalarHost, + ScalarStep, ScalarStepRows, device_error, project, validate_values, +}; pub(super) fn driver(e: leleka_cuda_driver::Error) -> Error { device_error(e) diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_run.rs b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_run.rs index f4454537..e1c89836 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_run.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/qsa_resident_scalar/scalar_row_run.rs @@ -1,7 +1,13 @@ -//! Moved out of the parent module by STRA-338. +//! Methods of `ResidentQsaScalar`: `validate`, `check_identity`, `attend`, `gate_out` and 3 more. +//! Methods of `ResidentQsaScalarReady`: `into_parts`, `check_identity`. -#[allow(unused_imports)] -use super::*; +use super::{ + BoundDense, Cell, Context, DenseWeightCache, Error, GateBuffers, GateDevices, GateRows, GrRole, LayerId, + ModelBinding, NativeBatchWorkspace, OriginalQsaMappedAppend, QsaAttentionInputs, QsaNativeDecode, QsaNativeGate, + QsaResident, QwenStepTxn, Rc, ResidentQsaScalar, ResidentQsaScalarReady, ResidentQsaSeal, ResidualReady, Result, + ScalarOwners, ScalarStep, TargetStepOrigin, TokenLayer, allocate, driver, gate_and_out, mint, upload, + validate_values, +}; /// The transaction, the input row and the projection branch agree with the layer before any lineage is looked at. fn validate_scalar_row( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/report.rs b/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/report.rs index 3b2c7a32..3275ad14 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/report.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/report.rs @@ -1,8 +1,13 @@ -//! Moved out of the parent module by STRA-338: impl Report, fn valid_product, fn float_bytes, fn close_all, fn -//! finish, fn original_project .... +//! Methods of `Report`: `guard`, `compare`. +//! Functions: `valid_product`, `float_bytes`, `close_all`, `finish` and 12 more. +use super::{ + Bf16ProjectionShape, Context, DeviceBuffer, Error, MATRIX_BYTES, Report, Result, RouterBuffers, map_driver_error, + validate_activation, validate_logits, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{AssertUnwindSafe, BindingIdentity, Cell, Driver, GrRole, Rc, RefMut, ResidualReady, TokenLayer, report}; impl Report { pub(super) fn guard(&mut self, passed: bool) { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/valid_reset.rs b/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/valid_reset.rs index 8b80f807..99a6e0bc 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/valid_reset.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/router_scratch_gpu/valid_reset.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: fn valid_reset, fn numeric. +//! Methods of `Env`: `reset`, `project_refused`, `route_refused`, `project_refused_late`. Methods of `Held`: `release`. +//! Functions: `valid_reset`, `stage_buffers`, `install_workspace`, `open_proof` and 1 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_session.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_session.rs index f4e6370b..b395d36b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_session.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_session.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenSession, impl QwenSession. +//! Methods of `QwenSession`: `note_mtp_failure`, `finish_mtp_device`, `new`, `for_binding` and 11 more. +//! Functions: `layers_of_kind`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn.rs index 81c7a7be..5ad862ad 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl QwenStepTxn. +//! Groups the submodules `qwen_step_txn_inputs`, `qwen_step_txn_prior_finish`. +//! Split out of `session` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, Context, Dimension, Error, FiniteLogits, GdnPending, GdnPrior, GrRole, InjectedResidual, + InputReady, LayerId, PlePending, PlePrior, Position, QsaIndexPrior, QsaPending, QwenSession, QwenStepTxn, Rc, + Result, STATE_CAPACITY, Stage, TargetStepOrigin, TokenId, TokenLayer, greedy, +}; mod qwen_step_txn_inputs; mod qwen_step_txn_prior_finish; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_inputs.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_inputs.rs index a5bfb8dd..3d390aae 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_inputs.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_inputs.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenStepTxn. +//! Methods of `QwenStepTxn`: `token`, `position`, `residual_handoff_owner`, `validate_projection_branch` and 18 more. +//! Split out of `qwen_step_txn` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_prior_finish.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_prior_finish.rs index f932a4cf..99a929cd 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_prior_finish.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session/qwen_step_txn/qwen_step_txn_prior_finish.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenStepTxn (2). +//! Methods of `QwenStepTxn`: `qsa_prior`, `initial_qsa_prior`, `validate_qsa_prior`, `stage_qsa` and 8 more. +//! Functions: `next_ple`, `next_gdn`, `next_qsa`, `check_forward_output` and 1 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session/reset_replay_snapshot.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session/reset_replay_snapshot.rs index 92a47890..2a5751ed 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session/reset_replay_snapshot.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session/reset_replay_snapshot.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl ResetReplaySnapshot, impl QwenSession. +//! Methods of `ResetReplaySnapshot`: `has_prefix`, `numeric_eq`, `same_shape`, `retained_bytes`. +//! Methods of `QwenSession`: `oracle_capture_committed`, `validate_reset_states`, `validate_reset_ple`, `validate_re... #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/gdn_session_commit_advances_all.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/gdn_session_commit_advances_all.rs index 76d207db..135b8a9f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/gdn_session_commit_advances_all.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/gdn_session_commit_advances_all.rs @@ -4,8 +4,16 @@ //! context_seam_missing_owner_refuses_after_identity_checks, context_seam_wrong_thread_refuses_before_backend_access //! .... +use super::{ + BindingIdentity, Dimension, Error, GdnPending, InputReady, LayerId, QwenSession, Rc, Stage, TokenId, TokenLayer, + position, token, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + BoundLayerKind, Context, FiniteLogits, GdnOwner, GdnPrior, GrRole, InjectedResidual, ModelBinding, PleOwner, + PlePending, PlePrior, Position, QsaIndexPrior, QsaOwner, QsaPending, Result, TargetStepOrigin, ThreadId, +}; #[test] fn gdn_session_commit_advances_all_state_once_and_failed_reset_preserves_owner() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/retained_gr_handoff_identity.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/retained_gr_handoff_identity.rs index cdd59786..2a813873 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/retained_gr_handoff_identity.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session/tests/retained_gr_handoff_identity.rs @@ -4,8 +4,16 @@ //! headfree_prefill_refuses_zero_layer_fixture_and_preserves_history, //! qsa_session_prior_is_private_and_required_state_cannot_be_skipped .... +use super::{ + BindingIdentity, Dimension, Error, GdnOwner, GdnPending, GdnPrior, InputReady, LayerId, PleOwner, PlePending, + PlePrior, QsaIndexPrior, QsaOwner, QwenSession, Rc, Stage, TokenLayer, position, token, +}; +// used only with some cargo features of this crate #[allow(unused_imports)] -use super::*; +use super::{ + BoundLayerKind, Context, FiniteLogits, GrRole, InjectedResidual, ModelBinding, Position, QsaPending, Result, + TargetStepOrigin, ThreadId, TokenId, +}; #[test] fn retained_gr_handoff_identity_is_lazy_and_refuses_same_position_rebegin() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/gdn_chunk_start.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/gdn_chunk_start.rs index afb85607..7fde145b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/gdn_chunk_start.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/gdn_chunk_start.rs @@ -1,5 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl GdnChunkStart, impl GdnChunkRow, impl GdnChunkMicro, fn -//! same_window_proof, impl GdnChunkSeal, impl GdnChunkStart .... +//! Methods of `GdnChunkStart`: `prior`, `count`, `binding`, `validate_binding` and 2 more. +//! Methods of `GdnChunkRow`: `ordinal`, `identity`, `readout_key`, `matches_readout` and 1 more. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/host_charge_bounded.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/host_charge_bounded.rs index 72f3370d..9848d78b 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/host_charge_bounded.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/host_charge_bounded.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn host_charge_bounded. +//! Functions: `host_charge_bounded`. +//! Split out of `chunk` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Error, Rc, Result}; pub(super) fn host_charge_bounded(tokens: usize, end: u64, limit: usize) -> Result { if !(1..=limit).contains(&tokens) || end > crate::qwen_forward::contract::serving_cells() { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn.rs index af65438b..d154f393 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn. +//! Groups the submodules `qwen_chunk_txn_attention_sources`, `qwen_chunk_txn_begin`, `qwen_chunk_txn_ffn_after_atten... +//! Split out of `chunk` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_attention_sources.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_attention_sources.rs index a0e187fb..b0308c5c 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_attention_sources.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_attention_sources.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (5). +//! Methods of `QwenChunkTxn`: `check_attention_column`, `open_attention_sources`, `admit_row_ple`, `publish_attentio... +//! Defines `DeviceGdnFfn`. use super::super::super::super::gr::DetachedGrRead; -#[allow(unused_imports)] -use super::*; +use super::{ + AttentionSource, ChunkAttentionRow, ChunkFfnRow, Error, GdnChunkRow, GrRole, LayerId, Position, PreparedLayerRow, + QwenChunkTxn, QwenStepTxn, Rc, Result, Stage, TokenLayer, +}; /// The prepared MoE row and chunk edge of a device-GDN attention FFN. type DeviceGdnFfn = diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_begin.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_begin.rs index 89a7f3d3..e357e295 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_begin.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_begin.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn. +//! Methods of `QwenChunkTxn`: `native_prefill_host_charge`, `begin`, `begin_windowed256`, `begin_bounded` and 9 more. +//! Functions: `prompt_origin`, `prompt_end`, `check_vocab`, `admit_prompt_host` and 1 more. Defines `PromptAdmission`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_ffn_after_attention.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_ffn_after_attention.rs index c4a8fc55..71564bb9 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_ffn_after_attention.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_ffn_after_attention.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (7). +//! Methods of `QwenChunkTxn`: `ffn_after_attention_step`, `prepare_ffn_after_attention`, `check_edge_step`, `check_e... +//! Split out of `qwen_chunk_txn` to keep its files under the line limit. #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] use super::super::super::super::{gr::DetachedGrRead, moe_expert::PreparedMoeRow}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_finish_publish.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_finish_publish.rs index 39ab01ff..f091b984 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_finish_publish.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_finish_publish.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (9). +//! Methods of `QwenChunkTxn`: `finish`, `check_finishable`, `witness_for`, `run_head` and 7 more. +//! Split out of `qwen_chunk_txn` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + ChunkCommit, ChunkDraftPublication, ChunkRowResidual, Dimension, Error, GrRole, InjectedResidual, LayerId, + Position, QwenChunkTxn, QwenStepTxn, Rc, Result, STATE_CAPACITY, Stage, TokenId, +}; impl<'session, 'driver> QwenChunkTxn<'session, 'driver> { pub(in crate::qwen_forward) fn finish( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_gdn_micro.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_gdn_micro.rs index 20888902..e039763a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_gdn_micro.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_gdn_micro.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (6). +//! Methods of `QwenChunkTxn`: `prepare_attention_device_gdn`, `gdn_micro_cursors_off`, `gdn_micro_start`, `build_gdn... +//! Split out of `qwen_chunk_txn` to keep its files under the line limit. #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] use super::super::super::super::{gdn::chunk_device::ChunkEdge, gr::DetachedGrRead}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_layer_batch.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_layer_batch.rs index 0340d6d2..0ed34d29 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_layer_batch.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_layer_batch.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (8). +//! Methods of `QwenChunkTxn`: `row_step`, `check_layer_row`, `layer`, `prepare_layer_batch` and 13 more. +//! Split out of `qwen_chunk_txn` to keep its files under the line limit. use super::super::super::super::gdn::chunk_device::ChunkEdge; -#[allow(unused_imports)] -use super::*; +use super::{ + ChunkFfnRow, Context, Error, InjectedResidual, LayerId, Position, PreparedLayerRow, QwenChunkTxn, QwenSession, + QwenStepTxn, Rc, Result, Stage, +}; impl<'session, 'driver> QwenChunkTxn<'session, 'driver> { /// The step of row `index` over a fresh stage view: its input and completed-layer count come from the row. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_inputs.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_inputs.rs index c54d5b1f..ecaa7ccb 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_inputs.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_inputs.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (4). +//! Methods of `QwenChunkTxn`: `input`, `settle_failure`, `ple_micro_cursors_off`, `check_ple_micro` and 11 more. +//! Split out of `qwen_chunk_txn` to keep its files under the line limit. #[cfg(all(any(target_os = "linux", target_os = "windows"), target_arch = "x86_64"))] use super::super::super::super::gr::{DetachedGrRead, GrMicroInput}; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_window.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_window.rs index 9888b768..c287cfb7 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_window.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_micro_window.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (2). +//! Methods of `QwenChunkTxn`: `check_micro_open`, `micro_misaligned`, `phase_in_flight`, `micro_width` and 19 more. +//! Split out of `qwen_chunk_txn` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_rows_and_witness.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_rows_and_witness.rs index 554aabbd..cb5e4e29 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_rows_and_witness.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/qwen_chunk_txn/qwen_chunk_txn_rows_and_witness.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (3). +//! Methods of `QwenChunkTxn`: `qsa_prior_mismatch`, `validate_prompt_qsa_prior`, `original_session`, `rows` and 16 m... +//! Split out of `qwen_chunk_txn` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/test_gdn_component_rows.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/test_gdn_component_rows.rs index 18e2b54d..f72f2015 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/test_gdn_component_rows.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk/test_gdn_component_rows.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl TestGdnComponentRows. +//! Methods of `TestGdnComponentRows`: `new`, `start`, `row`, `seal`. +//! Split out of `chunk` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn.rs index 2fd94fd2..bd75d580 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn. +//! Groups the submodules `qwen_chunk_txn_begin_verification`, `qwen_chunk_txn_verification_state`, `qwen_chunk_txn_v... +//! Split out of `verify` to keep its files under the line limit. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_begin_verification.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_begin_verification.rs index c1e7c84a..1d25b932 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_begin_verification.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_begin_verification.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn. +//! Methods of `QwenChunkTxn`: `validate_verification_source`, `preflight_mtp_verification`, `begin_mtp_verification`... +//! Functions: `verification_total_charge`. Defines `ReplayInputs`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verification_state.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verification_state.rs index a7f12df1..0a06570f 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verification_state.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verification_state.rs @@ -1,4 +1,5 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (2). +//! Methods of `QwenChunkTxn`: `record_gdn_prior`, `record_qsa_prior`, `record_verification_prior`, `validate_state_g... +//! Functions: `journal_state`, `journal_state_mut`. #[allow(unused_imports)] use super::*; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verified_prefix.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verified_prefix.rs index ee7e3f61..645db8a8 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verified_prefix.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/qwen_chunk_txn/qwen_chunk_txn_verified_prefix.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl QwenChunkTxn (3). +//! Methods of `QwenChunkTxn`: `verified_prefix_seed`, `verified_rows`, `select_verified_prefix`, `prefix_mismatch` a... +//! Functions: `copy_streams`, `install_prefix`. -#[allow(unused_imports)] -use super::*; +use super::{ + ChunkCommit, ChunkRowResidual, Dimension, Error, LayerId, ModelBinding, Position, PrefixState, QwenChunkTxn, + QwenSession, Rc, Result, STATE_CAPACITY, Stage, TargetStepProduct, TokenId, VerifiedDraftPublication, + VerifiedTargetPrefix, greedy_prefix, +}; impl<'session, 'driver> QwenChunkTxn<'session, 'driver> { /// The source step is the target step just before this chunk; returns the seed it predicted. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/verified_target_prefix.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/verified_target_prefix.rs index 04403a92..e329e133 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/verified_target_prefix.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_chunk_verify/verified_target_prefix.rs @@ -1,8 +1,7 @@ -//! Moved out of the parent module by STRA-338: impl VerifiedTargetPrefix, fn verification_extra_charge, fn -//! greedy_prefix. +//! Methods of `VerifiedTargetPrefix`: `count`. Functions: `verification_extra_charge`, `greedy_prefix`. +//! Split out of `verify` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Error, PrefixState, Rc, Result, TokenId, VerifiedTargetPrefix}; impl VerifiedTargetPrefix { pub(in crate::qwen_forward) fn count(&self) -> usize { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_checkpoint.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_checkpoint.rs index 26e80c3a..4524ef8a 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_checkpoint.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_checkpoint.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl OriginalDraftCheckpoint, impl OriginalDraftSession. +//! Methods of `OriginalDraftCheckpoint`: `host_bytes`. +//! Methods of `OriginalDraftSession`: `new`, `from_original_ring`, `validate`, `checkpoint` and 7 more. -#[allow(unused_imports)] -use super::*; +use super::{ + CompletedOriginalMtpDraft, Context, Error, ModelBinding, MtpInt8Snapshot, MtpOriginalInt8, OriginalDraftCheckpoint, + OriginalDraftSession, OriginalPromptTxn, QwenSession, Result, TargetStepOrigin, WindowOrigins, draft_driver_error, +}; impl OriginalDraftCheckpoint { /// Host bytes of the ring image (prefix-cache accounting; pages shared with neighbouring points are counted in diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_session_ring_restore.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_session_ring_restore.rs index 41858d0e..6a929b89 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_session_ring_restore.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/original_draft_session_ring_restore.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalDraftSession (2), impl OriginalDraftPublication, impl -//! Drop_for_OriginalDraftSession. +//! Methods of `OriginalDraftSession`: `with_mtp_current_ring`, `check_publication`, `prepare_publication`, `restore_... +//! Methods of `OriginalDraftPublication`: `publish_validated`. Implements `Drop for OriginalDraftSession`. -#[allow(unused_imports)] -use super::*; +use super::{ + CompletedDraftKv, DenseWeightCache, Error, ModelBinding, MtpInt8Snapshot, MtpOriginalInt8, OriginalDraftCheckpoint, + OriginalDraftPublication, OriginalDraftSession, OriginalPromptTxn, QwenSession, Result, TargetStepOrigin, + draft_driver_error, published_first_materialized, +}; impl<'ctx> OriginalDraftSession<'ctx> { /// A completed MTP receipt is valid only for the exact committed target diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/published_first_materialized.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/published_first_materialized.rs index 6cf3d55d..e5344008 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/published_first_materialized.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_draft/published_first_materialized.rs @@ -1,7 +1,7 @@ -//! Moved out of the parent module by STRA-338: fn published_first_materialized, fn draft_driver_error. +//! Functions: `published_first_materialized`, `draft_driver_error`. +//! Split out of `draft` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{Error, Stage}; /// The ring's lower materialized bound after a prompt chunk `[start, end)` whose recording materialized /// `[chunk_first, end)`. The driver reports the chunk's own bound (`cell0 + r0`); when the chunk starts where diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input.rs index 692ad2d5..6d7c0779 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input.rs @@ -1,8 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptInput, impl QwenSession, impl QwenSession, impl -//! OriginalSessionCheckpoint, impl QwenSession, impl ParkedSession .... +//! Groups the submodules `original_prompt_input_qsa_seed`, `qwen_session`. +//! Split out of `original_prompt` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + DenseWeightCache, Dimension, Error, GdnPrior, LayerId, ModelBinding, OriginalPromptInput, + OriginalSessionCheckpoint, ParkedBlock, ParkedLayerSpan, ParkedPoint, ParkedPrefix, ParkedSession, PlePrior, + PromptWeights, QsaIndexPrior, QsaOwner, QwenSession, Rc, ResidentQsaLayer, ResidentQsaOwners, ResidentQsaPrior, + Result, STATE_CAPACITY, SpanExport, TargetStepOrigin, TokenId, +}; #[path = "original_prompt_input/original_prompt_input_qsa_seed.rs"] mod original_prompt_input_qsa_seed; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/original_prompt_input_qsa_seed.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/original_prompt_input_qsa_seed.rs index 34fded64..008ff5ca 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/original_prompt_input_qsa_seed.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/original_prompt_input_qsa_seed.rs @@ -1,8 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptInput, impl QwenSession, impl QwenSession, impl -//! OriginalSessionCheckpoint. +//! Methods of `OriginalPromptInput`: `from_tokenized`, `len`, `window`. +//! Methods of `QwenSession`: `validate_resident_qsa_owner`, `original_qsa_seed`, `install_original_qsa_seed`, `seed_... -#[allow(unused_imports)] -use super::*; +use super::{ + Dimension, Error, LayerId, ModelBinding, OriginalPromptInput, OriginalSessionCheckpoint, QsaIndexPrior, QsaOwner, + QwenSession, Rc, ResidentQsaPrior, Result, STATE_CAPACITY, TokenId, +}; impl OriginalPromptInput { pub(in crate::qwen_forward) fn from_tokenized(binding: &ModelBinding, tokens: &[u32]) -> Result> { diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/qwen_session.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/qwen_session.rs index a08ddc85..4d2ec955 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/qwen_session.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_input/qwen_session.rs @@ -1,8 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl QwenSession, impl ParkedSession, impl ParkedBlock, impl -//! QwenSession. +//! Methods of `QwenSession`: `check_resident_states`, `original_checkpoint`, `check_restore_slot`, `check_restore_sl... +//! Methods of `ParkedSession`: `next_position`, `host_bytes`. Defines `RestoredLayers`. -#[allow(unused_imports)] -use super::*; +use super::{ + DenseWeightCache, Dimension, Error, GdnPrior, LayerId, ModelBinding, OriginalSessionCheckpoint, ParkedBlock, + ParkedLayerSpan, ParkedPoint, ParkedPrefix, ParkedSession, PlePrior, PromptWeights, QwenSession, ResidentQsaLayer, + ResidentQsaOwners, ResidentQsaPrior, Result, STATE_CAPACITY, SpanExport, TargetStepOrigin, +}; type RestoredLayers<'driver> = [Option>; STATE_CAPACITY]; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_phase.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_phase.rs index 78c0213e..5db83df4 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_phase.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_phase.rs @@ -1,7 +1,10 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptPhase, impl OriginalPromptRowKey. +//! Methods of `OriginalPromptPhase`: `validate_role`, `initialize`, `read`, `prepare_read` and 5 more. +//! Methods of `OriginalPromptRowKey`: `validate_initial`, `validate`, `phase`, `ordinal`. -#[allow(unused_imports)] -use super::*; +use super::{ + BindingIdentity, DevicePhase, Dimension, Error, GrRole, InputReady, LayerId, OriginalPromptPhase, + OriginalPromptRowKey, Rc, Result, TokenLayer, +}; impl OriginalPromptPhase { pub(in crate::qwen_forward) fn validate_role( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn.rs index 05e9b364..387850e2 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn.rs @@ -1,7 +1,13 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptTxn. +//! Groups the submodules `original_prompt_txn_begin`, `original_prompt_txn_prior_and_abort`, `original_prompt_txn_pu... +//! Split out of `original_prompt` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + Cell, Context, DenseWeightCache, DevicePhase, Dimension, DraftRollback, Error, GdnPrior, GrRole, InputReady, + LayerId, ModelBinding, OriginalPromptInput, OriginalPromptPhase, OriginalPromptRowKey, OriginalPromptTxn, + OriginalSessionCheckpoint, PlePrior, Position, PromptPublication, PromptWeights, QwenSession, QwenStepTxn, Rc, + RefCell, ResidentQsaLayer, ResidentQsaOwners, ResidentQsaPrior, ResidentQsaSeal, Result, STATE_CAPACITY, + TargetStepOrigin, TokenId, draft, +}; #[path = "original_prompt_txn/original_prompt_txn_begin.rs"] mod original_prompt_txn_begin; diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_begin.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_begin.rs index dedcda7e..67809fef 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_begin.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_begin.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptTxn. +//! Methods of `OriginalPromptTxn`: `begin`, `check`, `original_session`, `origin` and 14 more. +//! Methods of `OriginalPromptPhase`: `start`. -#[allow(unused_imports)] -use super::*; +use super::{ + Cell, Context, DevicePhase, Dimension, Error, GrRole, InputReady, LayerId, ModelBinding, OriginalPromptInput, + OriginalPromptPhase, OriginalPromptRowKey, OriginalPromptTxn, Position, QwenSession, QwenStepTxn, Rc, RefCell, + Result, TargetStepOrigin, TokenId, +}; impl<'session, 'driver> OriginalPromptTxn<'session, 'driver> { pub(in crate::qwen_forward) fn begin( diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_prior_and_abort.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_prior_and_abort.rs index 662f5999..f0fa27f2 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_prior_and_abort.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_prior_and_abort.rs @@ -1,7 +1,11 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptTxn (2). +//! Methods of `OriginalPromptTxn`: `gdn_start_prior`, `gdn_prior`, `stage_gdn`, `validate_ple_at` and 9 more. +//! Split out of `original_prompt_txn` to keep its files under the line limit. -#[allow(unused_imports)] -use super::*; +use super::{ + DenseWeightCache, DraftRollback, Error, GdnPrior, GrRole, InputReady, LayerId, ModelBinding, OriginalPromptTxn, + OriginalSessionCheckpoint, PlePrior, Position, PromptWeights, Rc, ResidentQsaLayer, ResidentQsaOwners, + ResidentQsaPrior, ResidentQsaSeal, Result, STATE_CAPACITY, draft, +}; impl<'session, 'driver> OriginalPromptTxn<'session, 'driver> { /// The rolling GDN state at the window start: the session's prior, or the zero state at position 0. diff --git a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_publish.rs b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_publish.rs index cbd4e84d..3bc72e0d 100644 --- a/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_publish.rs +++ b/crates/engine-qwen35-cuda/src/qwen_forward/session_original_prompt/original_prompt_txn/original_prompt_txn_publish.rs @@ -1,8 +1,12 @@ -//! Moved out of the parent module by STRA-338: impl OriginalPromptTxn (3). +//! Methods of `OriginalPromptTxn`: `validate_publish_inputs`, `publish_gdn_slot`, `check_qsa_seal`, `publish_qsa_slo... +//! Split out of `original_prompt_txn` to keep its files under the line limit. use super::super::super::super::qsa_index::prompt_device::resident_device::ResidentQsaPublication; -#[allow(unused_imports)] -use super::*; +use super::{ + DenseWeightCache, DevicePhase, Dimension, Error, GdnPrior, LayerId, ModelBinding, OriginalPromptTxn, PlePrior, + Position, PromptPublication, PromptWeights, ResidentQsaLayer, ResidentQsaOwners, ResidentQsaPrior, ResidentQsaSeal, + Result, STATE_CAPACITY, TargetStepOrigin, TokenId, draft, +}; impl<'session, 'driver> OriginalPromptTxn<'session, 'driver> { /// The final rows, the sampled token and the draft KV all name this transaction and agree on the next token.