c++ - caffe cudnn version 4 & 5 -
i use cudnn acceleration in caffe program. use cudnn 4 @ begin , it's working fine when updated cudnn version 5.0, pow function doesn't work. calling function in batch_norm layer
caffe_gpu_powx(variance_.count(), variance_.gpu_data(), dtype(0.5), variance_.mutable_gpu_data());
and data after calling doesn't change. pow function defined below, same in caffe github banch
template <typename dtype> \__global__ void powx_kernel(const int n, const dtype* a, const dtype alpha, dtype* y) { cuda_kernel_loop(index, n) { y[index] = pow(a[index], alpha); } } template <> void caffe_gpu_powx<float>(const int n, const float* a, const float alpha, float* y) { // nolint_next_line(whitespace/operators) powx_kernel<float><<<caffe_get_blocks(n), caffe_cuda_num_threads>>>( n, a, alpha, y); }
i made mistake have set code generation "compute_52,sm_52" @ begin titan x, lower gpu should set "compute_20,sm_20". , it's working fine now.
Comments
Post a Comment