MCPcopy Create free account
hub / github.com/BVLC/caffe / forward_gpu_gemm

Method forward_gpu_gemm

src/caffe/layers/base_conv_layer.cpp:325–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323
324template <typename Dtype>
325void BaseConvolutionLayer<Dtype>::forward_gpu_gemm(const Dtype* input,
326 const Dtype* weights, Dtype* output, bool skip_im2col) {
327 const Dtype* col_buff = input;
328 if (!is_1x1_) {
329 if (!skip_im2col) {
330 conv_im2col_gpu(input, col_buffer_.mutable_gpu_data());
331 }
332 col_buff = col_buffer_.gpu_data();
333 }
334 for (int g = 0; g < group_; ++g) {
335 caffe_gpu_gemm<Dtype>(CblasNoTrans, CblasNoTrans, conv_out_channels_ /
336 group_, conv_out_spatial_dim_, kernel_dim_,
337 (Dtype)1., weights + weight_offset_ * g, col_buff + col_offset_ * g,
338 (Dtype)0., output + output_offset_ * g);
339 }
340}
341
342template <typename Dtype>
343void BaseConvolutionLayer<Dtype>::forward_gpu_bias(Dtype* output,

Callers

nothing calls this directly

Calls 2

mutable_gpu_dataMethod · 0.45
gpu_dataMethod · 0.45

Tested by

no test coverage detected