1.
[报错]/usr/include/eigen3/Eigen/src/Core/arch/CUDA/Half.h(596): error: no suitable constructor exists to convert from “float” to “Eigen::half”
[方法]
cd /usr/include/eigen3/Eigen/src/Core/arch/CUDA
sudo gedit Half.h
将596行直接注释
2.
[报错]In file included from /usr/local/cuda-11.3/include/cuda_runtime.h:115:0,
from :0:
/usr/local/cuda-11.3/include/crt/common_functions.h:74:24: error: token ““CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”” is not valid in preprocessor expressions
#define CUDACC_VER “CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”
^
/usr/local/cuda-11.3/include/crt/common_functions.h:74:24: note: in definition of macro ‘CUDACC_VER’
#define CUDACC_VER “CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
。。。。。。
[方法]
cd /usr/local/cuda-11.3/include/crt
sudo gedit common_functions.h
将第74行对应内容直接注释
3.
[报错]/usr/include/eigen3/Eigen/Core:42:14: fatal error: math_functions.hpp: No such file or directory
#include <math_functions.hpp>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[方法]
cd /usr/include/eigen3/Eigen
sudo gedit Core
注释42行: #include <math_functions.hpp>
将42行改为: #include <cuda_runtime.h>