2018-11-20 00:48:22 +00:00
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
# Licensed under the MIT License.
|
|
|
|
|
|
|
|
|
|
include(pybind11)
|
|
|
|
|
FIND_PACKAGE(NumPy)
|
|
|
|
|
|
|
|
|
|
if(NOT PYTHON_INCLUDE_DIR)
|
|
|
|
|
set(PYTHON_NOT_FOUND false)
|
|
|
|
|
exec_program("${PYTHON_EXECUTABLE}"
|
|
|
|
|
ARGS "-c \"import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())\""
|
|
|
|
|
OUTPUT_VARIABLE PYTHON_INCLUDE_DIR
|
|
|
|
|
RETURN_VALUE PYTHON_NOT_FOUND)
|
|
|
|
|
if(${PYTHON_NOT_FOUND})
|
|
|
|
|
message(FATAL_ERROR
|
|
|
|
|
"Cannot get Python include directory. Is distutils installed?")
|
|
|
|
|
endif(${PYTHON_NOT_FOUND})
|
|
|
|
|
endif(NOT PYTHON_INCLUDE_DIR)
|
|
|
|
|
|
|
|
|
|
# 2. Resolve the installed version of NumPy (for numpy/arrayobject.h).
|
|
|
|
|
if(NOT NUMPY_INCLUDE_DIR)
|
|
|
|
|
set(NUMPY_NOT_FOUND false)
|
|
|
|
|
exec_program("${PYTHON_EXECUTABLE}"
|
|
|
|
|
ARGS "-c \"import numpy; print(numpy.get_include())\""
|
|
|
|
|
OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
|
|
|
|
|
RETURN_VALUE NUMPY_NOT_FOUND)
|
|
|
|
|
if(${NUMPY_NOT_FOUND})
|
|
|
|
|
message(FATAL_ERROR
|
|
|
|
|
"Cannot get NumPy include directory: Is NumPy installed?")
|
|
|
|
|
endif(${NUMPY_NOT_FOUND})
|
|
|
|
|
endif(NOT NUMPY_INCLUDE_DIR)
|
|
|
|
|
|
2019-03-27 04:58:01 +00:00
|
|
|
|
2018-11-20 00:48:22 +00:00
|
|
|
# ---[ Python + Numpy
|
|
|
|
|
set(onnxruntime_pybind_srcs_pattern
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/*.cc"
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/*.h"
|
|
|
|
|
)
|
|
|
|
|
|
2020-03-20 03:59:41 +00:00
|
|
|
if (onnxruntime_ENABLE_TRAINING)
|
|
|
|
|
list(APPEND onnxruntime_pybind_srcs_pattern
|
|
|
|
|
"${ORTTRAINING_ROOT}/orttraining/python/*.cc"
|
|
|
|
|
"${ORTTRAINING_ROOT}/orttraining/python/*.h"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2019-04-29 19:58:20 +00:00
|
|
|
file(GLOB onnxruntime_pybind_srcs CONFIGURE_DEPENDS
|
|
|
|
|
${onnxruntime_pybind_srcs_pattern}
|
|
|
|
|
)
|
2018-11-20 00:48:22 +00:00
|
|
|
|
|
|
|
|
add_library(onnxruntime_pybind11_state MODULE ${onnxruntime_pybind_srcs})
|
2020-02-04 03:33:14 +00:00
|
|
|
if(MSVC)
|
|
|
|
|
target_compile_options(onnxruntime_pybind11_state PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--compiler-options /utf-8>" "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:/utf-8>")
|
|
|
|
|
endif()
|
2018-11-20 00:48:22 +00:00
|
|
|
if(HAS_CAST_FUNCTION_TYPE)
|
2019-01-07 21:15:24 +00:00
|
|
|
target_compile_options(onnxruntime_pybind11_state PRIVATE "-Wno-cast-function-type")
|
2018-11-20 00:48:22 +00:00
|
|
|
endif()
|
2019-03-27 04:58:01 +00:00
|
|
|
|
|
|
|
|
if(onnxruntime_PYBIND_EXPORT_OPSCHEMA)
|
|
|
|
|
target_compile_definitions(onnxruntime_pybind11_state PRIVATE onnxruntime_PYBIND_EXPORT_OPSCHEMA)
|
2019-04-19 06:00:27 +00:00
|
|
|
endif()
|
2019-03-27 04:58:01 +00:00
|
|
|
|
2019-12-03 15:34:23 +00:00
|
|
|
if (onnxruntime_USE_DNNL)
|
|
|
|
|
target_compile_definitions(onnxruntime_pybind11_state PRIVATE USE_DNNL=1)
|
2019-03-28 18:50:16 +00:00
|
|
|
endif()
|
2020-01-22 23:59:11 +00:00
|
|
|
if (MSVC AND NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
|
#TODO: fix the warnings
|
|
|
|
|
target_compile_options(onnxruntime_pybind11_state PRIVATE "/wd4244")
|
|
|
|
|
endif()
|
2020-02-04 03:33:14 +00:00
|
|
|
target_include_directories(onnxruntime_pybind11_state PRIVATE ${ONNXRUNTIME_ROOT} ${PYTHON_INCLUDE_DIR} ${NUMPY_INCLUDE_DIR} ${pybind11_INCLUDE_DIRS})
|
2020-07-21 14:28:13 +00:00
|
|
|
if(onnxruntime_USE_CUDA)
|
|
|
|
|
target_include_directories(onnxruntime_pybind11_state PRIVATE ${onnxruntime_CUDNN_HOME}/include)
|
|
|
|
|
endif()
|
2020-03-11 21:25:37 +00:00
|
|
|
if (onnxruntime_ENABLE_TRAINING)
|
|
|
|
|
target_include_directories(onnxruntime_pybind11_state PRIVATE ${ORTTRAINING_ROOT})
|
|
|
|
|
endif()
|
2020-02-04 03:33:14 +00:00
|
|
|
|
2018-11-20 00:48:22 +00:00
|
|
|
if(APPLE)
|
|
|
|
|
set(ONNXRUNTIME_SO_LINK_FLAG "-Xlinker -exported_symbols_list ${ONNXRUNTIME_ROOT}/python/exported_symbols.lst")
|
|
|
|
|
elseif(UNIX)
|
2019-06-27 22:45:06 +00:00
|
|
|
set(ONNXRUNTIME_SO_LINK_FLAG "-Xlinker --version-script=${ONNXRUNTIME_ROOT}/python/version_script.lds -Xlinker --gc-sections")
|
2019-02-01 08:19:41 +00:00
|
|
|
else()
|
|
|
|
|
set(ONNXRUNTIME_SO_LINK_FLAG "-DEF:${ONNXRUNTIME_ROOT}/python/pybind.def")
|
2018-11-20 00:48:22 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set(onnxruntime_pybind11_state_libs
|
|
|
|
|
onnxruntime_session
|
|
|
|
|
${onnxruntime_libs}
|
|
|
|
|
${PROVIDERS_CUDA}
|
2019-12-03 15:34:23 +00:00
|
|
|
${PROVIDERS_DNNL}
|
2019-03-14 19:00:39 +00:00
|
|
|
${PROVIDERS_TENSORRT}
|
2020-05-26 20:24:59 +00:00
|
|
|
${PROVIDERS_MIGRAPHX}
|
2019-04-21 00:02:35 +00:00
|
|
|
${PROVIDERS_NGRAPH}
|
2019-06-18 15:58:53 +00:00
|
|
|
${PROVIDERS_OPENVINO}
|
2019-09-02 06:01:47 +00:00
|
|
|
${PROVIDERS_NUPHAR}
|
2020-05-19 12:32:32 +00:00
|
|
|
${PROVIDERS_VITISAI}
|
2019-07-02 13:03:29 +00:00
|
|
|
${PROVIDERS_NNAPI}
|
Initial PR for RKNPU execution provider (#3609)
* Initial RKNPU execution provider
* Init
* Support Ops:
Conv, Relu, Clip, LeakyRelu,
MaxPool, AveragePool, GlobalAveragePool,
Concat, Softmax, BatchNormalization, Gemm,
Add, Mul, Sub,
Reshape, Squeeze, Unsqueeze,
Flatten, Transpose,
QLinearConv, DequantizeLinear
* Add rknpu unittest
* Update BUILD.md and Add RKNPU-ExecutionProvider.md
* misc code update
* fix CLIP accuracy issue.
* fix "Error: Duplicate definition of name".
* move rknpu_ddk out of onnxruntime submodule.
* remove temporary code.
* add rknpu namespace.
* update misc of node_attr_helper
* add const & comment for onnx_converter
* add const & comment for shaper
* unify variable name
Co-authored-by: dkm <dkm@rock-chips.com>
Co-authored-by: George Wu <jywu@microsoft.com>
2020-05-06 03:36:47 +00:00
|
|
|
${PROVIDERS_RKNPU}
|
2019-10-15 13:13:07 +00:00
|
|
|
${PROVIDERS_DML}
|
2020-06-18 14:54:14 +00:00
|
|
|
${PROVIDERS_ACL}
|
|
|
|
|
${PROVIDERS_ARMNN}
|
2019-02-04 23:45:12 +00:00
|
|
|
onnxruntime_optimizer
|
2018-11-20 00:48:22 +00:00
|
|
|
onnxruntime_providers
|
2019-01-07 21:15:24 +00:00
|
|
|
onnxruntime_util
|
|
|
|
|
${onnxruntime_tvm_libs}
|
2018-11-20 00:48:22 +00:00
|
|
|
onnxruntime_framework
|
|
|
|
|
onnxruntime_util
|
|
|
|
|
onnxruntime_graph
|
|
|
|
|
onnxruntime_common
|
|
|
|
|
onnxruntime_mlas
|
2020-02-04 03:33:14 +00:00
|
|
|
${pybind11_lib}
|
2018-11-20 00:48:22 +00:00
|
|
|
)
|
|
|
|
|
|
2019-06-17 18:15:44 +00:00
|
|
|
if (onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS)
|
|
|
|
|
list(APPEND onnxruntime_pybind11_state_libs onnxruntime_language_interop onnxruntime_pyop)
|
|
|
|
|
endif()
|
|
|
|
|
|
2020-03-11 21:25:37 +00:00
|
|
|
if (onnxruntime_ENABLE_TRAINING)
|
|
|
|
|
list(INSERT onnxruntime_pybind11_state_libs 1 onnxruntime_training)
|
|
|
|
|
endif()
|
|
|
|
|
|
2018-11-20 00:48:22 +00:00
|
|
|
set(onnxruntime_pybind11_state_dependencies
|
|
|
|
|
${onnxruntime_EXTERNAL_DEPENDENCIES}
|
2020-02-04 03:33:14 +00:00
|
|
|
${pybind11_dep}
|
2018-11-20 00:48:22 +00:00
|
|
|
)
|
2020-02-04 03:33:14 +00:00
|
|
|
set_property(TARGET onnxruntime_pybind11_state APPEND_STRING PROPERTY LINK_FLAGS ${ONNXRUNTIME_SO_LINK_FLAG} ${onnxruntime_DELAYLOAD_FLAGS})
|
2018-11-20 00:48:22 +00:00
|
|
|
add_dependencies(onnxruntime_pybind11_state ${onnxruntime_pybind11_state_dependencies})
|
2019-10-08 19:02:45 +00:00
|
|
|
|
2018-11-20 00:48:22 +00:00
|
|
|
if (MSVC)
|
2020-02-04 03:33:14 +00:00
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES LINK_FLAGS "${ONNXRUNTIME_SO_LINK_FLAG}")
|
2018-11-20 00:48:22 +00:00
|
|
|
# if MSVC, pybind11 looks for release version of python lib (pybind11/detail/common.h undefs _DEBUG)
|
2019-04-04 21:51:09 +00:00
|
|
|
target_link_libraries(onnxruntime_pybind11_state ${onnxruntime_pybind11_state_libs}
|
2020-02-04 03:33:14 +00:00
|
|
|
${PYTHON_LIBRARY_RELEASE} ${onnxruntime_EXTERNAL_LIBRARIES})
|
2018-11-29 02:29:16 +00:00
|
|
|
elseif (APPLE)
|
2020-02-04 03:33:14 +00:00
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES LINK_FLAGS "${ONNXRUNTIME_SO_LINK_FLAG} -undefined dynamic_lookup")
|
|
|
|
|
target_link_libraries(onnxruntime_pybind11_state ${onnxruntime_pybind11_state_libs} ${onnxruntime_EXTERNAL_LIBRARIES})
|
2018-11-29 04:01:21 +00:00
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES
|
|
|
|
|
INSTALL_RPATH "@loader_path"
|
|
|
|
|
BUILD_WITH_INSTALL_RPATH TRUE
|
|
|
|
|
INSTALL_RPATH_USE_LINK_PATH FALSE)
|
2018-11-20 00:48:22 +00:00
|
|
|
else()
|
2020-02-19 20:18:47 +00:00
|
|
|
target_link_libraries(onnxruntime_pybind11_state PRIVATE ${onnxruntime_pybind11_state_libs} ${onnxruntime_EXTERNAL_LIBRARIES})
|
2020-02-04 03:33:14 +00:00
|
|
|
set_property(TARGET onnxruntime_pybind11_state APPEND_STRING PROPERTY LINK_FLAGS " -Xlinker -rpath=\$ORIGIN")
|
2018-11-20 00:48:22 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES PREFIX "")
|
|
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES FOLDER "ONNXRuntime")
|
2019-05-16 21:06:38 +00:00
|
|
|
if(onnxruntime_ENABLE_LTO)
|
|
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
|
|
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
|
|
|
|
|
endif()
|
2018-11-20 00:48:22 +00:00
|
|
|
if (MSVC)
|
|
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES SUFFIX ".pyd")
|
|
|
|
|
else()
|
|
|
|
|
set_target_properties(onnxruntime_pybind11_state PROPERTIES SUFFIX ".so")
|
|
|
|
|
endif()
|
|
|
|
|
|
2019-04-29 19:58:20 +00:00
|
|
|
file(GLOB onnxruntime_backend_srcs CONFIGURE_DEPENDS
|
2018-11-20 00:48:22 +00:00
|
|
|
"${ONNXRUNTIME_ROOT}/python/backend/*.py"
|
|
|
|
|
)
|
2020-03-20 03:59:41 +00:00
|
|
|
|
|
|
|
|
if (onnxruntime_ENABLE_TRAINING)
|
|
|
|
|
file(GLOB onnxruntime_python_srcs CONFIGURE_DEPENDS
|
2018-11-20 00:48:22 +00:00
|
|
|
"${ONNXRUNTIME_ROOT}/python/*.py"
|
2020-03-20 03:59:41 +00:00
|
|
|
"${ORTTRAINING_SOURCE_DIR}/python/*.py"
|
|
|
|
|
)
|
|
|
|
|
else()
|
|
|
|
|
file(GLOB onnxruntime_python_srcs CONFIGURE_DEPENDS
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/*.py"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (onnxruntime_ENABLE_TRAINING)
|
|
|
|
|
file(GLOB onnxruntime_python_capi_training_srcs CONFIGURE_DEPENDS
|
|
|
|
|
"${ORTTRAINING_SOURCE_DIR}/python/training/*.py"
|
|
|
|
|
)
|
Add new PytTrch front-end (#4815)
* Add ORTTrainerOptions class for the new pytorch frontend (#4382)
Add ORTTrainerOptions class and some placeholders
* Add _ORTTrainerModelDesc to perform validation for model description (#4416)
* Add Loss Scaler classes to the new frontend (#4306)
* Add TrainStepInfo used on the new frontend API (#4256)
* Add Optimizer classes to the new frontend (#4280)
* Add LRScheduler implementation (#4357)
* Add basic ORTTrainer API (#4435)
This PR presents the public API for ORTTrainer for the short term
development.
It also validates and saves input parameters, which will be used in the
next stages, such as building ONNX model, post processing the model and
configuring the training session
* Add opset_version into ORTTrainerOptions and change type of ORTTrainer.loss_fn (#4592)
* Update ModelDescription and minor fix on ORTTrainer ctor (#4605)
* Update ModelDescription and minor fix on ORTTrainer/ORTTrainerOptions
This PR keeps the public API intact, but changes how model description is stored on the backend
Currently, users creates a dict with two lists of tuples.
One list called 'inputs' and each tuple has the following format tuple(name, shape).
The second list is called 'outputs' and each tuple can be either tuple(name, shape) or tuple(name, shape, is_loss).
With this PR, when this dict is passed in to ORTTrainer, it is fully validated as usual.
However, tuples are internally replaced by namedtuples and all output tuples will have
tuple(name, shape, is_loss) format instead of is_loss being optionally present.
Additionally to that normalization in the internal representation (which eases coding),
two internal methods were created to replace a namedtuple(name, shape) to namedtuple(name, shape, dtype)
or namedtuple(name, shape, is_loss, dtype) dependeing whether the tuple is an input or output.
This is necessary as ORTTRainer finds out data types of each input/output during model export to onnx.
Finally, a minor fix was done on ORTTrainer. It could initialize ORTTrainerOptions incorrectly when options=None
* Rename input name for test
* Add ONNX Model Export to New Frontend (#4612)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Create training session + minor improvements (#4668)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Save ONNX model in file (#4671)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add eval step (#4674)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add train_step (#4677)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add LR Scheduler (#4694)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add deterministic compute tests (#4716)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add legacy vs experimental ORTTrainer accuracy comparison (#4727)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add Mixed precision/LossScaler + several fixes (#4739)
Additionally to the mixed precision/loss scaler code, this PR includes:
* Fix CUDA training
* Add optimization_step into TrainStepInfo class
* Refactor LRSCheduler to use optimization_step instead of step
* Updated several default values at ORTTrainerOptions
* Add initial Gradient Accumulation supported. Untested
* Fix ONNX model post processing
* Refactor unit tests
* Add ONNX BERT example + minor fixes (#4757)
* Fix training issue when passing ONNX file into ORTTrainer
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add Dynamic Shape support (#4758)
* Update DeepSpeed Zero Stage option to a separate option group (#4772)
* Add support to fetches (#4777)
* Add Gradient Accumulation Steps support (#4793)
* Fix Dynamic Axes feature and add unit test (#4795)
* Add frozen weights test (#4807)
* Move new pytorch front-end to 'experimental' namespace (#4814)
* Fix build
Co-authored-by: Rayan-Krishnan <rayankrishnan@live.com>
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-08-17 16:45:25 +00:00
|
|
|
file(GLOB onnxruntime_python_root_srcs CONFIGURE_DEPENDS
|
|
|
|
|
"${ORTTRAINING_SOURCE_DIR}/python/experimental/*.py"
|
|
|
|
|
)
|
|
|
|
|
file(GLOB onnxruntime_python_amp_srcs CONFIGURE_DEPENDS
|
|
|
|
|
"${ORTTRAINING_SOURCE_DIR}/python/experimental/amp/*.py"
|
|
|
|
|
)
|
|
|
|
|
file(GLOB onnxruntime_python_optim_srcs CONFIGURE_DEPENDS
|
|
|
|
|
"${ORTTRAINING_SOURCE_DIR}/python/experimental/optim/*.py"
|
|
|
|
|
)
|
2020-08-24 21:31:08 +00:00
|
|
|
file(GLOB onnxruntime_python_train_tools_srcs CONFIGURE_DEPENDS
|
|
|
|
|
"${REPO_ROOT}/tools/python/register_custom_ops_pytorch_exporter.py"
|
|
|
|
|
)
|
2020-03-20 03:59:41 +00:00
|
|
|
else()
|
|
|
|
|
file(GLOB onnxruntime_python_capi_training_srcs CONFIGURE_DEPENDS
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/training/*.py"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2019-04-29 19:58:20 +00:00
|
|
|
file(GLOB onnxruntime_python_test_srcs CONFIGURE_DEPENDS
|
2018-11-20 00:48:22 +00:00
|
|
|
"${ONNXRUNTIME_ROOT}/test/python/*.py"
|
2020-04-30 19:26:38 +00:00
|
|
|
"${ORTTRAINING_SOURCE_DIR}/test/python/*.py"
|
2018-11-20 00:48:22 +00:00
|
|
|
)
|
2019-04-29 19:58:20 +00:00
|
|
|
file(GLOB onnxruntime_python_tools_srcs CONFIGURE_DEPENDS
|
2018-11-20 00:48:22 +00:00
|
|
|
"${ONNXRUNTIME_ROOT}/python/tools/*.py"
|
|
|
|
|
)
|
2020-02-07 19:38:42 +00:00
|
|
|
file(GLOB onnxruntime_python_tools_featurizers_src CONFIGURE_DEPENDS
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/tools/featurizer_ops/*.py"
|
|
|
|
|
)
|
2020-07-09 04:42:53 +00:00
|
|
|
file(GLOB onnxruntime_python_quantization_src CONFIGURE_DEPENDS
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/tools/quantization/*.py"
|
|
|
|
|
)
|
|
|
|
|
list(REMOVE_ITEM onnxruntime_python_quantization_src
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/tools/quantization/test_calibrate.py")
|
2019-04-29 19:58:20 +00:00
|
|
|
file(GLOB onnxruntime_python_datasets_srcs CONFIGURE_DEPENDS
|
2018-11-20 00:48:22 +00:00
|
|
|
"${ONNXRUNTIME_ROOT}/python/datasets/*.py"
|
|
|
|
|
)
|
2019-04-29 19:58:20 +00:00
|
|
|
file(GLOB onnxruntime_python_datasets_data CONFIGURE_DEPENDS
|
2018-11-20 00:48:22 +00:00
|
|
|
"${ONNXRUNTIME_ROOT}/python/datasets/*.pb"
|
|
|
|
|
"${ONNXRUNTIME_ROOT}/python/datasets/*.onnx"
|
|
|
|
|
)
|
|
|
|
|
|
2020-02-04 03:33:14 +00:00
|
|
|
set(test_data_target onnxruntime_test_all)
|
2018-11-20 00:48:22 +00:00
|
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/backend
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi
|
2020-03-20 03:59:41 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/training
|
2018-11-20 00:48:22 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/datasets
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/tools
|
2020-02-07 19:38:42 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/tools/featurizer_ops
|
2020-07-09 04:42:53 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/quantization
|
2018-11-20 00:48:22 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${ONNXRUNTIME_ROOT}/__init__.py
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${REPO_ROOT}/ThirdPartyNotices.txt
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/
|
2019-10-20 14:58:36 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${REPO_ROOT}/docs/Privacy.md
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/
|
2018-11-20 00:48:22 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${REPO_ROOT}/LICENSE
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_test_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_backend_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/backend/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
2020-03-20 03:59:41 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_capi_training_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/training/
|
2018-11-20 00:48:22 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
$<TARGET_FILE:onnxruntime_pybind11_state>
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_datasets_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/datasets/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_datasets_data}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/datasets/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_tools_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/tools/
|
2020-02-07 19:38:42 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_tools_featurizers_src}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/tools/featurizer_ops/
|
2020-07-09 04:42:53 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_quantization_src}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/quantization/
|
2019-03-22 18:18:23 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${REPO_ROOT}/VERSION_NUMBER
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>
|
2018-11-20 00:48:22 +00:00
|
|
|
)
|
|
|
|
|
|
Add new PytTrch front-end (#4815)
* Add ORTTrainerOptions class for the new pytorch frontend (#4382)
Add ORTTrainerOptions class and some placeholders
* Add _ORTTrainerModelDesc to perform validation for model description (#4416)
* Add Loss Scaler classes to the new frontend (#4306)
* Add TrainStepInfo used on the new frontend API (#4256)
* Add Optimizer classes to the new frontend (#4280)
* Add LRScheduler implementation (#4357)
* Add basic ORTTrainer API (#4435)
This PR presents the public API for ORTTrainer for the short term
development.
It also validates and saves input parameters, which will be used in the
next stages, such as building ONNX model, post processing the model and
configuring the training session
* Add opset_version into ORTTrainerOptions and change type of ORTTrainer.loss_fn (#4592)
* Update ModelDescription and minor fix on ORTTrainer ctor (#4605)
* Update ModelDescription and minor fix on ORTTrainer/ORTTrainerOptions
This PR keeps the public API intact, but changes how model description is stored on the backend
Currently, users creates a dict with two lists of tuples.
One list called 'inputs' and each tuple has the following format tuple(name, shape).
The second list is called 'outputs' and each tuple can be either tuple(name, shape) or tuple(name, shape, is_loss).
With this PR, when this dict is passed in to ORTTrainer, it is fully validated as usual.
However, tuples are internally replaced by namedtuples and all output tuples will have
tuple(name, shape, is_loss) format instead of is_loss being optionally present.
Additionally to that normalization in the internal representation (which eases coding),
two internal methods were created to replace a namedtuple(name, shape) to namedtuple(name, shape, dtype)
or namedtuple(name, shape, is_loss, dtype) dependeing whether the tuple is an input or output.
This is necessary as ORTTRainer finds out data types of each input/output during model export to onnx.
Finally, a minor fix was done on ORTTrainer. It could initialize ORTTrainerOptions incorrectly when options=None
* Rename input name for test
* Add ONNX Model Export to New Frontend (#4612)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Create training session + minor improvements (#4668)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Save ONNX model in file (#4671)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add eval step (#4674)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add train_step (#4677)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add LR Scheduler (#4694)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add deterministic compute tests (#4716)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add legacy vs experimental ORTTrainer accuracy comparison (#4727)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add Mixed precision/LossScaler + several fixes (#4739)
Additionally to the mixed precision/loss scaler code, this PR includes:
* Fix CUDA training
* Add optimization_step into TrainStepInfo class
* Refactor LRSCheduler to use optimization_step instead of step
* Updated several default values at ORTTrainerOptions
* Add initial Gradient Accumulation supported. Untested
* Fix ONNX model post processing
* Refactor unit tests
* Add ONNX BERT example + minor fixes (#4757)
* Fix training issue when passing ONNX file into ORTTrainer
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add Dynamic Shape support (#4758)
* Update DeepSpeed Zero Stage option to a separate option group (#4772)
* Add support to fetches (#4777)
* Add Gradient Accumulation Steps support (#4793)
* Fix Dynamic Axes feature and add unit test (#4795)
* Add frozen weights test (#4807)
* Move new pytorch front-end to 'experimental' namespace (#4814)
* Fix build
Co-authored-by: Rayan-Krishnan <rayankrishnan@live.com>
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-08-17 16:45:25 +00:00
|
|
|
if (onnxruntime_ENABLE_TRAINING)
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/experimental
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/experimental/amp
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/experimental/optim
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_root_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/experimental/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_amp_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/experimental/amp/
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_optim_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/experimental/optim/
|
2020-08-24 21:31:08 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${onnxruntime_python_train_tools_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/experimental/
|
Add new PytTrch front-end (#4815)
* Add ORTTrainerOptions class for the new pytorch frontend (#4382)
Add ORTTrainerOptions class and some placeholders
* Add _ORTTrainerModelDesc to perform validation for model description (#4416)
* Add Loss Scaler classes to the new frontend (#4306)
* Add TrainStepInfo used on the new frontend API (#4256)
* Add Optimizer classes to the new frontend (#4280)
* Add LRScheduler implementation (#4357)
* Add basic ORTTrainer API (#4435)
This PR presents the public API for ORTTrainer for the short term
development.
It also validates and saves input parameters, which will be used in the
next stages, such as building ONNX model, post processing the model and
configuring the training session
* Add opset_version into ORTTrainerOptions and change type of ORTTrainer.loss_fn (#4592)
* Update ModelDescription and minor fix on ORTTrainer ctor (#4605)
* Update ModelDescription and minor fix on ORTTrainer/ORTTrainerOptions
This PR keeps the public API intact, but changes how model description is stored on the backend
Currently, users creates a dict with two lists of tuples.
One list called 'inputs' and each tuple has the following format tuple(name, shape).
The second list is called 'outputs' and each tuple can be either tuple(name, shape) or tuple(name, shape, is_loss).
With this PR, when this dict is passed in to ORTTrainer, it is fully validated as usual.
However, tuples are internally replaced by namedtuples and all output tuples will have
tuple(name, shape, is_loss) format instead of is_loss being optionally present.
Additionally to that normalization in the internal representation (which eases coding),
two internal methods were created to replace a namedtuple(name, shape) to namedtuple(name, shape, dtype)
or namedtuple(name, shape, is_loss, dtype) dependeing whether the tuple is an input or output.
This is necessary as ORTTRainer finds out data types of each input/output during model export to onnx.
Finally, a minor fix was done on ORTTrainer. It could initialize ORTTrainerOptions incorrectly when options=None
* Rename input name for test
* Add ONNX Model Export to New Frontend (#4612)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Create training session + minor improvements (#4668)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Save ONNX model in file (#4671)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add eval step (#4674)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add train_step (#4677)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add LR Scheduler (#4694)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add deterministic compute tests (#4716)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add legacy vs experimental ORTTrainer accuracy comparison (#4727)
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
* Add Mixed precision/LossScaler + several fixes (#4739)
Additionally to the mixed precision/loss scaler code, this PR includes:
* Fix CUDA training
* Add optimization_step into TrainStepInfo class
* Refactor LRSCheduler to use optimization_step instead of step
* Updated several default values at ORTTrainerOptions
* Add initial Gradient Accumulation supported. Untested
* Fix ONNX model post processing
* Refactor unit tests
* Add ONNX BERT example + minor fixes (#4757)
* Fix training issue when passing ONNX file into ORTTrainer
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
* Add Dynamic Shape support (#4758)
* Update DeepSpeed Zero Stage option to a separate option group (#4772)
* Add support to fetches (#4777)
* Add Gradient Accumulation Steps support (#4793)
* Fix Dynamic Axes feature and add unit test (#4795)
* Add frozen weights test (#4807)
* Move new pytorch front-end to 'experimental' namespace (#4814)
* Fix build
Co-authored-by: Rayan-Krishnan <rayankrishnan@live.com>
Co-authored-by: Rayan Krishnan <t-rakr@OrtDevTest2v100.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
2020-08-17 16:45:25 +00:00
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2019-12-03 15:34:23 +00:00
|
|
|
if (onnxruntime_USE_DNNL)
|
2018-11-20 00:48:22 +00:00
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
2020-05-09 00:11:29 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${DNNL_DLL_PATH} $<TARGET_FILE:onnxruntime_providers_dnnl>
|
2020-08-11 04:17:16 +00:00
|
|
|
$<TARGET_FILE:onnxruntime_providers_shared>
|
2018-11-20 00:48:22 +00:00
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
|
|
|
|
)
|
|
|
|
|
endif()
|
2019-04-21 00:02:35 +00:00
|
|
|
|
2020-08-13 22:24:44 +00:00
|
|
|
if (onnxruntime_USE_TENSORRT)
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${DNNL_DLL_PATH} $<TARGET_FILE:onnxruntime_providers_tensorrt>
|
|
|
|
|
$<TARGET_FILE:onnxruntime_providers_shared>
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2019-04-21 00:02:35 +00:00
|
|
|
if (onnxruntime_USE_NGRAPH)
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_SHARED_LIB}
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_CODEGEN_SHARED_LIB}
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_CPU_BACKEND_SHARED_LIB}
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_IOMP5MD_SHARED_LIB}
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_MKLDNN_SHARED_LIB}
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_MKLML_SHARED_LIB}
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_TBB_SHARED_LIB}
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_TBB_SHARED_LIB_2}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2020-04-24 11:06:02 +00:00
|
|
|
|
2019-11-06 03:55:46 +00:00
|
|
|
if (onnxruntime_USE_OPENVINO)
|
2020-04-24 11:06:02 +00:00
|
|
|
if(NOT WIN32)
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
${ngraph_LIBRARIES}/${NGRAPH_SHARED_LIB}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
|
|
|
|
)
|
|
|
|
|
endif()
|
2019-11-06 03:55:46 +00:00
|
|
|
endif()
|
|
|
|
|
|
2018-11-20 00:48:22 +00:00
|
|
|
if (onnxruntime_USE_TVM)
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
|
$<TARGET_FILE:tvm> $<TARGET_FILE:nnvm_compiler>
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (onnxruntime_USE_MKLML)
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
2018-12-17 22:41:42 +00:00
|
|
|
${MKLML_LIB_DIR}/${MKLML_SHARED_LIB} ${MKLML_LIB_DIR}/${IOMP5MD_SHARED_LIB}
|
2018-11-20 00:48:22 +00:00
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/capi/
|
|
|
|
|
)
|
|
|
|
|
endif()
|
2019-09-02 06:01:47 +00:00
|
|
|
|
|
|
|
|
if (onnxruntime_USE_NUPHAR)
|
2019-09-30 17:39:02 +00:00
|
|
|
file(GLOB onnxruntime_python_nuphar_python_srcs CONFIGURE_DEPENDS
|
2019-12-15 06:46:30 +00:00
|
|
|
"${ONNXRUNTIME_ROOT}/core/providers/nuphar/scripts/*"
|
2019-09-02 06:01:47 +00:00
|
|
|
)
|
|
|
|
|
add_custom_command(
|
|
|
|
|
TARGET onnxruntime_pybind11_state POST_BUILD
|
2019-09-30 17:39:02 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/nuphar
|
2019-09-02 06:01:47 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
2019-09-30 17:39:02 +00:00
|
|
|
${onnxruntime_python_nuphar_python_srcs}
|
|
|
|
|
$<TARGET_FILE_DIR:${test_data_target}>/onnxruntime/nuphar/
|
2019-09-02 06:01:47 +00:00
|
|
|
)
|
2019-10-08 19:02:45 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS)
|
2020-03-11 21:25:37 +00:00
|
|
|
include(onnxruntime_language_interop_ops.cmake)
|
2019-10-08 19:02:45 +00:00
|
|
|
endif()
|