wincnn icon indicating copy to clipboard operation
wincnn copied to clipboard

How to use wincnn for a big input matrix?

Open zhouyecs opened this issue 11 months ago • 4 comments

Input size is 16*11, kernel size is 3*3, stride and padding are 1, how to calculate A, G and B by wincnn?

zhouyecs avatar Dec 09 '24 15:12 zhouyecs

The minimal Winograd (modified Cook-Toom) algorithms calculated by wincnn are most effective with small tiles. You would normally use a tile size of 2 or 4 and tile the input. The paper "Fast algorithms for conv. Neural networks" goes into the details.

andravin avatar Dec 10 '24 07:12 andravin

I get it, thanks a lot! And how to calculate interpolation points, like F(4, 7)?

zhouyecs avatar Dec 20 '24 10:12 zhouyecs

I really wouldn't ever use a Winograd minimal filtering algorithm (modified cook-toom algorithm) for anything bigger than F(6, 3), F(4, 5), or F(2, 7). All these have an input tile size of 8.

If you want a fast algorithm with a larger tile size, you should check out the non-minimal Winograd algorithms. They use more multiplications but have simpler and more stable transforms.

andravin avatar Jan 24 '25 22:01 andravin

Thanks a lot! I've solved the problem by spliting the input matrix.

zhouyecs avatar Feb 10 '25 08:02 zhouyecs