style: cargo fmt --workspace (whitespace/wrapping only, no semantic change)

Whole-workspace rustfmt pass picked up while iterating on Mamba GPU
backward work. Verified formatting-only via diff sampling; no logic
changed.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
osobh
2026-08-10 07:09:36 -07:00
co-authored by Claude Sonnet 5
parent ad6405663f
commit 4aaa36a57a
305 changed files with 25537 additions and 18337 deletions
@@ -257,7 +257,11 @@ impl SparseAttentionLayer {
pub fn new(config: SparseAttentionConfig, head_dim: usize) -> Self {
let scale = 1.0 / (head_dim as f32).sqrt();
let mask = SparseAttentionMask::new(config.clone());
Self { config, mask, scale }
Self {
config,
mask,
scale,
}
}
/// CPU reference forward pass.
@@ -581,7 +585,10 @@ mod tests {
for i in 0..16 {
let cnt = mask.attention_count(i);
assert!(cnt > 0, "token {i} must attend to at least one position");
assert!(cnt <= 16, "token {i} cannot attend to more than seq_len positions");
assert!(
cnt <= 16,
"token {i} cannot attend to more than seq_len positions"
);
}
}
@@ -600,7 +607,10 @@ mod tests {
};
let mask = SparseAttentionMask::new_with_seed(config, 0);
for i in 0..10 {
assert!(mask.mask[i][i], "self-attention must always be set (window_radius=0)");
assert!(
mask.mask[i][i],
"self-attention must always be set (window_radius=0)"
);
}
}