0
Follow
0
View

Why do cudnn test errors occur after installation?(Operating system -linux)

inu1120 注册会员
2023-02-26 17:24

The following answers are quoted from GPT-3 model, please use them wisely:

该错误一般是在没有正确初始化cudnn软件库的情况下出现的。cudnn1.请确保你的计算机已经安装了最新的NVIDIA驱动程序,以正确配置和运行CUDA。

2.请检查你的系统是否安装了最新版本的CUDA Development Kit(CUDA SDK)和CUDNN软件库。

3.请使用以下命令检查CUDA和CUDNN的版本:

nvcc --version
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

4.安装完CUDNN后,请在/usr/local/cuda/lib64/libcudnn.so.*和/usr/local/cuda/include/cudnn.h中检查对应的CUDNN库文件和头文件。

5.在程序代码中,请加入cudnnCreate()和cudnnSetApis()函数来正确初始化CUDNN,以便在程序中调用CUDNN的API接口。

6.请检查你的计算机是否安装了最新的最优化的CUDNN,并查看它是否与你的CUDA相匹配,并正确初始化。 

7.最后,mnistCUDNN,并检查是否再次出现此错误。

Please accept my answer if it answers your question

medicmagic 注册会员
2023-02-26 17:24

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > this error may be because you have not properly initialized cudnn. Before using cudnn, you need to create a cudnn handle using the cudnnCreate function and clean it up after use using the cudnnDestroy function. Make sure you properly initialize and clean up cudnn handles in your test code. Here is a simple sample code snippet:

cudnnHandle_t cudnn;
cudnnCreate(&cudnn);
// 测试代码
cudnnDestroy(cudnn);


If you have properly initialized the cudnn handle, check that you are using the correct version of cudnn and that your code is compatible with the cudnn version. You can also try reinstalling cudnn and recompiling your code.

dellay0210 注册会员
2023-02-26 17:24

This answer refers to GPT and GPT_Pro to better solve the problem.
CUDNN may not work properly due to a problem during the installation. The reasons may be as follows:

  1. The computer does not support CUDNN: For example, the NVIDIA graphics card or CUDA Toolkit is not installed on the computer. As a result, CUDNN cannot work properly.

  2. Computer environment mismatch: For example, an incompatible CUDA Toolkit version or CUDNN version is installed on the computer. As a result, CUDNN cannot work properly.

  3. An error occurs during the CUDNN installation. For example, an exception occurs during the CUDNN installation. CUDNN cannot work properly.

It is recommended that you check whether the graphics card and CUDA Toolkit version of the computer meet the requirements of CUDNN, and then install CUDNN again to ensure that CUDNN can work properly.
If the answer is helpful, please accept it.

About the Author

Question Info

Publish Time
2023-02-26 17:24
Update Time
2023-02-26 17:24