Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

cuda - update npp calls to use the new NppStreamContext API if available#26245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@cudawarped
Copy link
Contributor

@cudawarpedcudawarped commentedOct 3, 2024
edited
Loading

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_Ctx version which took aNppStreamContext or an implementation present in the NPP library. Therefore in this PR theUSE_NPP_STREAM_CTX flag 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_Ctx which doesn't have an implementation insidenppist.lib orlibnppist.so as of CUDA 12.6.

Tested locally on Ubuntu 20.04 with both CUDA toolkits 12.3 and 12.4.

Adds changes discussed inopencv/opencv_contrib#3338 to all Npp functions called by OpenCV.
Fixesopencv/opencv_contrib#3798

Pull Request Readiness Checklist

See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@cudawarpedcudawarped changed the titlecuda - update npp calls to use the new NppStreamContext API if availablecuda - update npp calls to use the new NppStreamContext API if availableOct 3, 2024
Copy link
Contributor

@asmorkalovasmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

@asmorkalovasmorkalov added feature category: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contrib labelsOct 22, 2024
@asmorkalovasmorkalov self-assigned thisOct 22, 2024
@asmorkalovasmorkalov added this to the4.11.0 milestoneOct 22, 2024
@asmorkalovasmorkalov merged commit57ccbee intoopencv:4.xOct 22, 2024
@asmorkalovasmorkalov mentioned this pull requestOct 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asmorkalovasmorkalovasmorkalov approved these changes

Assignees

@asmorkalovasmorkalov

Labels

category: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribfeature

Projects

None yet

Milestone

4.11.0

Development

Successfully merging this pull request may close these issues.

Morphology operation is slower on GPU than same operation on CPU

2 participants

@cudawarped@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp