Repository navigation
Conversation
tests/ was the only consumer of the sam3_test_* functions, the state/model tensor dump and info helpers, sam3_encode_image_from_preprocessed, sam3_encode_vit_from_preprocessed_selective, struct sam3_tensor_info and the sam3_vit_block_stage / sam3_vit_prefix_stage enums. Remove them along with the static helpers only they used, the Windows mkdir macro and its includes, and the tests/ directory itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M2qLmQ9ag49hT61V6i9qAq
This was referenced Sep 11, 2026
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
Deletes the test/debug API from
sam3.h/sam3.cppand the trackedtests/directory.Why
tests/was the only caller of these symbols; no library or example code uses them. The tests were one-off numerical-parity harnesses from the port and are no longer built or run.Removed
sam3.h): allsam3_test_*functions (tokenizer, text-encoder / phase5 / phase6 / phase7 / geom-enc / fenc dumps, ViT prefix/block stage runners, host-reference linear ops),sam3_dump_state_tensor,sam3_get_state_tensor_info,sam3_dump_model_tensor,sam3_get_model_tensor_info,sam3_encode_image_from_preprocessed,sam3_encode_vit_from_preprocessed_selective,struct sam3_tensor_info,enum sam3_vit_block_stage,enum sam3_vit_prefix_stage.sam3.cpp): static helpers used only by the above:sam3_clear_encoder_state,sam3_mark_named_outputs,sam3_normalize_ne4,sam3_new_f32_tensor_4d_from_ne,sam3_copy_tensor_to_f32(+ forward decl),sam3_build_vit_{prefix,block}_stage_from_input,sam3_build_vit_attn_core_from_qkv,g_test_tokenizer, dump/ref-loading helpers (sam3_dump_tensor_to_path,sam3_dump_raw_f32_to_path,sam3_load_ref_f32_data,sam3_reorder_nchw_to_ggml_dwh,sam3_load_kv_text_file,sam3_meta_get_int),sam3_find_state_tensor,sam3_fill_tensor_info.mkdir→_mkdirWindows macro and the<direct.h>/<sys/stat.h>includes (only used by the dump code).tests/(89 files).The Profiling section (
sam3_profile_edgetam_encode) is untouched.Verification
Parity tool (byte-compared against deterministic origin/main baselines; covers
encode_image,segment_pvspoint + box, visual trackeradd_instance+propagate_frame):Full Release build (lib + all examples): no errors, no new warnings (only pre-existing ggml/stb ones).
sam3.cppcompiled with-Wunused-function -Wunused-variable -Wunused-macros: 0 warnings before and after. No full SAM3 checkpoint is available locally, so the text/PCS path is verified compile-only.Follow-up
The
SAM3_BUILD_TESTSCMake option is now dangling; it is removed in a stacked follow-up PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01M2qLmQ9ag49hT61V6i9qAq