leezu opened a new pull request #17468: Add -march=native -mtune=native to config/config.cmake URL: https://github.com/apache/incubator-mxnet/pull/17468 ## Description ## Add settings to `config/config.cmake` to optimize for local CPU architecture. ### Changes ### - [X] Add -march=native -mtune=native to config/config.cmake ## Comments ## Related https://github.com/apache/incubator-mxnet/pull/17047 @TaoLv would providing different default `config/config.cmake` files for different architectures with the respective compiler flags be an easier way forward than adding flags like `USE_X86_ARCH` to the `CMakeLists.txt`. What do you think? For example, for ARM, the config file would instead contain ``` # CPU Architecture to optimize for. With default settings, your build may not # work on earlier CPUs than the one used by the system you are compiling on. # To work with older CPU, set the -march, -mtune variables below to the # respective architecture name of the target CPU (see GCC documentation). set(CMAKE_C_FLAGS "-mcpu=native" CACHE STRING "C compiler flags") set(CMAKE_CXX_FLAGS "-mcpu=native" CACHE STRING "C++ compiler flags") ``` as per https://github.com/apache/incubator-mxnet/pull/17047#issuecomment-565274798, https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
