-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from HyperInspire/dev/rk356x
Dev/rk356x
- Loading branch information
Showing
21 changed files
with
438 additions
and
104 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 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,49 @@ | ||
name: Build Linux-Ubuntu-AArch64-rk356x | ||
|
||
on: | ||
push: | ||
branches: ["feature/rk356x"] | ||
|
||
# Set the global GitHub token environment variable | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build: | ||
name: Compile Linux-AArch64 RK356X | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Step 2: Synchronize and update submodules recursively | ||
- name: Update submodules | ||
run: | | ||
git clone --recurse-submodules https://github.com/tunmx/inspireface-3rdparty.git 3rdparty | ||
# Step 3: Install wget and xz-utils | ||
- name: Install wget and xz-utils | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget xz-utils | ||
# Step 4: Download Toolchain | ||
- name: Download and Extract Linaro Toolchain | ||
run: | | ||
mkdir -p /opt/linaro-toolchain | ||
wget -qO- https://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz | tar -xJ -C /opt/linaro-toolchain --strip-components=1 | ||
# Step 5: Install Toolchain | ||
- name: Set environment variables | ||
run: | | ||
echo "ARM_CROSS_COMPILE_TOOLCHAIN=/opt/linaro-toolchain" >> $GITHUB_ENV | ||
echo "PATH=/opt/linaro-toolchain/bin:${PATH}" >> $GITHUB_ENV | ||
# Step 6: Start building the SDK | ||
- name: Start Building the InspireFace-Linux-AArch64-rk356x | ||
run: | | ||
bash command/build_cross_rk356x_aarch64.sh | ||
ls build | ||
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 |
---|---|---|
|
@@ -14,7 +14,11 @@ Please contact [[email protected]](mailto:[email protected]?subject=In | |
|
||
## Change Logs | ||
|
||
**`2024-12-22`** Started adapting for multiple Rockchip devices with NPU support, beginning with RV1106 support. | ||
**`2025-01-08`** Support inference on Rockchip devices **RK3566/RK3568** NPU. | ||
|
||
**`2024-12-25`** Add support for optional **RKRGA** image acceleration processing on Rockchip devices. | ||
|
||
**`2024-12-22`** Started adapting for multiple Rockchip devices with NPU support, beginning with **RV1103/RV1106** support. | ||
|
||
**`2024-12-10`** Added support for quick installation via Python package manager. | ||
|
||
|
@@ -132,6 +136,8 @@ bash command/download_models_general.sh Megatron | |
bash command/download_models_general.sh Gundam_RV1109 | ||
# Download resource files for RV1106 | ||
bash command/download_models_general.sh Gundam_RV1106 | ||
# Download resource files for RK356X | ||
bash command/download_models_general.sh Gundam_RV356X | ||
|
||
# Download all model files | ||
bash command/download_models_general.sh | ||
|
@@ -227,9 +233,9 @@ We have completed the adaptation and testing of the software across various oper | |
| 1 | **Linux-CPU** | ARMv7 | - | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) | ![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge) | | ||
| 2 | | ARMv8 | - | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) | ![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge) | | ||
| 3 | | x86/x86_64 | - | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) | [![test](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/test_ubuntu_x86_Pikachu.yaml?style=for-the-badge&label=Test&color=blue)](https://github.com/HyperInspire/InspireFace/actions/workflows/test_ubuntu_x86_Pikachu.yaml) | | ||
| 4 | **Linux-Rockchip** | ARMv7 | RV1109RV1126 | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) | ![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge) | | ||
| 5 | | ARMv7 | RV1106 | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) |![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge)| | ||
| 6 | | ARMv8 | RK3566/RK3568 | ![build](https://img.shields.io/badge/build-developing-yellow?style=for-the-badge) | | | ||
| 4 | **Linux-Rockchip** | ARMv7 | RV1109/RV1126 | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) | ![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge) | | ||
| 5 | | ARMv7 | RV1103/RV1106 | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) |![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge)| | ||
| 6 | | ARMv8 | RK3566/RK3568 | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) | ![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge) | | ||
| 7 | | ARMv8 | RK3588 | ![build](https://img.shields.io/badge/build-developing-yellow?style=for-the-badge) | | | ||
| 8 | **Linux-CUDA** | x86/x86_64 | NVIDIA-GPU | ![build](https://img.shields.io/badge/OFFLINE-PASSING-green?style=for-the-badge) | ![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge) | | ||
| 9 | **MacOS** | Intel | CPU/Metal/**ANE** | [![build](https://img.shields.io/github/actions/workflow/status/HyperInspire/InspireFace/release-sdks.yaml?&style=for-the-badge&label=build)](https://github.com/HyperInspire/InspireFace/actions/workflows/release-sdks.yaml) | ![test](https://img.shields.io/badge/OFFLINE-PASSING-blue?style=for-the-badge) | | ||
|
@@ -530,7 +536,8 @@ For different scenarios, we currently provide several Packs, each containing mul | |
| Pikachu | CPU | Lightweight edge-side models | [Download](https://github.com/HyperInspire/InspireFace/releases/download/v1.x/Pikachu) | | ||
| Megatron | CPU, GPU | Mobile and server models | [Download](https://github.com/HyperInspire/InspireFace/releases/download/v1.x/Megatron) | | ||
| Gundam-RV1109 | RKNPU | Supports RK1109 and RK1126 | [Download](https://github.com/HyperInspire/InspireFace/releases/download/v1.x/Gundam_RV1109) | | ||
| Gundam-RV1106 | RKNPU | Supports RK1106(RV1103 may be supported, but not verified) | [Download](https://github.com/HyperInspire/InspireFace/releases/download/v1.x/Gundam_RV1106) | | ||
| Gundam-RV1106 | RKNPU | Supports RV1103 and RV1106 | [Download](https://github.com/HyperInspire/InspireFace/releases/download/v1.x/Gundam_RV1106) | | ||
| Gundam-RK356X | RKNPU | Supports RK3566 and RK3568 | [Download](https://github.com/HyperInspire/InspireFace/releases/download/v1.x/Gundam_RK356X) | | ||
|
||
## Acknowledgement | ||
|
||
|
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,76 @@ | ||
#!/bin/bash | ||
|
||
# Reusable function to handle 'install' directory operations | ||
move_install_files() { | ||
local root_dir="$1" | ||
local install_dir="$root_dir/install" | ||
|
||
# Step 1: Check if the 'install' directory exists | ||
if [ ! -d "$install_dir" ]; then | ||
echo "Error: 'install' directory does not exist in $root_dir" | ||
exit 1 | ||
fi | ||
|
||
# Step 2: Delete all other files/folders except 'install' | ||
find "$root_dir" -mindepth 1 -maxdepth 1 -not -name "install" -exec rm -rf {} + | ||
|
||
# Step 3: Move all files from 'install' to the root directory | ||
mv "$install_dir"/* "$root_dir" 2>/dev/null | ||
|
||
# Step 4: Remove the empty 'install' directory | ||
rmdir "$install_dir" | ||
|
||
echo "Files from 'install' moved to $root_dir, and 'install' directory deleted." | ||
} | ||
|
||
if [ -n "$VERSION" ]; then | ||
TAG="-$VERSION" | ||
else | ||
TAG="" | ||
fi | ||
|
||
|
||
SCRIPT_DIR=$(pwd) # Project dir | ||
|
||
|
||
echo "MNN_CUSTOM_SOURCE: ${MNN_CUSTOM_SOURCE}" | ||
cd ${SCRIPT_DIR} | ||
|
||
# export ARM_CROSS_COMPILE_TOOLCHAIN=/root/arm-rockchip830-linux-uclibcgnueabihf/ | ||
|
||
BUILD_FOLDER_PATH="build/inspireface-linux-aarch64-rk356x${TAG}" | ||
|
||
mkdir -p ${BUILD_FOLDER_PATH} | ||
# shellcheck disable=SC2164 | ||
cd ${BUILD_FOLDER_PATH} | ||
|
||
# export ARM_CROSS_COMPILE_TOOLCHAIN=/host/software/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu | ||
|
||
cmake -DCMAKE_SYSTEM_NAME=Linux \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_SYSTEM_VERSION=1 \ | ||
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \ | ||
-DCMAKE_C_COMPILER=$ARM_CROSS_COMPILE_TOOLCHAIN/bin/aarch64-linux-gnu-gcc \ | ||
-DCMAKE_CXX_COMPILER=$ARM_CROSS_COMPILE_TOOLCHAIN/bin/aarch64-linux-gnu-g++ \ | ||
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -flax-vector-conversions" \ | ||
-DTARGET_PLATFORM=armlinux \ | ||
-DISF_BUILD_LINUX_AARCH64=ON \ | ||
-DISF_BUILD_LINUX_ARM7=OFF \ | ||
-DMNN_SEP_BUILD=off \ | ||
-DISF_ENABLE_RKNN=ON \ | ||
-DISF_RK_DEVICE_TYPE=RK356X \ | ||
-DISF_RKNPU_MAJOR=rknpu2 \ | ||
-DISF_RK_COMPILER_TYPE=aarch64 \ | ||
-DISF_ENABLE_RGA=ON \ | ||
-DISF_ENABLE_COST_TIME=OFF \ | ||
-DISF_BUILD_WITH_SAMPLE=OFF \ | ||
-DISF_BUILD_WITH_TEST=OFF \ | ||
-DISF_ENABLE_BENCHMARK=OFF \ | ||
-DISF_ENABLE_USE_LFW_DATA=OFF \ | ||
-DISF_ENABLE_TEST_EVALUATION=OFF \ | ||
-DISF_BUILD_SHARED_LIBS=OFF ${SCRIPT_DIR} | ||
|
||
make -j4 | ||
make install | ||
|
||
move_install_files "$(pwd)" |
Oops, something went wrong.