Skip to content

fix: findCUDNN script#19452

Merged
alalek merged 2 commits intoopencv:masterfrom
ctuu:patch-1
Feb 10, 2021
Merged

fix: findCUDNN script#19452
alalek merged 2 commits intoopencv:masterfrom
ctuu:patch-1

Conversation

@ctuu
Copy link
Copy Markdown
Contributor

@ctuu ctuu commented Feb 3, 2021

Pull Request Readiness Checklist

See details at https://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 other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to 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
force_builders=Custom
buildworker:Custom=linux-4,linux-6
build_image:Custom=ubuntu-cuda:18.04

@alalek
Copy link
Copy Markdown
Member

alalek commented Feb 3, 2021

/cc @YashasSamaga Please take a look. Perhaps it is better to fix implementation instead (to follow CMake coding style for version variables naming)

@YashasSamaga
Copy link
Copy Markdown
Contributor

YashasSamaga commented Feb 4, 2021

/cc @YashasSamaga Please take a look. Perhaps it is better to fix implementation instead (to follow CMake coding style for version variables naming)

Based on standard:

  1. CUDNN_VERSION should be moved out of the cache
  2. CUDNN_MAJOR_VERSION/CUDNN_MINOR_VERSION/CUDNN_PATCH_VERSION should be renamed to CUDNN_VERSION_MAJOR/CUDNN_VERSION_MINOR/CUDNN_VERSION_PATCH in the implementation (the comment/documentation is correct but the impl is using the wrong identifiers)

I am not sure what other problems are there. I don't understand CMake well enough.

Should CUDNN_VERSION be marked as advanced?


For future reference:

CUDNN_LIBRARY and CUDNN_INCLUDE_DIR are cache entries which are sufficient to manually identify cuDNN installation. CUDNN_VERSION is no more a cache entry (makes no sense for it to be a CACHE variable) and should not be touched.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you for contribution 👍

@alalek alalek merged commit 0677f3e into opencv:master Feb 10, 2021
@ctuu ctuu deleted the patch-1 branch February 11, 2021 03:10
@alalek alalek mentioned this pull request Apr 9, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
* fix: findCUDNN script

* Update FindCUDNN.cmake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants