facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.95k forks source link

Compile error... #772

Open Raidin opened 7 years ago

Raidin commented 7 years ago

Hi, I'm building the framework on Ubuntu 14.04 using CUDA 7.5, A compilation error occurs.

[ 18%] Building NVCC (Device) object third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda_private.cu.o /home/jihunjung/caffe2/third_party/gloo/gloo/cuda_private.cu(40): error: identifier "__int2half_rn" is undefined

1 error detected in the compilation of "/tmp/tmpxft_00003a82_00000000-7_cuda_private.cpp1.ii". CMake Error at gloo_cuda_generated_cuda_private.cu.o.Release.cmake:278 (message): Error generating file /home/jihunjung/caffe2/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda_private.cu.o

How to solve this error??

akshay-raj-dhamija commented 7 years ago

Not sure, but a temporary fix might be to build without gloo using -DUSE_GLOO=OFF in your Makefile

pietern commented 7 years ago

cc @wesolwsk

wesolwsk commented 7 years ago

Looks like that particular function is only supported in CUDA 8.0. We can use __float2half_rn instead to make this more portable.

attitudechunfeng commented 7 years ago

@wesolwsk Could you show some more details about how to use __float2half_rn to instead __int2half_rn?