init repo.

This commit is contained in:
tqcq
2024-12-19 13:14:37 +08:00
commit 7d7845acb5
1412 changed files with 596214 additions and 0 deletions

View File

@ -0,0 +1,72 @@
name: android
on:
push:
paths:
- ".github/workflows/android.yml"
- "cmake/**"
- "CMakeLists.txt"
- "tile/**"
- "third_party/**"
pull_request:
paths:
- ".github/workflows/android.yml"
- "cmake/**"
- "CMakeLists.txt"
- "tile/**"
- "third_party/**"
concurrency:
group: android-${{github.ref}}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-20.04
env:
TILE_CMAKE_OPTIONS: |
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake \
-DANDROID_PLATFORM=android-21 \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_BUILD_TYPE=Release \
-DNCNN_VULKAN=ON \
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: install-tools
run: |
apt-get update -y
apt-get install -y ninja-build
- name: armeabi-v7a
run: |
mkdir build-armeabi-v7a && cd build-armeabi-v7a
cmake -GNinja .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON
cmake --build . -j $(nproc)
- name: arm64-v8a
run: |
mkdir build-arm64-v8a && cd build-arm64-v8a
cmake -GNinja .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="arm64-v8a"
cmake --build . -j $(nproc)
- name: x86
run: |
mkdir build-x86 && cd build-x86
cmake -GNinja .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="x86"
cmake --build . -j $(nproc)
- name: x86_64
run: |
mkdir build-x86_64 && cd build-x86_64
cmake -GNinja .. ${{ env.TILE_CMAKE_OPTIONS}} -DCMAKE_ABI="x86_64"
cmake --build . -j $(nproc)

View File

