というのをTwitterで知りました。
引用 We describe FALCON, an original open-source implementation of image convolution with a 3×3 filter based on Winograd’s minimal filtering algorithm. Compared to direct convolution, Winograd’s algorithm reduces the number of arithmetic operations at the cost of complicating the memory access pattern. This study is carried out in the context of image analysis in convolutional neural networks.
とあります。
また、Winograd出てきました。
コードは、github に。
コードは、1つのC言語ファイルだけですよ。これ
コードは、1つのC言語ファイルだけですよ。これ
引用 void fal_conv(const int M, float* restrict image, const int irows, const int C, float* restrict filter, const int K, const int batch, float* restrict out){ const int outHeight = irows-2; const int outWidth = irows-2; const int sizeI = irows*irows; const int tiles = (outHeight)*0.5*(outWidth)*0.5; filter_transform(filter, C, K, t_filter); get_tiles(image, irows, irows, sizeI, C, t_image, batch, tiles); batched_gemm(t_image, M*tiles, C, t_filter, C, K, c_out, batch/M); out_transform(c_out, K, tiles, out, outWidth, outHeight, outWidth, batch); }
(hbw_posix_memalignという関数でメモリ割当しています)