mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
* Initial release of Vitis-AI Execution Provider * Add documentation, fix for onnxruntime::Model changes and use stringstream instead of file dump for model passing * - Add Vitis-AI docker file - Add online quantization flow Vitis-AI execution provider - Fix remarks * - Add fatal error build message for Vitis-AI cmake build on Windows - Fix pep8 issue in build.py - Add Vitis-AI execution provider example in docs Co-authored-by: Elliott Delaye <elliott@xilinx.com> Co-authored-by: Jorn Tuyls <jornt@xilinx.com> Co-authored-by: Jorn Tuyls <jtuyls@users.noreply.github.com>
28 lines
978 B
CMake
28 lines
978 B
CMake
# Copyright(C) Xilinx Inc.
|
|
# Licensed under the MIT License
|
|
|
|
set(PYXIR_SHARED_LIB libpyxir.so)
|
|
|
|
if(PYTHONINTERP_FOUND)
|
|
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
|
"import pyxir as px; print(px.get_include_dir()); print(px.get_lib_dir());"
|
|
RESULT_VARIABLE __result
|
|
OUTPUT_VARIABLE __output
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
if(__result MATCHES 0)
|
|
string(REGEX REPLACE ";" "\\\\;" __values ${__output})
|
|
string(REGEX REPLACE "\r?\n" ";" __values ${__values})
|
|
list(GET __values 0 PYXIR_INCLUDE_DIR)
|
|
list(GET __values 1 PYXIR_LIB_DIR)
|
|
endif()
|
|
else()
|
|
message(STATUS "To find Pyxir, Python interpretater is required to be found.")
|
|
endif()
|
|
|
|
add_library(pyxir SHARED IMPORTED)
|
|
message("-- Found Pyxir lib: ${PYXIR_LIB_DIR}/${PYXIR_SHARED_LIB}")
|
|
set_property(TARGET pyxir PROPERTY IMPORTED_LOCATION ${PYXIR_LIB_DIR}/${PYXIR_SHARED_LIB})
|
|
|
|
message("-- Found Pyxir include: ${PYXIR_INCLUDE_DIR}")
|
|
include_directories(${PYXIR_INCLUDE_DIR})
|