g++ 编译错误: cublasGetStatusString 未声明 & 格式化警告修复
{"title": "g++ 编译错误: cublasGetStatusString 未声明 & 格式化警告修复", "description": "本文介绍了在编译使用 CUDA 和 cuBLAS 的程序时遇到的两个常见错误:cublasGetStatusString 函数未声明和格式化警告。文章提供了详细的解决方案,并解释了错误的原因和修复方法。", "keywords": "g++, CUDA, cuBLAS, cublasGetStatusString, 编译错误, 格式化警告, 错误修复, 解决方案", "content": ""g++ -O3 -Wno-unused-result -I/usr/local/cuda/include -c gpu_burn-drv.cpp\n"gpu_burn-drv.cpp: In function ‘void _checkError(cublasStatus_t, std::__cxx11::string, int, std::__cxx11::string)’: \n"gpu_burn-drv.cpp:82:27: error: ‘cublasGetStatusString’ was not declared in this scope\n" const char *err = cublasGetStatusString(rCode);\n" ^~~~~~~~~~~~~~~~~~~~~\n"gpu_burn-drv.cpp:82:27: note: suggested alternative: ‘cublasGetMatrix’\n" const char *err = cublasGetStatusString(rCode);\n" ^~~~~~~~~~~~~~~~~~~~~\n" cublasGetMatrix\n"gpu_burn-drv.cpp: In function ‘void showHelp()’: \n"gpu_burn-drv.cpp:748:77: warning: ' ' flag used with ‘%o’ gnu_printf format [-Wformat=] \n" " gpu-burn -m 50%% # burns using 50%% of the available GPU memory\n"
原文地址: http://www.cveoy.top/t/topic/pSoR 著作权归作者所有。请勿转载和采集!