Repository navigation
perf(gpu): share Canny classification and root flags - #185
Merged
Merged
Conversation
rsasaki0109
changed the base branch from
codex/gpu-icp-trim-selection-tree
to
main
October 13, 2026 10:22
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.
Depends on #184 (Trimmed ICP selection tree); retarget to main after that exact source is merged.
Canny previously allocated separate per-pixel classification and strong-neighbor root flags. Preserve classification in the low two bits of an atomic word and OR the root flag into bit 2, removing one 4*N buffer for every aperture. Full parent indices, complete hysteresis, exact edge bytes, five/six passes, metadata and explicit image transfers remain. Required storage-buffer count falls from five to four; classification destination footprints and receipts reflect the removed allocation.
At 4K, requested private scratch falls from 165,888,008 to 132,710,408 bytes (aperture 3) or from 199,065,600 to 165,888,000 (5/7): 33,177,600 bytes saved. Two isolated surveys show 1.183–1.574x completed resident improvements across the tested 4K fixtures. Full-call results are mixed and retain adverse cases. Timings include acquisition/encoding/completion under the same default 64 MiB retention policy; shader-only or general-device speedup is not claimed. All 20 paired rows and conditions are in notes/2026-10-13_gpu_canny_shared_state_flags.md.
Validation: