mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-27 20:02:15 +00:00
build mklml/ngraph without openmp (#1460)
cleanup the option to build mklml/ngraph without openmp
This commit is contained in:
parent
1f13a9f982
commit
6be93f11e5
4 changed files with 7 additions and 10 deletions
|
|
@ -85,12 +85,9 @@ set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests" FORCE)
|
|||
set(NSYNC_ENABLE_TESTS OFF CACHE BOOL "Build protobuf tests" FORCE)
|
||||
set(ONNX_ML 1)
|
||||
|
||||
if(onnxruntime_USE_OPENMP AND UNIX)
|
||||
#if you enabled both of them, the code can still be built and run, but you may see
|
||||
# 10x performance degradation, because one process should only have one openmp implementation
|
||||
# mkl(or mklml) depends on Intel OpenMP
|
||||
# GCC does not support linking against the Intel OpenMP runtime library
|
||||
# Clang should be ok, but it's not in our consideration right now.
|
||||
if(onnxruntime_USE_OPENMP)
|
||||
# MKLML and NGraph depend on their own OpenMP library that may be different with the compiler's.
|
||||
# Disable the options to build mklml/NGraph and OpenMP together.
|
||||
if(onnxruntime_USE_MKLML)
|
||||
message(FATAL_ERROR "Please use only one of onnxruntime_USE_MKLML, onnxruntime_USE_OPENMP")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ jobs:
|
|||
parameters:
|
||||
AgentPool : $(AgentPoolWin)
|
||||
JobName: 'Windows_CI_Dev'
|
||||
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --use_mklml --use_openmp --build_shared_lib --build_csharp --enable_onnx_tests --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum)'
|
||||
BuildCommand: '$(Build.SourcesDirectory)\tools\ci_build\build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --use_mklml --build_shared_lib --build_csharp --enable_onnx_tests --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum)'
|
||||
DoDebugBuild: 'false'
|
||||
DoNugetPack : 'true'
|
||||
DoCompliance: 'false'
|
||||
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
parameters:
|
||||
AgentPool : $(AgentPoolMacOS)
|
||||
JobName: 'MacOS_CI_Dev'
|
||||
BuildCommand: 'python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --build_shared_lib --use_mklml --use_openmp --enable_onnx_tests --config RelWithDebInfo'
|
||||
BuildCommand: 'python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --build_shared_lib --use_mklml --enable_onnx_tests --config RelWithDebInfo'
|
||||
DoNugetPack : 'true'
|
||||
NuPackScript: |
|
||||
set -e -x
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
displayName: 'Download test data and generate cmake config'
|
||||
inputs:
|
||||
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
|
||||
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug Release --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --use_mklml --use_openmp --build_shared_lib --build_csharp --enable_onnx_tests --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --update'
|
||||
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug Release --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --use_mklml --build_shared_lib --build_csharp --enable_onnx_tests --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --update'
|
||||
workingDirectory: "$(Build.BinariesDirectory)"
|
||||
|
||||
- task: VSBuild@1
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ jobs:
|
|||
displayName: 'Test Debug'
|
||||
inputs:
|
||||
filename: '$(Build.BinariesDirectory)\packages\python\python.exe'
|
||||
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_openmp --use_ngraph --use_full_protobuf --build_shared_lib --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --gen_doc --test'
|
||||
arguments: '$(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --cmake_path $(Build.BinariesDirectory)\cmake\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake\bin\ctest.exe --enable_pybind --use_ngraph --use_full_protobuf --build_shared_lib --test_data_url $(TestDataUrl) --test_data_checksum $(TestDataChecksum) --gen_doc --test'
|
||||
workingFolder: '$(Build.BinariesDirectory)'
|
||||
- task: VSBuild@1
|
||||
displayName: 'Build Release'
|
||||
|
|
|
|||
Loading…
Reference in a new issue