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

error: identifier "__half_as_ushort" is undefined #3361

Closed
xinario opened this issue Oct 30, 2017 · 1 comment
Closed

error: identifier "__half_as_ushort" is undefined #3361

xinario opened this issue Oct 30, 2017 · 1 comment

Comments

@xinario
Copy link

xinario commented Oct 30, 2017

Hi, I tried to build from source but the following errors occurred.

[ 2%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCTensorTopK.cu.o
[ 2%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCSortUtils.cu.o
[ 3%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCTensorTypeUtils.cu.o
[ 4%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCTensorMode.cu.o
[ 6%] Building NVCC (Device) object CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortByte.cu.o
[ 7%] Building NVCC (Device) object CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTByte.cu.o
/home/xin_cyber/Documents/pytorch/torch/lib/THC/THCTensorTopK.cuh(122): error: identifier "__half_as_ushort" is undefined

/home/xin_cyber/Documents/pytorch/torch/lib/THC/THCTensorTopK.cuh(134): error: identifier "__ushort_as_half" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_00001796_00000000-7_THCTensorTopK.cpp1.ii".
CMake Error at THC_generated_THCTensorTopK.cu.o.cmake:267 (message):
Error generating file
/home/xin_cyber/Documents/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorTopK.cu.o

CMakeFiles/THC.dir/build.make:9193: recipe for target 'CMakeFiles/THC.dir/THC_generated_THCTensorTopK.cu.o' failed
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCTensorTopK.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....

I'm using cuda V8.0.61

@xinario
Copy link
Author

xinario commented Oct 31, 2017

It tends out to be my own installation problem. cuda_fp16.h is not inside /usr/local/cuda/include but I've found it in /usr/local/cuda/targets/x86_64-linux/include. Maybe because I used to have an older version of cuda installed.

Anyway, I completely removed cuda and reinstalled it. All the header files are now in place and built with no problem.

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

1 participant