Problem
cargo build --release --features metal-gpu,f16 emits 30 warnings from metal_qwen35.rs:
- Unused import:
crate::sampling::CandidateSet (line 40)
- Unnecessary
unsafe blocks (lines 6766, 6814)
- Private type leaked in pub field:
MetalMtpCache (line 2722)
- Dead methods:
append_kv (line 3551), full_attention_layer_step_by_idx (line 8485), softplus (line 10791)
Why
Dead code signals unmaintained paths. append_kv being dead means the CPU KV-append path (f32 pointer writes) is not used — the GPU dispatch_copy_offset path is the real one. This is relevant for #154 (f16 KV): the migration only needs to touch the GPU copy path, not the dead CPU path.
The warnings also make CI noisy and mask real issues.
Scope
- Remove dead methods (
append_kv, full_attention_layer_step_by_idx, softplus)
- Remove unused import
- Remove redundant unsafe blocks
- Fix visibility on
MetalMtpCache
- Target: zero warnings with
--features metal-gpu,f16
Related: #152 (decompose), ADR-064 (clean baseline for perf work)
Problem
cargo build --release --features metal-gpu,f16emits 30 warnings from metal_qwen35.rs:crate::sampling::CandidateSet(line 40)unsafeblocks (lines 6766, 6814)MetalMtpCache(line 2722)append_kv(line 3551),full_attention_layer_step_by_idx(line 8485),softplus(line 10791)Why
Dead code signals unmaintained paths.
append_kvbeing dead means the CPU KV-append path (f32 pointer writes) is not used — the GPUdispatch_copy_offsetpath is the real one. This is relevant for #154 (f16 KV): the migration only needs to touch the GPU copy path, not the dead CPU path.The warnings also make CI noisy and mask real issues.
Scope
append_kv,full_attention_layer_step_by_idx,softplus)MetalMtpCache--features metal-gpu,f16Related: #152 (decompose), ADR-064 (clean baseline for perf work)