Repository navigation
Add resident GPU Gaussian image filtering - #179
Merged
Merged
Conversation
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.
Gaussian blur was available only on CPU, requiring image readback before weighted filtering in an otherwise resident GPU image pipeline.
Add
gaussian_blur_gpuand the optional two-timestamp profiled variant undergpu-image.GpuGaussianBlurOptionssupports independent 3/5/7 kernels, finite positive sigmas, all 1..=4 logical channels and five borders. The host prepares two tiny CPU-compatible coefficient vectors; the two weighted image passes execute on GPU in one submission. Q8/Q15 kernels, unrounded horizontal sums and two-u32-limb Q15 final sums preserve the existing specialized CPU u8 bytes exactly.Returned images retain metadata and independent ownership and compose with gray/Sobel/AI operations. Private scratch uses 4*channels bytes per pixel; output writes use physical RGBA8. Transfers remain explicit, with no image payload readback, repeated image upload or host wait inside the filter. Dimensions, arithmetic, scratch/uniform/binding/workgroup capacities and optional profiler ownership/capacity reject before resource/cache allocation. Unsupported scratch sizes return an error; placement remains caller-controlled.
Validation:
A private CPU resize helper now compiles only for its actual resize/test consumers, fixing the dead-code lint when only filter/analysis reference features are enabled. No production dependency, core model, CPU Gaussian behavior or unsafe boundary changes. Existing Vision-chain defaults remain.
Evidence:
C:/Users/rsasa/Workspace/SpatialRust/notes/2026-10-13_gpu_gaussian_blur.md. Architecture, ROADMAP and CHANGELOG describe the API and arithmetic/transfer boundaries. Follows merged PR #178.