Dilated convolution is too slow!

I find that the dilated convolution(dilation=2,4…) is slower much than convolution without dilated (dilation=1)?my pytorch version is 0.3, CUDNN is 7.0,what should I do to accelerate it ?

THNN source code is little bit confusing because there are too many macro references, sometimes nested. But as I see, it first computes bias via GEMM, and apply im2col to the filter and input, with another GEMM following. As GEMMs are supposed to take same amount of computation, I think the bottleneck could be im2col procedure. So It might be hard to optimize.

Thanks for your answer, what about CUDNN? it doesn’t support dilated convolution now ?

Cudnn supports dilated convolutions and pytorch uses it for dilated convolutions, however, they are harder to optimize, so they are not expected to be as fast as non-dilated convolutions.

Hi, I also encountered the same problems, so, I want to know if you have solved this problems, if it is solved, could you share the experience?