Hi,
on building the following repository with the following Makefile.config configurations
Clone Caffe: “git clone https://github.com/NVIDIA/caffe.git -b experimental/fp16”
modified Makefile.config with
Line 5: enabled “USE_CUDNN := 1”
Line 17: enabled “NATIVE_FP16 := 1
Line 41: inserted “-gencode arch=compute_53,code=sm_53 \”
Line 42: modified “-gencode arch=compute_50,code=compute_50” to “-gencode arch=compute_53,code=compute_53”
cd caffe/
make
get the following ERROR
NVCC src/caffe/layers/im2col_layer.cu
NVCC src/caffe/layers/deconv_layer.cu
NVCC src/caffe/layers/tile_layer.cu
NVCC src/caffe/layers/cudnn_sigmoid_layer.cu
NVCC src/caffe/util/fp16_conversion.cu
NVCC src/caffe/util/math_functions.cu
src/caffe/util/math_functions.cu(284): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_dot_kernel(int, const Dtype *, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(321): here
src/caffe/util/math_functions.cu(352): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_asum_kernel(int, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(387): here
src/caffe/util/math_functions.cu(284): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_dot_kernel(int, const Dtype *, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(321): here
src/caffe/util/math_functions.cu(352): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_asum_kernel(int, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(387): here
src/caffe/util/math_functions.cu(284): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_dot_kernel(int, const Dtype *, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(321): here
src/caffe/util/math_functions.cu(352): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_asum_kernel(int, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(387): here
src/caffe/util/math_functions.cu(284): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_dot_kernel(int, const Dtype *, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(321): here
src/caffe/util/math_functions.cu(352): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_asum_kernel(int, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(387): here
src/caffe/util/math_functions.cu(284): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_dot_kernel(int, const Dtype *, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(321): here
src/caffe/util/math_functions.cu(352): warning: __shared__ memory variable with non-empty constructor or destructor (potential race between threads)
detected during instantiation of "void caffe::gpu_asum_kernel(int, const Dtype *, Mtype *) [with Dtype=caffe::float16, Mtype=caffe::float16]"
(387): here
NVCC src/caffe/util/im2col.cu
AR -o /home/ubuntu/username/caffe_FP_16/caffe/.build_release/lib/libcaffe-nv.a
LD -o /home/ubuntu/username/caffe_FP_16/caffe/.build_release/lib/libcaffe-nv.so.0.12.0
CXX tools/upgrade_net_proto_text.cpp
CXX/LD -o /home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/upgrade_net_proto_text.bin
CXX tools/device_query.cpp
CXX/LD -o /home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/device_query.bin
CXX tools/caffe_fp16.cpp
CXX/LD -o /home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/caffe_fp16.bin
/home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/caffe_fp16.o: In function `CopyLayers(caffe::Solver<caffe::float16, float>*, std::string const&)':
caffe_fp16.cpp:(.text+0x19a): undefined reference to `caffe::Net<caffe::float16, float>::CopyTrainedLayersFrom(std::string)'
caffe_fp16.cpp:(.text+0x1f8): undefined reference to `caffe::Net<caffe::float16, float>::CopyTrainedLayersFrom(std::string)'
/home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/caffe_fp16.o: In function `test()':
caffe_fp16.cpp:(.text+0xa58): undefined reference to `caffe::Net<caffe::float16, float>::Net(std::string const&, caffe::Phase, caffe::Net<caffe::float16, float> const*)'
caffe_fp16.cpp:(.text+0xa6a): undefined reference to `caffe::Net<caffe::float16, float>::CopyTrainedLayersFrom(std::string)'
caffe_fp16.cpp:(.text+0xb04): undefined reference to `caffe::Net<caffe::float16, float>::Forward(std::vector<caffe::Blob<caffe::float16, float>*, std::allocator<caffe::Blob<caffe::float16, float>*> > const&, float*)'
caffe_fp16.cpp:(.text+0xb36): undefined reference to `caffe::Blob<caffe::float16, float>::cpu_data() const'
caffe_fp16.cpp:(.text+0xbf8): undefined reference to `cpu_half2float(__half)'
caffe_fp16.cpp:(.text+0xd6c): undefined reference to `cpu_half2float(__half)'
/home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/caffe_fp16.o: In function `time()':
caffe_fp16.cpp:(.text+0x12f2): undefined reference to `caffe::Net<caffe::float16, float>::Net(std::string const&, caffe::Phase, caffe::Net<caffe::float16, float> const*)'
caffe_fp16.cpp:(.text+0x132e): undefined reference to `caffe::Net<caffe::float16, float>::Forward(std::vector<caffe::Blob<caffe::float16, float>*, std::allocator<caffe::Blob<caffe::float16, float>*> > const&, float*)'
/home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/caffe_fp16.o: In function `caffe::Layer<caffe::float16, float>::Forward(std::vector<caffe::Blob<caffe::float16, float>*, std::allocator<caffe::Blob<caffe::float16, float>*> > const&, std::vector<caffe::Blob<caffe::float16, float>*, std::allocator<caffe::Blob<caffe::float16, float>*> > const&)':
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x10): undefined reference to `caffe::LayerBase::Lock()'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x56): undefined reference to `cpu_half2float(__half)'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x88): undefined reference to `cpu_float2half_rn(float)'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x8e): undefined reference to `cpu_half2float(__half)'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0xa8): undefined reference to `caffe::Blob<caffe::float16, float>::gpu_data() const'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0xb4): undefined reference to `caffe::Blob<caffe::float16, float>::gpu_diff() const'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0xc4): undefined reference to `void caffe::caffe_gpu_dot<caffe::float16, float>(int, caffe::float16 const*, caffe::float16 const*, float*)'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0xfc): undefined reference to `caffe::LayerBase::Unlock()'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x130): undefined reference to `cpu_half2float(__half)'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x162): undefined reference to `cpu_float2half_rn(float)'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x168): undefined reference to `cpu_half2float(__half)'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x182): undefined reference to `caffe::Blob<caffe::float16, float>::cpu_data() const'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x18e): undefined reference to `caffe::Blob<caffe::float16, float>::cpu_diff() const'
caffe_fp16.cpp:(.text._ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_[_ZN5caffe5LayerINS_7float16EfE7ForwardERKSt6vectorIPNS_4BlobIS1_fEESaIS6_EESA_]+0x198): undefined reference to `float caffe::caffe_cpu_dot<caffe::float16, float>(int, caffe::float16 const*, caffe::float16 const*)'
/home/ubuntu/username/caffe_FP_16/caffe/.build_release/tools/caffe_fp16.o: In function `main':
caffe_fp16.cpp:(.text.startup+0x54): undefined reference to `caffe::gpu_memory::init(std::vector<int, std::allocator<int> > const&, caffe::gpu_memory::PoolMode, bool)'
caffe_fp16.cpp:(.text.startup+0x6a): undefined reference to `caffe::gpu_memory::destroy()'
caffe_fp16.cpp:(.text.startup+0xb8): undefined reference to `caffe::gpu_memory::destroy()'
caffe_fp16.cpp:(.text.startup+0x16e): undefined reference to `caffe::gpu_memory::destroy()'
collect2: error: ld returned 1 exit status