Skip to content

Commit 5f14d0a

Browse files
authored
Merge pull request xlite-dev#399 from DefTruth/linux-dev
Bump to 0.2.0+ort1.17.1+ocv4.9.0
2 parents 859b760 + 79d4224 commit 5f14d0a

File tree

814 files changed

+1586
-172171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

814 files changed

+1586
-172171
lines changed

.github/workflows/issue.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: issues
2+
on:
3+
schedule:
4+
- cron: "0 0 * * 0"
5+
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
steps:
13+
- uses: actions/stale@v9.0.0
14+
with:
15+
days-before-issue-stale: 30
16+
days-before-issue-close: 7
17+
stale-issue-label: "stale"
18+
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
19+
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
20+
days-before-pr-stale: -1
21+
days-before-pr-close: -1
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ build-debug.sh
77
__pycache__
88
scripts
99
prebuilt
10-
debug.txt
10+
debug.txt
11+
tmp
12+
third_party
13+
build/

CMakeLists.txt

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,83 @@
11
cmake_minimum_required(VERSION 3.10)
22
project(lite.ai.toolkit)
33

4-
set(CMAKE_CXX_STANDARD 11)
5-
set(VERSION_STRING 0.1.1)
6-
set(SOVERSION_STRING 0.1.1)
7-
include(cmake/platform.cmake) # checking platform
4+
set(CMAKE_CXX_STANDARD 17)
5+
set(VERSION_STRING 0.2.0)
6+
set(SOVERSION_STRING 0.2.0)
7+
include(cmake/utils.cmake)
88

9-
message(STATUS "Lite.AI.ToolKit ${VERSION_STRING}")
10-
message(STATUS "Project: lite.ai.toolkit")
11-
message(STATUS "Version: ${VERSION_STRING}")
12-
message(STATUS "SO Version: ${SOVERSION_STRING}")
13-
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
14-
message(STATUS "Platform Name: ${PLATFORM_NAME}")
15-
message(STATUS "Root Path: ${CMAKE_SOURCE_DIR}")
9+
if (NOT (UNIX AND NOT APPLE))
10+
message(FATAL_ERROR "lite.ai.toolkit>=0.2 not support for windows/mac now!")
11+
endif()
12+
13+
set(THIRD_PARTY_PATH "${CMAKE_SOURCE_DIR}/third_party")
14+
if(NOT EXISTS ${THIRD_PARTY_PATH})
15+
file(MAKE_DIRECTORY ${THIRD_PARTY_PATH})
16+
endif()
1617

1718
# Linux GCC Compiler Options
1819
if (CMAKE_COMPILER_IS_GNUCXX)
19-
set(CMAKE_CXX_FLAGS "-std=c++11 -Wno-deprecated ${CMAKE_CXX_FLAGS} ")
20-
message(STATUS "[Linux GCC Compiler Options]+:-std=c++11 -Wno-deprecated")
20+
set(CMAKE_CXX_FLAGS "-std=c++17 -Wno-deprecated ${CMAKE_CXX_FLAGS} ")
21+
message(STATUS "[Linux GCC Compiler Options]+:-std=c++17 -Wno-deprecated")
2122
endif ()
2223
# message(STATUS "CMAKE_CXX_COMPILER: [${CMAKE_CXX_COMPILER}]")
2324

2425
# root dir
2526
set(LITE_AI_ROOT_DIR ${CMAKE_SOURCE_DIR})
26-
# set default build dir for lite.ai.toolkit
27-
if (NOT DEFINED BUILD_LITE_AI_DIR)
28-
set(BUILD_LITE_AI_DIR ${LITE_AI_ROOT_DIR}/build/lite.ai.toolkit)
29-
endif ()
30-
set(LIBRARY_OUTPUT_PATH ${BUILD_LITE_AI_DIR}/lib)
31-
set(EXECUTABLE_OUTPUT_PATH ${BUILD_LITE_AI_DIR}/bin)
3227

3328
# compile options for lite.ai.toolkit
34-
option(LITE_AI_BUILD_LIB "build shared libraries." ON) # now, ON only
3529
option(LITE_AI_BUILD_TEST "build test examples." ON)
36-
option(INCLUDE_OPENCV "package OpenCV into lite.ai.toolkit." ON)
3730
# inference engines setups: config.h.in -> config.h
3831
option(ENABLE_DEBUG_STRING "enable DEBUG string or not" ON)
3932
option(ENABLE_ONNXRUNTIME "enable ONNXRuntime engine" ON)
40-
option(ENABLE_MNN "enable MNN engine" ON) # unstable now, DON'T use
41-
option(ENABLE_NCNN "enable NCNN engine" ON) # unstable now, DON'T use
42-
option(ENABLE_TNN "enable TNN engine" ON) # unstable now, DON'T use
33+
option(ENABLE_MNN "enable MNN engine" OFF) # unstable now, DON'T use
34+
option(ENABLE_NCNN "enable NCNN engine" OFF) # unstable now, DON'T use
35+
option(ENABLE_TNN "enable TNN engine" OFF) # unstable now, DON'T use
4336
# cuda provider setups: config.h.in -> config.h (only for onnxruntime)
4437
option(ENABLE_ONNXRUNTIME_CUDA "enable ONNXRuntime engine with CUDA provider" OFF)
45-
# openmp/opengl/vulkan/cuda setups: config.h.in -> config.h (for future use)
46-
option(ENABLE_LITE_OPENMP "enable OPENMP accelerate for some post processes" OFF) # for future use, DON'T use NOW!
47-
option(ENABLE_LITE_OPENGL "enable OPENGL accelerate for some post processes" OFF) # for future use, DON'T use NOW!
48-
option(ENABLE_LITE_VULKAN "enable VULKAN accelerate for some post processes" OFF) # for future use, DON'T use NOW!
49-
option(ENABLE_LITE_CUDA "enable CUDA accelerate for some post processes" OFF) # for future use, DON'T use NOW!
50-
# videoio interface setups, for future use
5138
option(ENABLE_OPENCV_VIDEOIO "enable opencv videoio modules for detect_video apis" ON) # now, ON only
52-
# inference engines backend setups for lite.ai.toolkit
53-
option(BACKEND_ONNXRUNTIME "set ONNXRuntime as the main backend of lite.ai.toolkit" ON)
54-
option(BACKEND_MNN "set MNN as the main backend of lite.ai.toolkit" OFF) # now, OFF only
55-
option(BACKEND_NCNN "set NCNN as the main backend of lite.ai.toolkit" OFF) # now, OFF only
56-
option(BACKEND_TNN "set TNN as the main backend of lite.ai.toolkit" OFF) # now, OFF only
5739

