Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit e8a2b8b

Browse files
mseth10szha
authored andcommitted
disable default MKLDNN for cross compilation (#13893)
* disable default MKLDNN for cross compilation * adding temporary debug logs
1 parent 1e607a9 commit e8a2b8b

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
cmake_minimum_required(VERSION 3.0.2)
22

3+
# workaround to store CMAKE_CROSSCOMPILING because is getting reset by the project command
4+
if(CMAKE_CROSSCOMPILING)
5+
set(__CMAKE_CROSSCOMPILING ${CMAKE_CROSSCOMPILING})
6+
set(__CMAKE_CROSSCOMPILING_OVERRIDE ON)
7+
endif()
8+
39
project(mxnet C CXX)
410

11+
if(__CMAKE_CROSSCOMPILING_OVERRIDE)
12+
set(CMAKE_CROSSCOMPILING ${__CMAKE_CROSSCOMPILING})
13+
endif()
14+
515
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build/private/local_config.cmake)
616
include(${CMAKE_CURRENT_SOURCE_DIR}/build/private/local_config.cmake)
717
endif()
@@ -20,7 +30,7 @@ mxnet_option(USE_F16C "Build with x86 F16C instruction support" ON)
2030
mxnet_option(USE_LAPACK "Build with lapack support" ON)
2131
mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON)
2232
mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE))
23-
mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_SYSTEM_PROCESSOR MATCHES x86_64))
33+
mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") AND (NOT CMAKE_CROSSCOMPILING))
2434
mxnet_option(USE_OPERATOR_TUNING "Enable auto-tuning of operators" ON IF NOT MSVC)
2535
mxnet_option(USE_GPERFTOOLS "Build with GPerfTools support (if found)" ON)
2636
mxnet_option(USE_JEMALLOC "Build with Jemalloc support" ON)
@@ -41,6 +51,10 @@ mxnet_option(USE_TENSORRT "Enable infeference optimization with TensorRT
4151
mxnet_option(USE_ASAN "Enable Clang/GCC ASAN sanitizers." OFF)
4252
mxnet_option(ENABLE_TESTCOVERAGE "Enable compilation with test coverage metric output" OFF)
4353

54+
message(STATUS "CMAKE_CROSSCOMPILING ${CMAKE_CROSSCOMPILING}")
55+
message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}")
56+
message(STATUS "CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}")
57+
4458
message(STATUS "CMAKE_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}")
4559
if(USE_CUDA AND NOT USE_OLDCMAKECUDA)
4660
message(STATUS "CMake version '${CMAKE_VERSION}' using generator '${CMAKE_GENERATOR}'")

0 commit comments

Comments
 (0)