Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
86465e30
"tools/python/vscode:/vscode.git/clone" did not exist on "43e5f42ef5a49e4410777402003de82ade299e21"
Commit
86465e30
authored
Oct 19, 2017
by
Davis King
Browse files
Improved cmake error messages about CUDA support.
parent
e9837f70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+8
-13
dlib/cmake_utils/test_for_cudnn/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)
...
@@ -561,7 +561,7 @@ if (NOT TARGET dlib)
include
(
cmake_utils/test_for_cudnn/find_cudnn.txt
)
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
# 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..."
)
message
(
STATUS
"Building a CUDA test project to see if your compiler is compatible with CUDA..."
)
...
@@ -585,10 +585,10 @@ if (NOT TARGET dlib)
...
@@ -585,10 +585,10 @@ if (NOT TARGET dlib)
${
PROJECT_SOURCE_DIR
}
/cmake_utils/test_for_cudnn cudnn_test
${
PROJECT_SOURCE_DIR
}
/cmake_utils/test_for_cudnn cudnn_test
CMAKE_FLAGS
${
CUDA_TEST_CMAKE_FLAGS
}
CMAKE_FLAGS
${
CUDA_TEST_CMAKE_FLAGS
}
)
)
if
(
cudnn_test_compile_worked
)
if
(
NOT
cudnn_test_compile_worked
)
message
(
STATUS
"Found cuDNN
: "
${
cudnn
}
)
message
(
STATUS
"
***
Found cuDNN
, but it looks like the wrong version so dlib will not use it. ***"
)
else
(
)
message
(
STATUS
"*** Dlib requires cuDNN V5.0 OR GREATER. Since cuDNN is not found DLIB WILL NOT USE CUDA. ***"
)
message
(
STATUS
"***
Found cuDNN, but it looks like the wrong version so dlib will not use it.
***"
)
message
(
STATUS
"***
If you have cuDNN then set CMAKE_PREFIX_PATH to include cuDNN's folder.
***"
)
endif
()
endif
()
endif
()
endif
()
endif
()
endif
()
...
@@ -632,19 +632,14 @@ if (NOT TARGET dlib)
...
@@ -632,19 +632,14 @@ if (NOT TARGET dlib)
${
openmp_libarires
}
${
openmp_libarires
}
)
)
include_directories
(
${
cudnn_include
}
)
include_directories
(
${
cudnn_include
}
)
message
(
STATUS
"Enabling CUDA support for dlib. DLIB WILL USE CUDA"
)
else
()
else
()
set
(
DLIB_USE_CUDA OFF CACHE STRING
${
DLIB_USE_BLAS_STR
}
FORCE
)
set
(
DLIB_USE_CUDA OFF CACHE STRING
${
DLIB_USE_BLAS_STR
}
FORCE
)
toggle_preprocessor_switch
(
DLIB_USE_CUDA
)
toggle_preprocessor_switch
(
DLIB_USE_CUDA
)
if
(
NOT USING_OLD_VISUAL_STUDIO_COMPILER
)
if
(
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
()
message
(
STATUS
"*** Dlib CUDA support requires C++11 but your compiler doesn't support it. ***"
)
message
(
STATUS
"*** Dlib CUDA support requires C++11 but your compiler doesn't support it. ***"
)
endif
()
endif
()
message
(
STATUS
"Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA"
)
endif
()
endif
()
endif
()
endif
()
...
...
dlib/cmake_utils/test_for_cudnn/find_cudnn.txt
View file @
86465e30
...
@@ -14,3 +14,11 @@ find_library(cudnn cudnn
...
@@ -14,3 +14,11 @@ find_library(cudnn cudnn
PATH_SUFFIXES lib64 lib x64
PATH_SUFFIXES lib64 lib x64
)
)
mark_as_advanced(cudnn cudnn_include)
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