@ -0,0 +1,58 @@
---
name: linux-aarch64-cpu-gcc
on:
push:
paths:
- ".gitea/workflows/linux-aarch64-gcc.yml"
- "cmake/**"
- "toolchains/aarch64-linux-gnu.toolchain.cmake"
- "third_party/**"
- "tile/**"
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_aarch64.*"
- "CMakeLists.txt"
- "cmake/**"
pull_request:
paths:
- ".gitea/workflows/linux-aarch64-gcc.yml"
- "cmake/**"
- "toolchains/aarch64-linux-gnu.toolchain.cmake"
- "third_party/**"
- "tile/**"
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_aarch64.*"
- "CMakeLists.txt"
- "cmake/**"
concurrency:
group: linux-aarch64-cpu-gcc-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
linux-gcc-aarch64:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["Debug", "Release"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y g++-aarch64-linux-gnu qemu-user-binfmt ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON ..
- name: build
run: |
cd build
cmake --build . -j $(nproc)
- name: test
run: |-
cd build
sudo ln -sf /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ld-linux-aarch64.so.1
export LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib
ctest --output-on-failure -j $(nproc)

View File

@ -0,0 +1,84 @@
---
name: linux-arm-gcc
on:
push:
paths:
- .gitea/workflows/linux-arm-gcc.yml
- "cmake/**"
- toolchains/arm-linux-gnueabi.toolchain.cmake
- toolchains/arm-linux-gnueabihf.toolchain.cmake
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_arm.*"
- CMakeLists.txt
- cmake/**
pull_request:
paths:
- .gitea/workflows/linux-arm-gcc.yml
- "cmake/**"
- toolchains/arm-linux-gnueabi.toolchain.cmake
- toolchains/arm-linux-gnueabihf.toolchain.cmake
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_arm.*"
- CMakeLists.txt
- cmake/**
concurrency:
group: linux-arm-gcc-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-gcc-arm:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["Debug", "Release"]
steps:
- uses: actions/checkout@v4
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y g++-arm-linux-gnueabi qemu-user-binfmt ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabi.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_TESTS=ON ..
- name: build
run: |
cd build
cmake --build . -j $(nproc)
- name: test
run: |
cd build
sudo ln -sf /usr/arm-linux-gnueabi/lib/ld-linux.so.3 /lib/ld-linux.so.3
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabi/lib
ctest --output-on-failure -j $(nproc)
linux-gcc-armhf:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["Debug", "Release"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: arm-gnu-toolchain
run: |
sudo apt-get update -y
sudo apt-get install -y g++-arm-linux-gnueabihf qemu-user-binfmt ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabihf.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON ..
- name: build
run: |
cd build
cmake --build . -j $(nproc)
- name: test
run: |-
cd build
sudo ln -sf /usr/arm-linux-gnueabihf/lib/ld-linux-armhf.so.3 /lib/ld-linux-armhf.so.3
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib/
ctest --output-on-failure -j $(nproc)

View File

@ -0,0 +1,53 @@
---
name: linux-mips-gcc
on:
push:
paths:
- .gitea/workflows/linux-mips-gcc.yml
- "toolchains/mips-linux-gnu.toolchain.cmake"
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_mips32.*"
- CMakeLists.txt
- cmake/**
pull_request:
paths:
- .gitea/workflows/linux-mips-gcc.yml
- "toolchains/mips-linux-gnu.toolchain.cmake"
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_mips32.*"
- CMakeLists.txt
- cmake/**
concurrency:
group: linux-mips-gcc-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
linux-gcc-mipsel:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y g++-mipsel-linux-gnu qemu-user-binfmt ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/mips-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON ..
- name: build
run: cmake --build build --target all -j $(nproc)
- name: test
run: |-
cd build
sudo ln -sf /usr/mipsel-linux-gnu/lib/ld.so.1 /lib/ld.so.1
export LD_LIBRARY_PATH=/usr/mipsel-linux-gnu/lib/
ctest --output-on-failure -j $(nproc)

View File

@ -0,0 +1,54 @@
---
name: linux-mips64-gcc
on:
push:
paths:
- .gitea/workflows/linux-mips64-gcc.yml
- toolchains/mips64el-linux-gnuabi64.toolchain.cmake
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_mips64.*"
- CMakeLists.txt
- cmake/**
pull_request:
paths:
- .gitea/workflows/linux-mips64-gcc.yml
- "cmake/**"
- toolchains/mips64el-linux-gnuabi64.toolchain.cmake
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_mips64.*"
- CMakeLists.txt
- cmake/**
concurrency:
group: linux-mips64-gcc-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
linux-gcc-mips64el:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y g++-mips64el-linux-gnuabi64 qemu-user-binfmt ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/mips64el-linux-gnuabi64.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON ..
- name: build
run: cmake --build build --target all -j $(nproc)
- name: test
run: |-
cd build
sudo ln -sf /usr/mips64el-linux-gnuabi64/lib64/ld.so.1 /lib64/ld.so.1
export LD_LIBRARY_PATH=/usr/mips64el-linux-gnuabi64/lib
ctest --output-on-failure -j $(nproc)

View File

@ -0,0 +1,55 @@
---
name: linux-riscv64-gcc
on:
push:
paths:
- .gitea/workflows/linux-riscv64-gcc.yml
- "cmake/**"
- toolchains/riscv64-linux-gnu.toolchain.cmake
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_riscv64.*"
- CMakeLists.txt
- cmake/**
pull_request:
paths:
- .gitea/workflows/linux-riscv64-gcc.yml
- "cmake/**"
- toolchains/riscv64-linux-gnu.toolchain.cmake
- third_party/**
- tile/**
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_riscv64.*"
- CMakeLists.txt
- cmake/**
concurrency:
group: linux-riscv64-gcc-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
linux-gcc-riscv64:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y g++-riscv64-linux-gnu qemu-user-binfmt ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/riscv64-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON ..
- name: build
run: cmake --build build --target all -j $(nproc)
- name: test
run: |-
cd build
sudo ln -sf /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib/ld-linux-riscv64-lp64d.so.1
export LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib
ctest --output-on-failure -j $(nproc)

View File

@ -0,0 +1,52 @@
name: linux-x64-clang
on:
push:
paths:
- ".gitea/workflows/linux-x64-clang.yml"
- "cmake/**"
- "third_party/**"
- "tile/**"
- "CMakeLists.txt"
pull_request:
paths:
- ".gitea/workflows/linux-x64-clang.yml"
- "cmake/**"
- "third_party/**"
- "tile/**"
- "CMakeLists.txt"
concurrency:
group: linux-x64-clang-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-clang:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["Debug", "Release"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build
- name: configure
env:
CC: clang
CXX: clang++
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON ..
- name: build
run: |
cmake --build build -j $(nproc)
- name: test
run: |
cd build
ctest --output-on-failure
# - name: benchmark
# run: |
# ./build/sled_benchmark

View File

@ -0,0 +1,53 @@
name: linux-x64-gcc
on:
push:
paths:
- ".gitea/workflows/linux-x64-gcc.yml"
- "cmake/**"
- "third_party/**"
- "tile/**"
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_x64.*"
- "CMakeLists.txt"
pull_request:
paths:
- ".gitea/workflows/linux-x64-gcc.yml"
- "cmake/**"
- "third_party/**"
- "tile/**"
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_x64.*"
- "CMakeLists.txt"
concurrency:
group: linux-x64-gcc-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-gcc:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["Debug", "Release"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON ..
- name: build
run: |
cmake --build build -j $(nproc)
- name: test
run: |
cd build
ctest --output-on-failure -j $(nproc)
- name: benchmark
run: |
./build/bin/tile_bm_all

View File

@ -0,0 +1,55 @@
name: linux-x86-gcc
on:
push:
paths:
- ".gitea/workflows/linux-x86-gcc.yml"
- "toolchains/host.gcc-m32.toolchain.cmake"
- "cmake/**"
- "third_party/**"
- "tile/**"
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_x86.*"
- "CMakeLists.txt"
pull_request:
paths:
- ".gitea/workflows/linux-x86-gcc.yml"
- "toolchains/host.gcc-m32.toolchain.cmake"
- "cmake/**"
- "third_party/**"
- "tile/**"
- "!tile/fiber/detail/asm/*"
- "tile/fiber/detail/asm/ucontext_x86.*"
- "CMakeLists.txt"
concurrency:
group: linux-x86-gcc-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-gcc:
runs-on: ubuntu-20.04
strategy:
matrix:
build_type: ["Debug", "Release"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install-tools
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-multilib g++-multilib ninja-build
- name: configure
run: |
mkdir build && cd build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/host.gcc-m32.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON ..
- name: build
run: |
cmake --build build -j $(nproc)
- name: test
run: |
cd build
ctest --output-on-failure -j $(nproc)
- name: benchmark
run: |
./build/bin/tile_bm_all