NVIDIA / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
672 stars 263 forks source link

[Cuda/nvcc] invalid redeclaration of type name "half"&"half2" #572

Closed Klanly closed 3 years ago

Klanly commented 5 years ago

Hi, I get this error message when I try to build this with MSBuild, Here is an ( example ) ii file for this error: bias_layer.cpp1.ii.zip ( rename .zip with .7z )

The compile command ( probably ) is:

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin\nvcc.exe" -gencode=arch=compute_61,code=\"sm_61,compute_61\" --keep -ccbin "Q:\9\Program Files\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64" -x cu -I"G:\s\caff\NugetPackages\lmdb-v120-clean.0.9.14.0\build\native....\lib\native\include" -I"G:\s\caff\NugetPackages\LevelDB-vc120.1.2.0.0\build\native../..//build/native/include/" -I"G:\s\caff\NugetPackages\protobuf-v120.2.6.1\build\native../..//build/native/include/" -IG:\s\caff\NugetPackages\glog.0.3.3.0\build\native../..//build/native/include/ -IG:\s\caff\NugetPackages\gflags.2.1.2.1\build\native../..///build/native/include/ -IG:\s\caff\NugetPackages\boost.1.59.0.0\build\native....\lib\native\include\ -I"G:\s\caff\NugetPackages\hdf5-v120-complete.1.8.15.2\build\native....\lib\native\include" -IG:\s\caff\NugetPackages\OpenBLAS.0.2.14.1\build\native....\lib\native\include -IG:\s\caff\NugetPackages\OpenCV.2.4.10\build\native../../build/native/include/ -IG:\s\caff\nv108\windows\libcaffe....\include\ -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include" --keep-dir G:\s\caff\nv108\windows..\Build\Int\libcaffe\x64\Release -maxrregcount=0 --machine 64 --compile -cudart shared -Xcudafe "--diag_suppress=exception_spec_override_incompat --diag_suppress=useless_using_declaration --diag_suppress=field_without_dll_interface" -D_SCL_SECURE_NO_WARNINGS -DGFLAGS_DLL_DECL= -DHAS_LMDB -DHAS_HDF5 -DHAS_OPENBLAS -DHAS_OPENCV -DNDEBUG -D_SCL_SECURE_NO_WARNINGS -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DUSE_CUDNN -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W1 /nologo /Ox /FdG:\s\caff\nv108\windows..\Build\Int\libcaffe\x64\Release\libcaffe.pdb /FS /Zi /MD " -o G:\s\caff\nv108\windows..\Build\Int\libcaffe\x64\Release\bias_layer.cu.obj "G:\s\caff\nv108\src\caffe\layers\bias_layer.cu"

Can someone point out the wrong spot in this .ii file? Or offer a "correctly" preprocessed src\caffe\layers\bias_layer.cu as example for me?

drnikolaev commented 5 years ago

@Klanly does it happen on Ubuntu? Have you tried CUDA 10?

drnikolaev commented 3 years ago

v0.17.4