Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling error on windows: class "__half" has no member "x" #815

Open
JrManit opened this issue Feb 20, 2018 · 4 comments
Open

compiling error on windows: class "__half" has no member "x" #815

JrManit opened this issue Feb 20, 2018 · 4 comments

Comments

@JrManit
Copy link

JrManit commented Feb 20, 2018

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?

@tinalegre
Copy link

tinalegre commented Mar 19, 2018

@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`

@raftx24
Copy link

raftx24 commented Apr 28, 2018

i'm having the same issue! how to solve it!?

@nagadomi
Copy link

Probably the same issue as #797

@maximiliangoettgens
Copy link

I am having this error too, did anybody solve it yet?
@nagadomi I posted this error into issue #797 as well but it seems to be something different since the proposed solutions do not work for me. Maybe anybody else has found a fix for this in the meantime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants