Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA without cuDNN #109

Open
mantier opened this issue Sep 2, 2016 · 1 comment
Open

CUDA without cuDNN #109

mantier opened this issue Sep 2, 2016 · 1 comment

Comments

@mantier
Copy link

mantier commented Sep 2, 2016

Dear all,

today we tried to set up a PC with PetaVision. After we found out cuDNN is not compatible with the graphic card (compute probability 3.0 needed, this one had 2.1, so most of the tests failed) we wanted to compile without cuDNN. Compilation went through without a problem but the CIFAR tutorial threw an error saying Petavision was compiled without CUDA support.

In the OpenPV/cmake/PVConfigProject.cmake file at line 228 I found this code:

      find_package(CUDA)
      find_package(CUDNN)

      # Set cuda compile flags
      if(CUDA_FOUND AND CUDNN_FOUND)
        # Used later to set an variable in cMakeHeader.h PV_USE_CUDNN.
        # Without this, none of the CUDNN code will be compiled and all
        # CUDA code will fail
        set(PV_USE_CUDNN ON)

        if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinRelSize")
          set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};${CUDA_RELEASE_FLAGS}")
        else()
          set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};${CUDA_DEBUG_FLAGS}")
        endif()
      else()
        set(PV_USE_CUDA OFF)
      endif()

where I understand from that CUDA is set to OFF at compile time if cuDNN is not found. Is this desired behaviour? I would understand otherwise from here. So, can we still use our NVIDIA GPU without cuDNN or not?

Anyways, if cuDNN is necessary, shouldn't there be at least pop up a warning like:

message(WARNING "-- CUDA cannot be used without cuDNN. Disabling CUDA build")
@peteschultz
Copy link
Contributor

Currently, PetaVision can only use the GPU with cuDNN. We are in the process of adding support for cuSPARSE, which would be able to run on older graphics cards. We'll add a warning saying that currently CUDA cannot be used without cuDNN; thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants