mish-cuda icon indicating copy to clipboard operation
mish-cuda copied to clipboard

mish.h syntax errors

Open armanm01 opened this issue 3 years ago • 1 comments

when trying to run setup.py i get the following error. C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(17): error C2144: syntax error: 'void' should be preceded by ';' C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(17): error C2065: 'scalar_t': undeclared identifier C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(17): error C2065: 'out': undeclared identifier C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(17): error C2988: unrecognizable template declaration/definition C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(17): error C2059: syntax error: 'const' C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(17): error C2143: syntax error: missing ';' before '{' C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(17): error C2447: '{': missing function header (old-style formal list?) C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(25): error C2144: syntax error: 'void' should be preceded by ';' C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(25): error C2065: 'scalar_t': undeclared identifier C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(25): error C2065: 'grad_inp': undeclared identifier C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(25): error C2988: unrecognizable template declaration/definition C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(25): error C2059: syntax error: 'const' C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(25): error C2143: syntax error: missing ';' before '{' C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(25): error C2447: '{': missing function header (old-style formal list?) C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(40): error C2062: type 'float' unexpected C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(41): error C2065: 'res': undeclared identifier C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(48): error C2062: type 'float' unexpected C:\Users\arman\Desktop\Arman\cowc-everything\scaled_yolov4_p6\mish-cuda\csrc\mish.h(49): error C2065: 'res': undeclared identifier C:\Users\arman\Anaconda3\lib\site-packages\torch\include\ATen/Parallel.h(43): error C2039: 'init_num_threads': is not a member of 'at' C:\Users\arman\Anaconda3\lib\site-packages\torch\include\ATen/Parallel.h(7): note: see declaration of 'at' C:\Users\arman\Anaconda3\lib\site-packages\torch\include\ATen/Parallel.h(43): error C3861: 'init_num_threads': identifier not found error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe' failed with exit status 2

Installing on Windows 10

armanm01 avatar Mar 18 '21 00:03 armanm01

Facing the same issue. It looks like scalar_t is undefined type and my guess is that should be defined in torch/types.h. Isn't this a version problem?

Andrej-sens avatar May 06 '21 15:05 Andrej-sens