Repository navigation
Conversation
SAM3_LOG_LEVEL defaulted to 1 and nothing (CMake, CI, docs) ever set it. Level-1 logs become plain fprintf(stderr, ...) with their timers made unconditional; level-2 logs were compiled out by default and are removed. Default-build stderr output is unchanged. 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.
What
Removes the compile-time
SAM3_LOG_LEVELdefine and theSAM3_LOG(level, ...)macro fromsam3.cpp.SAM3_LOG(1, ...)→ plainfprintf(stderr, ...)(per CLAUDE.md style). The 10#if SAM3_LOG_LEVEL >= 1guards around thestd::chronotimers are gone, so the timers always run.SAM3_LOG(2, ...)calls are deleted. None of them had work that existed only to feed the log:fenc_output_cpu(thefenc_out[0..4]log) is still used by the DETR decoder and the seg head, and every other argument is used elsewhere.<chrono>stays because the timers still use it.Why
The knob defaulted to 1, and no CMake option, CI job or doc ever set it. Level-2 logs were already compiled out of the default build, so stderr output from the default build is the same as before.
Verification
ggml_metal_library_init: loaded in X sec. These runs printsam3_segment_pvs: graph computed …andcompleted …(12 each). Thesam3_encode_imageandsam3_segment_pcsconversions are not reached by these SAM2/EdgeTAM runs; I checked them by reading the code.clang++ -fsyntax-only -Wall -Wextra sam3.cppgives the same 21 warnings as origin/main (none new, including unused variables).grep -c SAM3_LOG sam3.cpp→ 0.Merge note
Other open PRs change lines near these edits: the debug dumps in
sam3_segment_pvs, the track/propagate frame functions, and the RAII cleanup of gallocr/ctx frees. Expect small textual conflicts; they need resolving when this merges.🤖 Generated with Claude Code
https://claude.ai/code/session_01M2qLmQ9ag49hT61V6i9qAq