Closed matteosal closed 2 years ago
Could you describe how you run cmake ?
@anko-intel here is my invocation with all the flags:
cmake \
`# GENERAL FLAGS` \
-DCMAKE_INSTALL_PREFIX=$output_dir \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_BUILD_RPATH=On \
-DUSE_OPENCV=OFF \
-DUSE_JEMALLOC=OFF \
-DUSE_F16C=Off `# float16 support`\
-DUSE_INT64_TENSOR_SIZE=ON `# this + MKL_MULTI_THREADED=ON + MKL_USE_SINGLE_DYNAMIC_LIBRARY=OFF select MKL ILP64`\
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" `# prevent libgomp from linking` \
`# MATH BACKENDS` \
-DBLAS=MKL \
-DUSE_LAPACK=ON \
-DUSE_LAPACKE_INTERFACE=ON \
-DUSE_ONEDNN=ON \
-DBLA_STATIC=OFF \
-DMKL_MULTI_THREADED=ON \
-DMKL_USE_SINGLE_DYNAMIC_LIBRARY=OFF \
-DMKL_INCLUDE_DIR=$mkl_dir \
-DBLAS_LIBRARIES="$mkl_dir/libmkl_def.so;$mkl_dir/libmkl_intel_ilp64.so;$mkl_dir/libmkl_core.so;$mkl_dir/libmkl_intel_thread.so;$mkl_dir/libiomp5.so" \
`# OPENMP` \
-DUSE_OPENMP=ON \
-DOpenMP_C_FLAGS="-I$mkl_dir -fopenmp" \
-DOpenMP_C_LIB_NAMES="libiomp5" \
-DOpenMP_CXX_FLAGS="-I$mkl_dir -fopenmp" \
-DOpenMP_CXX_LIB_NAMES="libiomp5" \
-DOpenMP_libiomp5_LIBRARY="$mkl_dir/libiomp5.so" \
`# CUDA` \
-DUSE_CUDA=OFF \
$mxnet_dir
Building with oneDNN tries to install oneDNN headers in the root directory:
I see this on Linux, Mac and Windows. It might be due to the fact that
CMAKE_INSTALL_INCLUDEDIR
is an empty string in this command, although I don't have proof of this.Moreover, are these headers even needed for anything? I could link to the library just fine even without those headers