nengo-ocl
nengo-ocl copied to clipboard
More improvements to Conv2d speed
Trying computing multiple filters per group to reduce the number of times the image has to be loaded. So far, it hasn't seemed to help that much, though.
Maybe it makes sense that this doesn't help. For global filters (convolution), the limiting factor seems to be FLOPS, not memory access, so reducing image loads wouldn't make a difference.
For local filters, the amount of memory in the filters (nf * ni * nj * nc * si * sj) is much greater than in the image (ni * nj * nc), assuming the filter stride is 1, so reducing image loads won't make a difference. It would only be the case when the stride is about the size of the kernel width that the image data would be on par with the filter data for one workgroup, and so in this case computing multiple kernels per group might help.