sair-lab/kervolution

unfold is much slow

jiequancui opened this issue · 2 comments

Hi, I find the nn.unfold is much slow in pytorch. And your implementation is based on nn.unfold. I want to know if you have any tricks to speed up it ?

Hi, only the polynomial kernel can be accelerated using pytorch Conv2D directly.
For other kernels, we can write cuda extensions, such as this page

Very Thanks