Maratyszcza / NNPACK

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

CMakeLists.txt broken on MSYS2/MINGW64/AMD64 (Windows) #196

Open Xunie opened 3 years ago

Xunie commented 3 years ago

Configuring NNPACK I get a fatal error:

CMake Error at CMakeLists.txt:55 (MESSAGE):
  Unrecognized CMAKE_SYSTEM_PROCESSOR = AMD64

Platform: MSYS2 MINGW64 on a 64-bit Windows machine.

https://github.com/Maratyszcza/NNPACK/blob/57616b9a0ef7b0f8e56bfe7e9738744b52fe1828/CMakeLists.txt#L49-L56

Cause:

This all happens because CMAKE_SYSTEM_PROCESSOR is really just CMAKE_HOST_SYSTEM_PROCESSOR.

On Windows, CMAKE_HOST_SYSTEM_PROCESSOR is set to the value of the environment variable PROCESSOR_ARCHITECTURE.

And PROCESSORARCHITECTURE may be either x86, IA64 or **AMD64_** See here.

Maratyszcza commented 3 years ago

I don't think NNPACK works on Windows even if you fix the CMakeLists

Maratyszcza commented 3 years ago

Generally, I suggest you take a look at XNNPACK library, which is a successor to NNPACK, and supports Windows well.

Xunie commented 3 years ago

I don't think NNPACK works on Windows even if you fix the CMakeLists

If that's the case, there needs to be a case that deals with that and prints out a MESSAGE(FATAL_ERROR ...). I'm totally new to NNPACK and was merely trying to use tiny-dnn...