compiling error on windows: class "__half" has no member "x"
JrManit opened this issue · 4 comments
I am trying to compile cutorch on Windows using Visual Studio 2015 and CUDA 9.1, and I am struggling with the error class "__half" has no member "x", as following.
1>j:\cpp-torch\cutorch\lib\thc\THCTensorTypeUtils.cuh(141): error : class "__half" has no member "x"
1>j:\cpp-torch\cutorch\lib\thc\THCTensorTypeUtils.cuh(141): error : class "__half" has no member "x"
1>j:\cpp-torch\cutorch\lib\thc\THCTensorTypeUtils.cuh(145): error : class "__half" has no member "x"
1>j:\cpp-torch\cutorch\lib\thc\THCTensorTypeUtils.cuh(145): error : class "__half" has no member "x"
1>j:\cpp-torch\cutorch\lib\thc\THCNumerics.cuh(114): error : class "__half" has no member "x"
1>j:\cpp-torch\cutorch\lib\thc\THCNumerics.cuh(115): error : class "__half" has no member "x"
I look at the definition of __half structure, and the x variable doesn't actually exist. The older CUDA version also doesn't work as well.
Anybody has any clue for this error?
@JrManit did you manage to solve the problem? I'm having the same issues with Ubuntu 16.04 LTS, CUDA 9.1, gcc 6.3.0. The following error messages were shown:
[ 30%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/__/THC/generated/ATen_generated_THCTensorMathReduceDouble.cu.o
[ 30%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/__/THC/generated/ATen_generated_THCTensorMaskedDouble.cu.o
[ 31%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/__/THC/ATen_generated_THCHalf.cu.o
[ 31%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/__/THCUNN/ATen_generated_AbsCriterion.cu.o
[ 31%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/__/THCUNN/ATen_generated_Abs.cu.o
[ 31%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/__/THCUNN/ATen_generated_BatchNormalization.cu.o
/home/anaconda3/include/THC/THCTensorTypeUtils.cuh(171): error: class "__half" has no member "x"
/home/anaconda3/include/THC/THCTensorTypeUtils.cuh(171): error: class "__half" has no member "x"
/home/anaconda3/include/THC/THCTensorTypeUtils.cuh(175): error: class "__half" has no member "x"
/home/anaconda3/include/THC/THCTensorTypeUtils.cuh(175): error: class "__half" has no member "x"
4 errors detected in the compilation of "/tmp/tmpxft_00011fa2_00000000-11_Abs.compute_61.cpp1.ii".
CMake Error at ATen_generated_Abs.cu.o.cmake:267 (message):
Error generating file
/home/Downloads/pytorch/torch/lib/build/aten/src/ATen/CMakeFiles/ATen.dir/__/THCUNN/./ATen_generated_Abs.cu.o`
i'm having the same issue! how to solve it!?