Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
86465e30
Commit
86465e30
authored
Oct 19, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved cmake error messages about CUDA support.
parent
e9837f70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
CMakeLists.txt
dlib/CMakeLists.txt
+8
-13
find_cudnn.txt
dlib/cmake_utils/test_for_cudnn/find_cudnn.txt
+8
-0
No files found.
dlib/CMakeLists.txt
View file @
86465e30
...
...
@@ -561,7 +561,7 @@ if (NOT TARGET dlib)
include
(
cmake_utils/test_for_cudnn/find_cudnn.txt
)
if
(
cudnn AND NOT DEFINED cuda_test_compile_worked AND NOT DEFINED cudnn_test_compile_worked
)
if
(
cudnn AND
cudnn_include AND
NOT DEFINED cuda_test_compile_worked AND NOT DEFINED cudnn_test_compile_worked
)
# make sure cuda is really working by doing a test compile
message
(
STATUS
"Building a CUDA test project to see if your compiler is compatible with CUDA..."
)
...
...
@@ -585,10 +585,10 @@ if (NOT TARGET dlib)
${
PROJECT_SOURCE_DIR
}
/cmake_utils/test_for_cudnn cudnn_test
CMAKE_FLAGS
${
CUDA_TEST_CMAKE_FLAGS
}
)
if
(
cudnn_test_compile_worked
)
message
(
STATUS
"
Found cuDNN: "
${
cudnn
}
)
else
(
)
message
(
STATUS
"***
Found cuDNN, but it looks like the wrong version so dlib will not use it.
***"
)
if
(
NOT
cudnn_test_compile_worked
)
message
(
STATUS
"
*** Found cuDNN, but it looks like the wrong version so dlib will not use it. ***"
)
message
(
STATUS
"*** Dlib requires cuDNN V5.0 OR GREATER. Since cuDNN is not found DLIB WILL NOT USE CUDA. ***"
)
message
(
STATUS
"***
If you have cuDNN then set CMAKE_PREFIX_PATH to include cuDNN's folder.
***"
)
endif
()
endif
()
endif
()
...
...
@@ -632,19 +632,14 @@ if (NOT TARGET dlib)
${
openmp_libarires
}
)
include_directories
(
${
cudnn_include
}
)
message
(
STATUS
"Enabling CUDA support for dlib. DLIB WILL USE CUDA"
)
else
()
set
(
DLIB_USE_CUDA OFF CACHE STRING
${
DLIB_USE_BLAS_STR
}
FORCE
)
toggle_preprocessor_switch
(
DLIB_USE_CUDA
)
if
(
NOT USING_OLD_VISUAL_STUDIO_COMPILER
)
if
(
cuda_test_compile_worked
)
if
(
NOT cudnn OR NOT cudnn_include OR NOT cudnn_test_compile_worked
)
message
(
STATUS
"*** cuDNN V5.0 OR GREATER NOT FOUND. DLIB WILL NOT USE CUDA. ***"
)
message
(
STATUS
"*** If you have cuDNN then set CMAKE_PREFIX_PATH to include cuDNN's folder."
)
endif
()
endif
()
else
()
if
(
USING_OLD_VISUAL_STUDIO_COMPILER
)
message
(
STATUS
"*** Dlib CUDA support requires C++11 but your compiler doesn't support it. ***"
)
endif
()
message
(
STATUS
"Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA"
)
endif
()
endif
()
...
...
dlib/cmake_utils/test_for_cudnn/find_cudnn.txt
View file @
86465e30
...
...
@@ -14,3 +14,11 @@ find_library(cudnn cudnn
PATH_SUFFIXES lib64 lib x64
)
mark_as_advanced(cudnn cudnn_include)
if (cudnn AND cudnn_include)
message(STATUS "Found cuDNN: " ${cudnn})
else()
message(STATUS "*** cuDNN V5.0 OR GREATER NOT FOUND. ***")
message(STATUS "*** Dlib requires cuDNN V5.0 OR GREATER. Since cuDNN is not found DLIB WILL NOT USE CUDA. ***")
message(STATUS "*** If you have cuDNN then set CMAKE_PREFIX_PATH to include cuDNN's folder. ***")
endif()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment