Maratyszcza / NNPACK

Acceleration package for neural networks on multi-core CPUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Xunie opened this issue · comments

commented

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.

NNPACK/CMakeLists.txt

Lines 49 to 56 in 57616b9

# ---[ Build flags
IF(NOT CMAKE_SYSTEM_PROCESSOR)
IF(NOT IOS)
MESSAGE(WARNING "CMAKE_SYSTEM_PROCESSOR is not defined, automatic configuration may choose suboptimal options")
ENDIF()
ELSEIF(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64|armv5te|armv7-a|armv7l|armv7|armv7s|aarch64|arm64|arm64e)$")
MESSAGE(FATAL_ERROR "Unrecognized CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
ENDIF()

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 PROCESSOR_ARCHITECTURE may be either x86, IA64 or AMD64 See here.

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

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

commented

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...