Repository navigation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the merge conflicts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased onto
main; conflict resolved and force-pushed. GitHub now reports the PR as mergeable.The conflict was with #27 (RAII contexts/allocators), which had already deleted the manual
ggml_gallocr_free(galloc); ggml_free(ctx0);lines this diff sat on top of. Resolution keeps #27's version, so the failure path is justreturn false;:The diff is now 1 insertion, 5 deletions in
sam2_encode_image_hiera— the thread-count setup, the status check and the duplicate error print, all of whichsam3_graph_computealready does (it also logs the status string).Verified: encode, PVS point + box, and a 3-frame visual track match
mainbyte for byte on EdgeTAM f16 and SAM2.1-tiny q8_0, CPU and Metal (PARITY OK ×4); the SAM2.1 runs go through this function. A Release build with-DSAM3_BUILD_TESTS=ONhas no errors or new warnings.One note for later, left out to keep this diff as reviewed:
sam3_encode_vit_from_preprocessed_selective(~sam3.cpp:7128) still open-codes the same pattern. It's in the test/debug region that #27 skipped, so it kept its manual frees and needs a slightly different edit.