Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BYOC][CONTRIB] Vitis-AI codegen integration #6343

Merged
merged 28 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8903b1a
[BYOC][CONTRIB] VITIS-AI integration
Jul 21, 2020
5eebecb
Remove environment related files
Sep 1, 2020
9dce161
Update vitis_ai.rst
anilmartha Sep 1, 2020
fb18b17
Add review changes
Sep 3, 2020
0b57227
Remove new lines and note frame in vitis_ai.rst
Sep 7, 2020
969faf6
use sys.exit
Sep 7, 2020
680f373
Add condition for vitis_ai runtime exec function
Sep 8, 2020
20015ae
remove unused graph_json
Sep 8, 2020
fb9d3f2
correct indentation
Sep 8, 2020
4352c7b
use code python instead of bash
Sep 8, 2020
3c45378
Rename VITISAI.cmake to VitisAI.cmake
Sep 9, 2020
dea81b5
use relay.ext.vitis_ai.options.build_dir in comparison
Sep 9, 2020
832fae0
Re-add deleted docker related files
Sep 11, 2020
48d17c6
Merge branch 'master' into vitis-ai-integration-merge-master
Sep 11, 2020
cc0d0f5
Merge branch 'master' into vitis-ai-integration-merge-master
jornt-xilinx Sep 18, 2020
2a845fd
Make use of PyXIR XGraph and RuntimeModule serialization & refactor flow
jornt-xilinx Sep 21, 2020
f022b41
Fix linter errors
jornt-xilinx Sep 25, 2020
287f285
Fix linter errors
Sep 28, 2020
dcdcf5c
Address sphinx warnings
jornt-xilinx Sep 28, 2020
dd07779
Merge branch 'main' into vitis-ai-integration
Oct 14, 2020
f615cda
Merge branch 'main' into vitis-ai-integration
anilmartha Oct 20, 2020
128115e
Add infertype to fix Vitis-AI annotation test
Oct 20, 2020
97354a3
Merge branch 'main' into vitis-ai-integration
anilmartha Nov 2, 2020
07c84d9
Renaming util to utils
Nov 2, 2020
753322e
Add Vitis-AI flag to config.cmake file
Nov 3, 2020
bdf2bbd
Move vitis-ai config options to compiler sources instead of runtime s…
Nov 3, 2020
4cf8838
Fix clang-format errors
Nov 3, 2020
807816d
Merge branch 'main' into vitis-ai-integration
Nov 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ tvm_option(USE_COREML "Build with coreml support" OFF)
tvm_option(USE_TARGET_ONNX "Build with ONNX Codegen support" OFF)
tvm_option(USE_ARM_COMPUTE_LIB "Build with Arm Compute Library" OFF)
tvm_option(USE_ARM_COMPUTE_LIB_GRAPH_RUNTIME "Build with Arm Compute Library graph runtime" OFF)

tvm_option(USE_VITIS_AI "Build with VITIS-AI Codegen support" OFF)

# include directories
include_directories(${CMAKE_INCLUDE_PATH})
Expand Down Expand Up @@ -323,6 +323,7 @@ include(cmake/modules/contrib/TF_TVMDSOOP.cmake)
include(cmake/modules/contrib/CoreML.cmake)
include(cmake/modules/contrib/ONNX.cmake)
include(cmake/modules/contrib/ArmComputeLib.cmake)
include(cmake/modules/contrib/VITISAI.cmake)
include(cmake/modules/Git.cmake)
include(cmake/modules/LibInfo.cmake)

Expand Down
3 changes: 3 additions & 0 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ set(USE_ETHOSN OFF)
# otherwise use ETHOSN_HW (OFF) to use the software test infrastructure
set(USE_ETHOSN_HW OFF)

# Whether use VITIS-AI codegen
set(USE_VITIS_AI OFF)

# Build ANTLR parser for Relay text format
# Possible values:
# - ON: enable ANTLR by searching default locations (cmake find_program for antlr4 and /usr/local for jar)
Expand Down
49 changes: 49 additions & 0 deletions cmake/modules/contrib/VITISAI.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

if(USE_VITIS_AI)
set(PYXIR_SHARED_LIB libpyxir.so)
find_package(PythonInterp 3.6 REQUIRED)
comaniac marked this conversation as resolved.
Show resolved Hide resolved
if(NOT PYTHON)
find_program(PYTHON NAMES python3 python3.6)
endif()
if(PYTHON)
anilmartha marked this conversation as resolved.
Show resolved Hide resolved
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 interpreter is required to be found.")
anilmartha marked this conversation as resolved.
Show resolved Hide resolved
endif()

message(STATUS "Build with contrib.vitisai")
include_directories(${PYXIR_INCLUDE_DIR})
file(GLOB VAI_CONTRIB_SRC src/runtime/contrib/vitis_ai/*.cc)
link_directories(${PYXIR_LIB_DIR})
list(APPEND TVM_RUNTIME_LINKER_LIBS "pyxir")
list(APPEND RUNTIME_SRCS ${VAI_CONTRIB_SRC})
endif(USE_VITIS_AI)

113 changes: 0 additions & 113 deletions docker/bash.sh

This file was deleted.

40 changes: 0 additions & 40 deletions docker/install/ubuntu_install_python.sh

This file was deleted.

Loading