cuda - update npp calls to use the new NppStreamContext API if available#26245
Merged
asmorkalov merged 1 commit intoopencv:4.xfrom Oct 22, 2024
Merged
Conversation
Merged
6 tasks
cuda - update npp calls to use the new NppStreamContext API if available
Merged
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.
Update calls to Nvidia's NPP library to use the newer NppStreamContext API introduced in CUDA 10.1 (release notes)
Although this was introduced in CUDA 10.1 at that point not all of the functions either had a
_Ctxversion which took aNppStreamContextor an implementation present in the NPP library. Therefore in this PR theUSE_NPP_STREAM_CTXflag which selects the new API is only enabled for versions of NPP >= 12205 (the version included with CUDA toolkit 12.4) which I have verified as working. Currently the only function called inside OpenCV which does not work with the new API isnppiEvenLevelsHost_32s_Ctxwhich doesn't have an implementation inside nppist.lib or libnppist.so as of CUDA 12.6.Tested locally on Ubuntu 20.04 with both CUDA toolkits 12.3 and 12.4.
Adds changes discussed in opencv/opencv_contrib#3338 to all Npp functions called by OpenCV.
Fixes opencv/opencv_contrib#3798
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.