-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.rknn_converter support rv1106/rv1103
2.yolo series model update. support v6,v8,ppyoloe_plus 3.fix bugs.
- Loading branch information
zen
committed
Jan 30, 2023
1 parent
4d7c483
commit e13992d
Showing
80 changed files
with
5,718 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-9 KB
capi_tools/toolkit1/rknn_capi_test/install/RK1808/rknn_capi_test/lib/librknn_api.so
Binary file not shown.
Binary file removed
BIN
-913 KB
capi_tools/toolkit1/rknn_capi_test/install/RK1808/rknn_capi_test/rknn_capi_test
Binary file not shown.
Binary file removed
BIN
-915 KB
capi_tools/toolkit1/rknn_capi_test/install/RK1808/rknn_capi_test/rknn_capi_test_zero_copy
Binary file not shown.
Binary file removed
BIN
-6.12 KB
capi_tools/toolkit1/rknn_capi_test/install/RV1109_1126/rknn_capi_test/lib/librknn_api.so
Binary file not shown.
Binary file removed
BIN
-870 KB
capi_tools/toolkit1/rknn_capi_test/install/RV1109_1126/rknn_capi_test/rknn_capi_test
Binary file not shown.
Binary file removed
BIN
-874 KB
...tools/toolkit1/rknn_capi_test/install/RV1109_1126/rknn_capi_test/rknn_capi_test_zero_copy
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
set -e | ||
|
||
TARGET_SOC="rv110x" | ||
|
||
export TOOL_CHAIN="/home/xz/Documents/git_rk/compile_tools/1106/arm-rockchip830-linux-uclibcgnueabihf" | ||
GCC_COMPILER=${TOOL_CHAIN}/bin/arm-rockchip830-linux-uclibcgnueabihf | ||
|
||
export LD_LIBRARY_PATH=${TOOL_CHAIN}/lib:$LD_LIBRARY_PATH | ||
export CC=${GCC_COMPILER}-gcc | ||
export CXX=${GCC_COMPILER}-g++ | ||
|
||
ROOT_PWD=$( cd "$( dirname $0 )" && cd -P "$( dirname "$SOURCE" )" && pwd ) | ||
|
||
MZ_ROOT=$(pwd | sed 's/\(rknn_model_zoo\).*/\1/g') | ||
|
||
# build | ||
BUILD_DIR=${ROOT_PWD}/build/build_linux_rv110x | ||
|
||
if [[ ! -d "${BUILD_DIR}" ]]; then | ||
mkdir -p ${BUILD_DIR} | ||
fi | ||
|
||
cd ${BUILD_DIR} | ||
cmake ../../mini_driver -DCMAKE_SYSTEM_NAME=Linux -DTARGET_SOC=${TARGET_SOC} -DMZ_ROOT=${MZ_ROOT} | ||
make -j4 | ||
make install | ||
cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+138 KB
capi_tools/toolkit2/rknn_capi_test/install/rv110x/Linux/rknn_capi_test/lib/librknnmrt.so
Binary file not shown.
Binary file added
BIN
+195 KB
...lkit2/rknn_capi_test/install/rv110x/Linux/rknn_capi_test/rknn_capi_test_zero_copy_NC1HWC2
Binary file not shown.
Binary file added
BIN
+194 KB
...toolkit2/rknn_capi_test/install/rv110x/Linux/rknn_capi_test/rknn_capi_test_zero_copy_NCHW
Binary file not shown.
118 changes: 118 additions & 0 deletions
118
capi_tools/toolkit2/rknn_capi_test/mini_driver/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
cmake_minimum_required(VERSION 3.4.1) | ||
|
||
project(rknn_capi_test) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
|
||
|
||
# install target and libraries | ||
#set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install/rknn_yolov5_demo_${CMAKE_SYSTEM_NAME}) | ||
|
||
set(CMAKE_SKIP_INSTALL_RPATH FALSE) | ||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) | ||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") | ||
|
||
|
||
# rknn api | ||
if(TARGET_SOC STREQUAL "rk356x") | ||
set(PLATFORM RK3566_3568) | ||
if (CMAKE_SYSTEM_NAME STREQUAL "Android") | ||
set(LIB_ARCH arm64-v8a) | ||
set(RKNN_API_PATH ${MZ_ROOT}/libs/rklibs/rknpu2/runtime/RK356X/Android/librknn_api) | ||
set(RKNN_RT_LIB ${RKNN_API_PATH}/${LIB_ARCH}/librknnrt.so) | ||
else() | ||
set(LIB_ARCH aarch64) | ||
set(RKNN_API_PATH ${MZ_ROOT}/libs/rklibs/rknpu2/runtime/RK356X/Linux/librknn_api) | ||
set(RKNN_RT_LIB ${RKNN_API_PATH}/${LIB_ARCH}/librknnrt.so) | ||
endif() | ||
#set(RKNN_API_PATH ${CMAKE_SOURCE_DIR}/../../runtime/RK356X/${CMAKE_SYSTEM_NAME}/librknn_api) | ||
#include_directories(${RKNN_API_PATH}/include) | ||
elseif(TARGET_SOC STREQUAL "rk3588") | ||
set(PLATFORM RK3588) | ||
if (CMAKE_SYSTEM_NAME STREQUAL "Android") | ||
set(LIB_ARCH arm64-v8a) | ||
set(RKNN_API_PATH ${MZ_ROOT}/libs/rklibs/rknpu2/runtime/RK3588/Android/librknn_api) | ||
set(RKNN_RT_LIB ${RKNN_API_PATH}/${LIB_ARCH}/librknnrt.so) | ||
else() | ||
set(LIB_ARCH aarch64) | ||
set(RKNN_API_PATH ${MZ_ROOT}/libs/rklibs/rknpu2/runtime/RK3588/Linux/librknn_api) | ||
set(RKNN_RT_LIB ${RKNN_API_PATH}/${LIB_ARCH}/librknnrt.so) | ||
endif() | ||
# set(RKNN_API_PATH ${CMAKE_SOURCE_DIR}/../../runtime/RK3588/${CMAKE_SYSTEM_NAME}/librknn_api) | ||
elseif(TARGET_SOC STREQUAL "rv110x") | ||
set(PLATFORM RV1106_1103) | ||
set(LIB_ARCH armhf) | ||
set(RKNN_API_PATH ${MZ_ROOT}/libs/rklibs/rknpu2/runtime/RV1106/Linux/librknn_api) | ||
set(RKNN_RT_LIB ${RKNN_API_PATH}/${LIB_ARCH}/librknnmrt.so) | ||
else() | ||
message(FATAL_ERROR "TARGET_SOC is not set, ref value: rk356x or rk3588 ") | ||
endif() | ||
|
||
include_directories(${RKNN_API_PATH}/include) | ||
|
||
|
||
# CNPY | ||
set(CNPY_DIR ${CMAKE_SOURCE_DIR}/cnpy) | ||
include_directories(${CNPY_DIR}) | ||
message("CNPY_DIR: ${CNPY_DIR}") | ||
|
||
|
||
# drm | ||
set(DRM_DIR ${MZ_ROOT}/libs/common/drm) | ||
include_directories(${DRM_DIR}/include) | ||
include_directories(${DRM_DIR}/include/libdrm) | ||
|
||
|
||
#stb CImg | ||
set(STB_DIR ${MZ_ROOT}/libs/common/) | ||
include_directories(${STB_DIR}) | ||
|
||
# zlib(used by libpng) | ||
set(ZLIB_DIR ${MZ_ROOT}/libs/platform/${PLATFORM}/zlib) | ||
include_directories(${ZLIB_DIR}/include) | ||
set(ZLIB_LIB ${ZLIB_DIR}/lib/libz.a) | ||
|
||
string(REPLACE "-DANDROID" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | ||
string(REPLACE "-DANDROID" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") | ||
|
||
set(CMAKE_INSTALL_RPATH "lib") | ||
|
||
include_directories( ${CMAKE_SOURCE_DIR}/include) | ||
|
||
add_executable(rknn_capi_test_zero_copy_NC1HWC2 | ||
src/rknn_api_native_output_test.c | ||
${CNPY_DIR}/cnpy.h | ||
src/float16.h | ||
) | ||
|
||
target_link_libraries(rknn_capi_test_zero_copy_NC1HWC2 | ||
${RKNN_RT_LIB} | ||
${RGA_LIB} | ||
${LIBJPEG_LIB} | ||
${LIBPNG_LIB} | ||
${ZLIB_LIB} | ||
dl | ||
) | ||
|
||
add_executable(rknn_capi_test_zero_copy_NCHW | ||
src/rknn_api_native_nhwc_output_test.c | ||
${CNPY_DIR}/cnpy.h | ||
) | ||
|
||
target_link_libraries(rknn_capi_test_zero_copy_NCHW | ||
${RKNN_RT_LIB} | ||
${RGA_LIB} | ||
${LIBJPEG_LIB} | ||
${LIBPNG_LIB} | ||
${ZLIB_LIB} | ||
dl | ||
) | ||
|
||
|
||
# install target and libraries | ||
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/../install/${TARGET_SOC}/${CMAKE_SYSTEM_NAME}/rknn_capi_test) | ||
install(TARGETS rknn_capi_test_zero_copy_NC1HWC2 DESTINATION ./) | ||
install(TARGETS rknn_capi_test_zero_copy_NCHW DESTINATION ./) | ||
|
||
install(PROGRAMS ${RKNN_RT_LIB} DESTINATION lib) |
Oops, something went wrong.