Add morphology operations (ErodeBorder/DilateBorder) - #29
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. |
9af40bd to
671f04f
Compare
morousg
left a comment
There was a problem hiding this comment.
You need to update the fkl submodule, in order to get the fkl::Morphology features
Summary
Adds NPP morphology entry points to FastNPP:
ErodeBorderandDilateBorderover an arbitrary binary structuring element (mask + size + anchor), for 8u (C1/C3), 16u (C1) and 32f (C1).Each entry point takes the source image and the structuring element and returns a complete fused read operation (the neighbourhood min/max runs in a single kernel). The
REPLICATEborder matchesnppiErodeBorder/nppiDilateBorderwithNPP_BORDER_REPLICATE.A
CUDA::nppimlink dependency was added to the test discovery so morphology tests resolve the NPP morphology symbols.Dependency
Builds on the new
fk::Morphology(Erode/Dilate) functor in Libraries-Openly-Fused/FusedKernelLibrary#275. Merge that PR and update thefklsubmodule first.Tests
tests/morphology/fastNPP_morphology_test.cucross-checks againstnppiErodeBorder/nppiDilateBorderwithNPP_BORDER_REPLICATE(shared aligned pitch):Bit-exact vs NPP, including non-rectangular structuring elements and off-centre anchors. Integrates with CTest.
Environment
CUDA 13.3 / GCC 11.5,
sm_120.