Remove unused code from the post NNUE accumulator merge#6898
Conversation
|
clang-format 20 needs to be run on this PR. (execution 27386387097 / attempt 1) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThis PR refactors NNUE threat feature handling to remove fused-update infrastructure and simplify state tracking. The DirtyThreats struct is reduced to contain only a list field, removing caller-supplied metadata. FullThreats removes its FusedUpdateData helper type and simplifies the append_changed_indices signature by removing fusedData and first parameters. HalfKAv2_hm removes active-index scanning and aligns its API accordingly. Call sites in nnue_accumulator are updated to use the simplified signature. Unused constants FtOneVal and HiddenMaxVal are removed. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
After merging the HalfKA and Threats accumulators (7c7fe32) and the subsequent removal of the double-incremental/fused update, a number of NNUE helpers and fields became unreachable. Each was verified to have zero callers/readers across the source tree: - FusedUpdateData logic in FullThreats: the fused-update branch of append_changed_indices and the FusedUpdateData parameter are unused; the accumulator update no longer passes fused data. - FullThreats::requires_refresh: never called. The live king-bucket refresh check is HalfKAv2_hm::requires_refresh (PSQFeatureSet), used in nnue_accumulator. - HalfKAv2_hm::append_active_indices: never called. The live active-index builder is FullThreats::append_active_indices (ThreatFeatureSet). - DirtyThreats::us, prevKsq and ksq: written in do_move but only read by the now-removed FullThreats::requires_refresh. Removing them also drops three stores from the do_move path. - Unused feature Name constants and the unused FtOneVal / HiddenMaxVal constants in nnue_common.h. - Two stale feature-header banner comments. No functional change
|
clang-format 20 needs to be run on this PR. (execution 27387019374 / attempt 1) |
After merging the HalfKA and Threats accumulators (7c7fe32) and the subsequent removal of the double-incremental/fused update, a number of NNUE helpers and fields became unreachable. Each was verified to have zero callers/readers across the source tree:
No functional change