Maratyszcza / NNPACK

Acceleration package for neural networks on multi-core CPUs
BSD 2-Clause "Simplified" License
1.67k stars 317 forks source link

How to make NNPACK support 32-bit OS with AVX2 and FMA enabled? #151

Closed wnagchenghku closed 6 years ago

wnagchenghku commented 6 years ago

Dear NNPACK author,

I'm deploying NNPACK on our 32-bit OS machine. Our CPU is equipped with AVX2 and FMA capabilities, but NNPACK only supports the x86_64-bit OS with AVX2 and FMA. May I know is there anything special about this implementation? AVX instructions should be supported on both 32 and 64 bit OS.

Maratyszcza commented 6 years ago

PeachPy (assembler used for AVX2 micro-kernels in NNPACK) doesn't support 32-bit x86, so its not possible to build AVX2 micro-kernels for 32-bit x86.

wnagchenghku commented 6 years ago

Hi Maratyszcza,

Many thanks for your reply. May I know is there workaround to let NNPACK (Peachypy) generate 32-bit x86 object files?

Maratyszcza commented 6 years ago

There is no work-around. The micro-kernels are written in assembly, and there are significant differences between 32-bit and 64-bit x86, so recompilation is not possible.