Repository navigation
Conversation
Drop debug-session leftovers from production code paths:
- SAM2_DUMP_DIR file dumps in the Hiera PE precompute and sam3_segment_pvs
- dbg_* tensor names and their ggml_set_output markers (Hiera patch
embed / blocks / FPN laterals, two-way block internals, decoder outputs)
- the block-0 dump flag (and now-unused block_idx param) in
sam2_hiera_block_forward
- the static _sa_call_count/_sa_merge_count counters in sam3_sam_attention
sam_dec_tokens_initial / sam_dec_block%d_{queries,keys} keep their names
(the test API looks them up) but lose the ggml_set_output markers.
Numerics are unchanged (byte-identical parity on CPU and Metal).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M2qLmQ9ag49hT61V6i9qAq
The #if 0 block in sam3_sam_attention held a hand-written Q·K^T → softmax → V path next to the ggml_flash_attn_ext call. It was compiled out and full of scratch-work comments. Git history keeps it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M2qLmQ9ag49hT61V6i9qAq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sam3_sam_attentioncontains a compiled-out#if 0 // Manual SDPA (for debugging only)block. It's a hand-written Q·K^Tsoftmax→V path next to the realggml_flash_attn_extcall, with about 20 lines of scratch-work comments ("... no.", "let me think differently."). It never compiles, and git history keeps it.Stacked on #22 because that PR edits the lines right below this block (the
_sa_merge_countdebug marker). Merge #22 first; GitHub will retarget this PR tomain.Verification: preprocessor-dead code, so the compiled output doesn't change. The parity tool still matches
origin/mainbyte for byte:git diff --shortstat: 1 file changed, 37 deletions(-).Part of an over-engineering cleanup series.
🤖 Generated with Claude Code
https://claude.ai/code/session_01M2qLmQ9ag49hT61V6i9qAq