@ -30,12 +30,12 @@ DEFINE_string(cudnn_dir, "",
DEFINE_string ( cuda_dir , " " ,
" Specify path for loading cuda library, such as libcublas, "
" libcurand . For instance, /usr/local/cuda/lib64. If default, "
" dlopen will search cuda from LD_LIBRARY_PATH" ) ;
" libcurand , libcusolver . For instance, /usr/local/cuda/lib64. "
" If default, dlopen will search cuda from LD_LIBRARY_PATH" ) ;
DEFINE_string ( nccl_dir , " " ,
" Specify path for loading nccl library, such as lib cublas, "
" libcurand. For instance, /usr/local/cuda/lib64. If default, "
" Specify path for loading nccl library, such as lib nccl.so. "
" For instance, /usr/local/cuda/lib64. If default, "
" dlopen will search cuda from LD_LIBRARY_PATH " ) ;
DEFINE_string ( cupti_dir , " " , " Specify path for loading cupti.so. " ) ;
@ -65,6 +65,8 @@ static PathNode s_py_site_pkg_path;
static constexpr char * win_cublas_lib = " cublas64_ " PADDLE_CUDA_BINVER " .dll " ;
static constexpr char * win_curand_lib = " curand64_ " PADDLE_CUDA_BINVER " .dll " ;
static constexpr char * win_cudnn_lib = " cudnn64_ " PADDLE_CUDNN_BINVER " .dll " ;
static constexpr char * win_cusolver_lib =
" cusolver64_ " PADDLE_CUDA_BINVER " .dll " ;
# endif
static inline std : : string join ( const std : : string & part1 ,
@ -228,7 +230,10 @@ void* GetCusolverDsoHandle() {
# if defined(__APPLE__) || defined(__OSX__)
return GetDsoHandleFromSearchPath ( FLAGS_cuda_dir , " libcusolver.dylib " ) ;
# elif defined(_WIN32) && defined(PADDLE_WITH_CUDA)
return GetDsoHandleFromSearchPath ( FLAGS_cuda_dir , win_cusolver_lib ) ;
// TODO(guosheng): Fix cusolver support on windows.
// return GetDsoHandleFromSearchPath(FLAGS_cuda_dir, win_cusolver_lib);
PADDLE_THROW ( platform : : errors : : Unavailable (
" Cusolver loader cannot support Windows temporarily. " ) ) ;
# else
return GetDsoHandleFromSearchPath ( FLAGS_cuda_dir , " libcusolver.so " ) ;
# endif