@@ -467,10 +467,16 @@ void* GetCublasDsoHandle() {
467467 return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublas.so.12" );
468468#else
469469 return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublas.so" );
470+ #endif
471+ } else if (CUDA_VERSION >= 13000 && CUDA_VERSION < 14000 ) {
472+ #ifdef PADDLE_WITH_PIP_CUDA_LIBRARIES
473+ return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublas.so.13" );
474+ #else
475+ return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublas.so" );
470476#endif
471477 } else {
472478 std::string warning_msg (
473- " Your CUDA_VERSION is less than 11 or greater than 13 , paddle "
479+ " Your CUDA_VERSION is less than 11 or greater than 14 , paddle "
474480 " temporarily no longer supports" );
475481 return nullptr ;
476482 }
@@ -497,10 +503,16 @@ void* GetCublasLtDsoHandle() {
497503 return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublasLt.so.12" );
498504#else
499505 return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublasLt.so" );
506+ #endif
507+ } else if (CUDA_VERSION >= 13000 && CUDA_VERSION < 14000 ) {
508+ #ifdef PADDLE_WITH_PIP_CUDA_LIBRARIES
509+ return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublasLt.so.13" );
510+ #else
511+ return GetDsoHandleFromSearchPath (FLAGS_cublas_dir, " libcublasLt.so" );
500512#endif
501513 } else {
502514 std::string warning_msg (
503- " Your CUDA_VERSION is less than 11 or greater than 13 , paddle "
515+ " Your CUDA_VERSION is less than 11 or greater than 14 , paddle "
504516 " temporarily no longer supports" );
505517 return nullptr ;
506518 }
@@ -518,10 +530,17 @@ void* GetCublasLtDsoHandle() {
518530#else
519531 return GetDsoHandleFromSearchPath (
520532 FLAGS_cuda_dir, win_cublas_lib, true , {cuda_lib_path});
533+ #endif
534+ } else if (CUDA_VERSION >= 13000 && CUDA_VERSION < 14000 ) {
535+ #ifdef PADDLE_WITH_PIP_CUDA_LIBRARIES
536+ return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " cublasLt64_13.dll" );
537+ #else
538+ return GetDsoHandleFromSearchPath (
539+ FLAGS_cuda_dir, win_cublas_lib, true , {cuda_lib_path});
521540#endif
522541 } else {
523542 std::string warning_msg (
524- " Your CUDA_VERSION is less than 11 or greater than 12 , paddle "
543+ " Your CUDA_VERSION is less than 11 or greater than 14 , paddle "
525544 " temporarily no longer supports" );
526545 return nullptr ;
527546 }
@@ -619,10 +638,18 @@ void* GetCUPTIDsoHandle() {
619638#else
620639 return GetDsoHandleFromSearchPath (
621640 FLAGS_cupti_dir, " libcupti.so" , false , {cupti_lib_path});
641+ #endif
642+ } else if (CUDA_VERSION >= 13000 && CUDA_VERSION < 14000 ) {
643+ #ifdef PADDLE_WITH_PIP_CUDA_LIBRARIES
644+ return GetDsoHandleFromSearchPath (
645+ FLAGS_cupti_dir, " libcupti.so.13" , false , {cupti_lib_path});
646+ #else
647+ return GetDsoHandleFromSearchPath (
648+ FLAGS_cupti_dir, " libcupti.so" , false , {cupti_lib_path});
622649#endif
623650 } else {
624651 std::string warning_msg (
625- " Your CUDA_VERSION is less than 11 or greater than 13 , paddle "
652+ " Your CUDA_VERSION is less than 11 or greater than 14 , paddle "
626653 " temporarily no longer supports" );
627654 return nullptr ;
628655 }
@@ -695,12 +722,22 @@ void* GetCusolverDsoHandle() {
695722#endif
696723#elif defined(PADDLE_WITH_HIP)
697724 return GetDsoHandleFromSearchPath (FLAGS_rocm_dir, " librocsolver.so" );
725+ #elif defined(__linux__) && defined(PADDLE_WITH_CUDA)
726+ if (CUDA_VERSION < 13000 ) {
727+ #ifdef PADDLE_WITH_PIP_CUDA_LIBRARIES
728+ return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcusolver.so.11" );
698729#else
730+ return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcusolver.so" );
731+ #endif
732+ } else {
699733#ifdef PADDLE_WITH_PIP_CUDA_LIBRARIES
700- return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcusolver.so.11 " );
734+ return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcusolver.so.12 " );
701735#else
702- return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcusolver.so" );
736+ return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcusolver.so" );
703737#endif
738+ }
739+ #else
740+ return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcusolver.so.11" );
704741#endif
705742}
706743
@@ -737,15 +774,15 @@ void* GetCusparseDsoHandle() {
737774#else
738775 return GetDsoHandleFromSearchPath (FLAGS_cusparse_dir, " libcusparse.so" );
739776#endif
740- } else if (CUDA_VERSION >= 12000 && CUDA_VERSION < 13000 ) {
777+ } else if (CUDA_VERSION >= 12000 && CUDA_VERSION < 14000 ) {
741778#ifdef PADDLE_WITH_PIP_CUDA_LIBRARIES
742779 return GetDsoHandleFromSearchPath (FLAGS_cusparse_dir, " libcusparse.so.12" );
743780#else
744781 return GetDsoHandleFromSearchPath (FLAGS_cusparse_dir, " libcusparse.so" );
745782#endif
746783 } else {
747784 std::string warning_msg (
748- " Your CUDA_VERSION is less than 11 or greater than 12 , paddle "
785+ " Your CUDA_VERSION is less than 11 or greater than 14 , paddle "
749786 " temporarily no longer." );
750787 return nullptr ;
751788 }
@@ -979,10 +1016,12 @@ void* GetCUFFTDsoHandle() {
9791016#endif
9801017 } else if (CUDA_VERSION >= 12000 && CUDA_VERSION < 13000 ) {
9811018 return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcufft.so.11" );
1019+ } else if (CUDA_VERSION >= 13000 && CUDA_VERSION < 14000 ) {
1020+ return GetDsoHandleFromSearchPath (FLAGS_cuda_dir, " libcufft.so.12" );
9821021 } else {
9831022 std::string warning_msg (
984- " Your CUDA_VERSION is less than 11 or greater than 13 , paddle "
985- " temporarily no longer. " );
1023+ " Your CUDA_VERSION is less than 11 or greater than 14 , paddle "
1024+ " temporarily no longer supports " );
9861025 return nullptr ;
9871026 }
9881027#elif defined(_WIN32) && defined(PADDLE_WITH_CUDA)
0 commit comments