mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-28 20:11:22 +00:00
Enable USE_MKLML_FOR_BLAS (#387)
* Enable USE_MKLML_FOR_BLAS * add mklml include directory for onnxruntime_provider and onnxruntime_provider_cuda * add mklml_include_dir to include_directories
This commit is contained in:
parent
db0fde9add
commit
7b37dc6105
2 changed files with 3 additions and 4 deletions
|
|
@ -412,15 +412,14 @@ if (onnxruntime_USE_MKLDNN OR onnxruntime_USE_MKLML)
|
|||
endif()
|
||||
|
||||
if (onnxruntime_USE_MKLML)
|
||||
add_definitions(-DUSE_MKLML=1)
|
||||
# USE_MKML_FOR_BLAS may cause numerical differences in tests so disable by default
|
||||
#add_definitions(-DUSE_MKLML_FOR_BLAS=1)
|
||||
add_definitions(-DUSE_MKLML=1 -DUSE_MKLML_FOR_BLAS=1)
|
||||
if (WIN32 OR APPLE)
|
||||
list(APPEND onnxruntime_EXTERNAL_LIBRARIES mklml)
|
||||
else()
|
||||
list(APPEND onnxruntime_EXTERNAL_LIBRARIES mklml_intel)
|
||||
endif()
|
||||
list(APPEND onnxruntime_EXTERNAL_DEPENDENCIES project_mklml)
|
||||
include_directories(${MKLML_INCLUDE_DIR})
|
||||
link_directories(${MKLML_LIB_DIR})
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if (onnxruntime_USE_MKLDNN)
|
|||
onnxruntime_add_include_to_target(onnxruntime_providers_mkldnn gsl onnxruntime_common onnxruntime_framework gsl onnx onnx_proto protobuf::libprotobuf)
|
||||
add_dependencies(onnxruntime_providers_mkldnn eigen ${onnxruntime_EXTERNAL_DEPENDENCIES})
|
||||
set_target_properties(onnxruntime_providers_mkldnn PROPERTIES FOLDER "ONNXRuntime")
|
||||
target_include_directories(onnxruntime_providers_mkldnn PRIVATE ${ONNXRUNTIME_ROOT} ${eigen_INCLUDE_DIRS} ${MKLDNN_INCLUDE_DIR} ${MKLML_INCLUDE_DIR})
|
||||
target_include_directories(onnxruntime_providers_mkldnn PRIVATE ${ONNXRUNTIME_ROOT} ${eigen_INCLUDE_DIRS} ${MKLDNN_INCLUDE_DIR})
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/providers/mkldnn DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core/providers)
|
||||
set_target_properties(onnxruntime_providers_mkldnn PROPERTIES LINKER_LANGUAGE CXX)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in a new issue