Add linear and median filter operations - #30
Conversation
|
Rebased onto current Verified on RTX PRO 6000 / CUDA 13.3: it does not compile against any merged fkl ( Action: merge the corresponding FKL PR first, then bump the fkl submodule (a follow-up to #22) so these headers are available; this FastNPP PR will then build + pass. I rebased it locally but did not push the rebase to keep CI from going red on an unbuildable branch. |
8d584d1 to
897db72
Compare
morousg
left a comment
There was a problem hiding this comment.
This PR does not compile nor execute. It is using features not present in the FKL
| #define FASTNPP_DEFINE_MEDIAN(NPPNAME, T) \ | ||
| inline auto NPPNAME(const fk::Ptr2D<T>& pSrc, int nMaskWidth, int nMaskHeight, \ | ||
| int nAnchorX, int nAnchorY) { \ | ||
| return fk::MedianFilter<fk::ND::_2D, T, 49, fk::FilterBorder::REPLICATE>::build( \ |
There was a problem hiding this comment.
This operations do not exist in the FKL, these are DPPs. We clearly need to work on the instantiable DPPs and allow them to share shared memory tiles
Summary
Adds NPP linear and rank filtering entry points to FastNPP:
FilterBoxBorder— mean (box) filter, 8u (C1/C3), 16u (C1), 32f (C1).FilterBorder— general 2D convolution with a float coefficient kernel, 32f (C1/C3). Covers Gaussian, sharpen, emboss, arbitrary kernels.FilterMedianBorder— per-channel window median, 8u (C1/C3), 16u (C1), 32f (C1).Each runs as a single fused kernel with
NPP_BORDER_REPLICATEsemantics.Dependency
Builds on the FKL filter functors in Libraries-Openly-Fused/FusedKernelLibrary#277 (box + convolution) and #278 (median). Merge those and update the
fklsubmodule first. AddsCUDA::nppifto the test link line.Tests
tests/filtering/fastNPP_filter_test.cucross-checks againstnppiFilterBoxBorder,nppiFilterBorder, andnppiFilterMedianBorder(shared aligned pitch,NPP_BORDER_REPLICATE):Integrates with CTest. CUDA 13.3 / GCC 11.5,
sm_120.