Reputation: 11
I use cudnn acceleration in my caffe program. I use cudnn 4 at the begin and it's working fine but when I updated the cudnn to version 5.0, the pow function doesn't work. The calling function is in the batch_norm layer as
caffe_gpu_powx(variance_.count(), variance_.gpu_data(), Dtype(0.5), variance_.mutable_gpu_data());
And the data after calling doesn't change. The pow function is defined as below, as same as in the 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);
}
Upvotes: 0
Views: 191
Reputation: 11
I made a mistake that I have set the code generation to "compute_52,sm_52" at the begin with TITAN X, but now a lower GPU should be set to "compute_20,sm_20". And it's working fine now.
Upvotes: 1