Skip to content
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

fix: when cudatoolkit not found the v will return as None type #3793

Open
wants to merge 1 commit into
base: release/2.9.1
Choose a base branch
from

Conversation

samthakur587
Copy link

PR types

Bug fixes

PR changes

APIs

Description

while checking the env info if cuda toolkit not installed then paddle not able to make it on cpu default. the v value is returned as Nonetype and after that you wil get error for doing the calculation on nonetype value.

/home/server2/anaconda3/envs/paddleseg/lib/python3.10/site-packages/paddle/base/framework.py:688: UserWarning: You are using GPU version Paddle, but your CUDA device is not set properly. CPU device will be used by default.
  warnings.warn(
W0902 10:47:30.370355 1513691 dynamic_loader.cc:314] The third-party dynamic library (libcudnn.so) that Paddle depends on is not configured correctly. (error code is /usr/local/cuda/lib64/libcudnn.so: cannot open shared object file: No such file or directory)
  Suggestions:
  1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
  2. Configure third-party dynamic library environment variables as follows:
  - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...`
  - Windows: set PATH by `set PATH=XXX;
Traceback (most recent call last):
  File "/home/server2/Documents/paddleseg/PaddleSeg/tools/train.py", line 211, in <module>
    main(args)
  File "/home/server2/Documents/paddleseg/PaddleSeg/tools/train.py", line 152, in main
    utils.show_env_info()
  File "/home/server2/anaconda3/envs/paddleseg/lib/python3.10/site-packages/paddleseg/utils/utils.py", line 38, in show_env_info
    env_info = get_sys_env()
  File "/home/server2/anaconda3/envs/paddleseg/lib/python3.10/site-packages/paddleseg/utils/env/sys_env.py", line 103, in get_sys_env
    v = str(v // 1000) + '.' + str(v % 1000 // 100)
TypeError: unsupported operand type(s) for //: 'NoneType' and 'int'

Copy link

paddle-bot bot commented Sep 2, 2024

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant