IntelLabs / SkimCaffe

Caffe for Sparse Convolutional Neural Network
Other
238 stars 64 forks source link

direct sparse convolution in gpu mode #16

Closed knsong closed 6 years ago

knsong commented 6 years ago

hi, thank you for the work first. But I notice that in gpu mode, BaseConvolutionLayer in skimcaffe uses cusparseScsrmm() to perform im2col+gemm like convolution and treats weights and col_buff as a dense, sparse matrix respectively. I'm confused here and shouldn't it be the inverse case that weights is sparse and col_buff is dense?

jspark1105 commented 6 years ago

Thanks for your interest in our project. Unfortunately, we focused on CPU speedups and GPU code is not maintained. The GPU code path is mostly a remnant of Wei's https://github.com/wenwei202/caffe that we forked from. If you're interested in getting speedups in GPU from structured sparsity, please refer to that project.

knsong commented 6 years ago

Thank you for the reply. BTW, is there an efficient sparse winograd inference implementation in SkimCaffe? I noticed that WinogradLayer<Dtype>::Forward_cpu() didn't take advantage of sparsity.

jspark1105 commented 6 years ago

Sorry, looks like I didn't add the optimized sparse sparse Winograd forward implementation before I left Intel.

knsong commented 6 years ago

@jspark1105 Ok, thanks.