|
|
|
@ -19,7 +19,7 @@ limitations under the License. */
|
|
|
|
|
|
|
|
|
|
P_DEFINE_string(cudnn_dir, "",
|
|
|
|
|
"Specify path for loading libcudnn.so. For instance, "
|
|
|
|
|
"/usr/local/cudnn/lib64. If empty [default], dlopen "
|
|
|
|
|
"/usr/local/cudnn/lib. If empty [default], dlopen "
|
|
|
|
|
"will search cudnn from LD_LIBRARY_PATH");
|
|
|
|
|
|
|
|
|
|
P_DEFINE_string(cuda_dir, "",
|
|
|
|
@ -33,7 +33,6 @@ static inline std::string join(const std::string& part1,
|
|
|
|
|
const std::string& part2) {
|
|
|
|
|
// directory separator
|
|
|
|
|
const char sep = '/';
|
|
|
|
|
|
|
|
|
|
if (!part2.empty() && part2.front() == sep) {
|
|
|
|
|
return part2;
|
|
|
|
|
}
|
|
|
|
@ -88,7 +87,7 @@ static inline void GetDsoHandleFromSearchPath(
|
|
|
|
|
dlPath = join(search_root, dso_name);
|
|
|
|
|
*dso_handle = dlopen(dlPath.c_str(), dynload_flags);
|
|
|
|
|
// if not found, search from default path
|
|
|
|
|
if (nullptr == dso_handle) {
|
|
|
|
|
if (nullptr == *dso_handle) {
|
|
|
|
|
LOG(WARNING) << "Failed to find cuda library: " << dlPath;
|
|
|
|
|
dlPath = dso_name;
|
|
|
|
|
GetDsoHandleFromDefaultPath(dlPath, dso_handle, dynload_flags);
|
|
|
|
|