onnxruntime/cmake/onnxruntime_interop_torch.cmake
pengwa cb5f411da3
Fix Python Packaging Pipeline && Build Clean Up (#7993)
* remove link to python

* revert orttraining-linux-ci build env change introduced by pr
https://github.com/microsoft/onnxruntime/pull/7993.

* fix builds

* fix builds

* clean up

* fix builds

* Fix unused params

* fix some comments.
2021-06-09 17:35:17 +08:00

16 lines
1 KiB
CMake

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Python dependent files for torch interop
file(GLOB onnxruntime_interop_torch_srcs
"${ORTTRAINING_SOURCE_DIR}/core/training_ops/cpu/torch/*.h"
"${ORTTRAINING_SOURCE_DIR}/core/training_ops/cpu/torch/*.cc"
"${ONNXRUNTIME_ROOT}/core/language_interop_ops/torch/*.h"
"${ONNXRUNTIME_ROOT}/core/language_interop_ops/torch/*.cc"
)
onnxruntime_add_static_library(onnxruntime_interop_torch ${onnxruntime_interop_torch_srcs})
add_dependencies(onnxruntime_interop_torch onnx ${onnxruntime_EXTERNAL_DEPENDENCIES})
onnxruntime_add_include_to_target(onnxruntime_interop_torch onnxruntime_common onnx onnx_proto ${PROTOBUF_LIB} flatbuffers Python::Module)
target_include_directories(onnxruntime_interop_torch PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} ${ORTTRAINING_ROOT} PUBLIC ${onnxruntime_graph_header} ${DLPACK_INCLUDE_DIR})
target_link_libraries(onnxruntime_interop_torch PRIVATE onnxruntime_python_interface)