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
70f9a9f1
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "9254d1f39a0ac02ef07d02957f6754e16a7c83fc"
Commit
70f9a9f1
authored
Mar 02, 2019
by
Davis King
Browse files
Made cusolver finding work in newer versions of cmake and cuda
parent
f7f6f676
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+7
-5
No files found.
dlib/CMakeLists.txt
View file @
70f9a9f1
...
@@ -716,10 +716,12 @@ if (NOT TARGET dlib)
...
@@ -716,10 +716,12 @@ if (NOT TARGET dlib)
endif
()
endif
()
# Find where cuSOLVER is since the FindCUDA cmake package doesn't
# Find where cuSOLVER is since the FindCUDA cmake package doesn't
# bother to look for it.
# bother to look for it in older versions of cmake.
get_filename_component
(
cuda_blas_path
"
${
CUDA_CUBLAS_LIBRARIES
}
"
DIRECTORY
)
if
(
NOT CUDA_cusolver_LIBRARY
)
find_library
(
cusolver cusolver HINTS
${
cuda_blas_path
}
)
get_filename_component
(
cuda_blas_path
"
${
CUDA_CUBLAS_LIBRARIES
}
"
DIRECTORY
)
mark_as_advanced
(
cusolver
)
find_library
(
CUDA_cusolver_LIBRARY cusolver HINTS
${
cuda_blas_path
}
)
mark_as_advanced
(
CUDA_cusolver_LIBRARY
)
endif
()
# Also find OpenMP since cuSOLVER needs it. Importantly, we only
# Also find OpenMP since cuSOLVER needs it. Importantly, we only
# look for one to link to if our use of BLAS, specifically the
# look for one to link to if our use of BLAS, specifically the
# Intel MKL, hasn't already decided what to use. This is because
# Intel MKL, hasn't already decided what to use. This is because
...
@@ -756,7 +758,7 @@ if (NOT TARGET dlib)
...
@@ -756,7 +758,7 @@ if (NOT TARGET dlib)
${
CUDA_CUBLAS_LIBRARIES
}
${
CUDA_CUBLAS_LIBRARIES
}
${
cudnn
}
${
cudnn
}
${
CUDA_curand_LIBRARY
}
${
CUDA_curand_LIBRARY
}
${
cusolver
}
${
CUDA_
cusolver
_LIBRARY
}
)
)
if
(
openmp_libraries
)
if
(
openmp_libraries
)
list
(
APPEND dlib_needed_libraries
${
openmp_libraries
}
)
list
(
APPEND dlib_needed_libraries
${
openmp_libraries
}
)
...
...
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