Не удалось загрузить динамическую библиотеку ‘libcublasLt.so.11’; ошибка: libcublasLt.so.11: не удается открыть файл общего объекта: Такого файла или каталога нет

#python #tensorflow #cuda #driver

#питон #тензорный поток #cuda #водитель

Вопрос:

Я только что обновил свои накопители с видеокартами

 sudo apt install nvidia-driver-470 sudo apt install cuda-drivers-470  

Я решил установить их таким образом, потому что они сдерживались при попытке sudo apt upgrade . Затем я sudo apt autoremove по ошибке очистил старые пакеты. После перезагрузки компьютера для правильной настройки новых драйверов я больше не мог использовать ускорение GPU с помощью tensorflow.

 import tensorflow as tf tf.test.is_gpu_available() WARNING:tensorflow:From lt;stdingt;:1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version. Instructions for updating: Use `tf.config.list_physical_devices('GPU')` instead. 2021-12-07 16:52:01.771391: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-12-07 16:52:01.807283: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:939] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-12-07 16:52:01.807973: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory 2021-12-07 16:52:01.808017: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublas.so.11'; dlerror: libcublas.so.11: cannot open shared object file: No such file or directory 2021-12-07 16:52:01.808048: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublasLt.so.11'; dlerror: libcublasLt.so.11: cannot open shared object file: No such file or directory 2021-12-07 16:52:01.856391: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcusolver.so.11'; dlerror: libcusolver.so.11: cannot open shared object file: No such file or directory 2021-12-07 16:52:01.856466: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcusparse.so.11'; dlerror: libcusparse.so.11: cannot open shared object file: No such file or directory 2021-12-07 16:52:01.857601: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... False   

Ответ №1:

Вы можете создавать символические ссылки внутри /usr/lib/x86_64-linux-gnu каталога. Я нашел его по:

 $ whereis libcudart libcudart: /usr/lib/x86_64-linux-gnu/libcudart.so /usr/share/man/man7/libcudart.7.gz  

В этой папке вы можете найти другие версии этих библиотек cuda. Затем создайте символические ссылки, подобные этому. Ваша конкретная версия, на которую вы ссылаетесь, может немного отличаться.

 $ sudo ln -s libcublas.so.10.2.1.243 libcublas.so.11 $ sudo ln -s libcublasLt.so.10.2.1.243 libcublasLt.so.11 $ sudo ln -s libcusolver.so.10.2.0.243 libcusolver.so.11 $ sudo ln -s libcusparse.so.10.3.0.243 libcusparse.so.11  

Теперь ваш графический процессор должен быть обнаружен.

 import tensorflow as tf gt;gt;gt; tf.test.is_gpu_available() WARNING:tensorflow:From lt;stdingt;:1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version. Instructions for updating: Use `tf.config.list_physical_devices('GPU')` instead. 2021-12-07 17:07:26.914296: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-12-07 17:07:26.950731: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:939] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-12-07 17:07:27.029687: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:939] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-12-07 17:07:27.030421: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:939] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-12-07 17:07:27.325218: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:939] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-12-07 17:07:27.325642: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:939] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-12-07 17:07:27.326022: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:939] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero 2021-12-07 17:07:27.326408: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /device:GPU:0 with 9280 MB memory: -gt; device: 0, name: NVIDIA GeForce RTX 3060, pci bus id: 0000:06:00.0, compute capability: 8.6 True  

Этот метод работает, потому что эти библиотеки cuda достаточно похожи, что даже NVIDIA часто создает их с символическими ссылками. Если tensorflow ищет libcublas.so.11 , вы можете создать файл с таким именем, который просто указывает на другую версию libcublas, которая уже установлена.