CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Installing paddle does not depend on local cuda and cudnn #60841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing paddle does not depend on local cuda and cudnn #60841
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
✅ This PR's description meets the template requirements! |
#if defined(__linux__) && defined(PADDLE_WITH_CUDA) | ||
if (CUDA_VERSION >= 11000 && CUDA_VERSION < 12000) { | ||
return GetDsoHandleFromSearchPath(FLAGS_cublas_dir, "libcublasLt.so.11"); | ||
} else if (CUDA_VERSION >= 12000 && CUDA_VERSION <= 12030) { | ||
return GetDsoHandleFromSearchPath(FLAGS_cublas_dir, "libcublasLt.so.12"); | ||
} else { | ||
std::string warning_msg( | ||
"Your CUDA_VERSION is less than 11 or greater than 12, paddle " | ||
"temporarily no longer supports"); | ||
return nullptr; | ||
} | ||
#elif defined(PADDLE_WITH_CUDA) && CUDA_VERSION >= 10010 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段逻辑会和下面的这个 elif 分支冲突吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的
@@ -369,17 +353,30 @@ void* GetCUDNNDsoHandle() { | |||
return GetDsoHandleFromSearchPath(FLAGS_miopen_dir, "libMIOpen.so", false); | |||
#else | |||
return GetDsoHandleFromSearchPath( | |||
FLAGS_cudnn_dir, "libcudnn.so", false, {cuda_lib_path}); | |||
FLAGS_cudnn_dir, "libcudnn.so.8", false, {cuda_lib_path}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么一定是 .8 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为nvidia提供的包没有libcudnn.so,止呕libcudnn.so.8
#else | ||
return GetDsoHandleFromSearchPath( | ||
FLAGS_cupti_dir, "libcupti.so", false, {cupti_lib_path}); | ||
FLAGS_cupti_dir, "libcupti.so.11.7", false, {cupti_lib_path}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,为什么一定是 .11.7
@@ -392,7 +389,7 @@ void* GetCurandDsoHandle() { | |||
#elif defined(PADDLE_WITH_HIP) | |||
return GetDsoHandleFromSearchPath(FLAGS_rocm_dir, "libhiprand.so"); | |||
#else | |||
return GetDsoHandleFromSearchPath(FLAGS_cuda_dir, "libcurand.so"); | |||
return GetDsoHandleFromSearchPath(FLAGS_curand_dir, "libcurand.so.10"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
python/setup.py.in
Outdated
commands = ["patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/base/${FLUID_CORE_NAME}" + '.so'] | ||
commands.append("patchelf --set-rpath '$ORIGIN' ${PADDLE_BINARY_DIR}/python/paddle/libs/${COMMON_NAME}") | ||
commands = ["patchelf --set-rpath '$ORIGIN/../libs/:$ORIGIN/../../nvidia/cuda_runtime/lib' ${PADDLE_BINARY_DIR}/python/paddle/base/${FLUID_CORE_NAME}" + '.so'] | ||
#commands.append("patchelf --set-rpath '$ORIGIN' ${PADDLE_BINARY_DIR}/python/paddle/libs/${COMMON_NAME}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
python/setup.py.in
Outdated
commands = ["patchelf --set-rpath '$ORIGIN/../libs/' ${PADDLE_BINARY_DIR}/python/paddle/base/${FLUID_CORE_NAME}" + '.so'] | ||
commands.append("patchelf --set-rpath '$ORIGIN' ${PADDLE_BINARY_DIR}/python/paddle/libs/${COMMON_NAME}") | ||
commands = ["patchelf --set-rpath '$ORIGIN/../libs/:$ORIGIN/../../nvidia/cuda_runtime/lib' ${PADDLE_BINARY_DIR}/python/paddle/base/${FLUID_CORE_NAME}" + '.so'] | ||
#commands.append("patchelf --set-rpath '$ORIGIN' ${PADDLE_BINARY_DIR}/python/paddle/libs/${COMMON_NAME}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释代码不需要删掉吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
… install_paddle_upgrade
5b98ce0
to
c110115
Compare
… install_paddle_upgrade
493fb59
to
a0a19f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for setup.py.in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…le#60841) * fix bug * fix bug * fix * fix * fix * fix * fix * fix * fix * fix * fix
PR types
Others
PR changes
Others
Description
功能:
支持用户在linux系统,x86_64平台下安装paddle,本地不需要装cuda和cudnn
收益:
1 whl包体积缩小180M
2 用户安装体验提升
Pcard-67164