58-
message(STATUS "Engines Enable Details ... ")
59-
message(STATUS "INCLUDE_OPENCV: ${INCLUDE_OPENCV}")
60-
message(STATUS "ENABLE_ONNXRUNTIME: ${ENABLE_ONNXRUNTIME}")
61-
message(STATUS "ENABLE_MNN: ${ENABLE_MNN}")
62-
message(STATUS "ENABLE_NCNN: ${ENABLE_NCNN}")
63-
message(STATUS "ENABLE_TNN: ${ENABLE_TNN}")
40+
if (NOT ENABLE_ONNXRUNTIME)
41+
message(FATAL_ERROR "ENABLE_ONNXRUNTIME must be enbled now!")
42+
endif()
6443

6544
# setup include dir and lib dir
6645
include_directories(${LITE_AI_ROOT_DIR})
67-
link_directories(${LITE_AI_ROOT_DIR}/lib/${PLATFORM_NAME})
46+
configure_file(cmake/lite.ai.toolkit.cmake.in ${CMAKE_SOURCE_DIR}/cmake/lite.ai.toolkit.cmake @ONLY)
6847

6948
# include custom cmake files.
7049
include(cmake/opencv.cmake)
71-
include(cmake/command.cmake)
7250

73-
# configuration for lite.ai shared lib.
74-
if (LITE_AI_BUILD_LIB)
75-
include(cmake/lite.ai.toolkit.cmake)
76-
endif ()
51+
add_lite_ai_toolkit_shared_library(${VERSION_STRING} ${SOVERSION_STRING})
52+
install(TARGETS lite.ai.toolkit LIBRARY DESTINATION lib)
53+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/lite
54+
DESTINATION ${CMAKE_INSTALL_PREFIX}/include
55+
FILES_MATCHING
56+
PATTERN "*.h")
57+
install(DIRECTORY ${THIRD_PARTY_PATH} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/)
58+
install(FILES ${CMAKE_SOURCE_DIR}/cmake/lite.ai.toolkit.cmake
59+
DESTINATION ${CMAKE_INSTALL_PREFIX})
60+
install(FILES ${CMAKE_SOURCE_DIR}/cmake/lite.ai.toolkit-config.cmake
61+
DESTINATION ${CMAKE_INSTALL_PREFIX})
7762

7863
# configuration for test examples.
79-
if (LITE_AI_BUILD_LIB AND LITE_AI_BUILD_TEST)
64+
if (LITE_AI_BUILD_TEST)
65+
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_INSTALL_PREFIX}/bin)
8066
add_subdirectory(examples/lite)
67+
if ((UNIX AND NOT APPLE))
68+
file(GLOB_RECURSE ALL_THIRD_LIBS ${THIRD_PARTY_PATH} FOLLOW_SYMLINKS *.so*)
69+
install(FILES ${ALL_THIRD_LIBS} DESTINATION ${EXECUTABLE_OUTPUT_PATH})
70+
endif()
8171
endif ()
72+
73+
message(STATUS "-------------------------- lite.ai.toolkit Configuration Summary --------------------------")
74+
message(STATUS " Version: ${VERSION_STRING}")
75+
message(STATUS " SO Version: ${SOVERSION_STRING}")
76+
message(STATUS " Build Type: ${CMAKE_BUILD_TYPE}")
77+
message(STATUS " Root Path: ${CMAKE_SOURCE_DIR}")
78+
message(STATUS " OpenCV: ON Version: ${OpenCV_Version}")
79+
message(STATUS " ONNXRUNTIME: ${ENABLE_ONNXRUNTIME} Version: ${OnnxRuntime_Version}")
80+
message(STATUS " MNN: ${ENABLE_MNN} Version: ${MNN_Version}")
81+
message(STATUS " NCNN: ${ENABLE_NCNN} Version: ${NCNN_Version}")
82+
message(STATUS " TNN: ${ENABLE_TNN} Version: ${TNN_Version}")
83+
message(STATUS "-------------------------- lite.ai.toolkit Configuration Summary --------------------------")

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674674
<https://www.gnu.org/licenses/why-not-lgpl.html>.
675-

MNN/AutoTime.hpp

Lines changed: 0 additions & 58 deletions
This file was deleted.

MNN/ErrorCode.hpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)