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

add onnx-op-support-md file #1081

Merged
merged 33 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
95e41c6
fix
Sep 1, 2023
e347fca
Merge branch 'master' into feature/onnx-op-support-log
Sep 1, 2023
c287502
fix
Sep 1, 2023
4b4e80c
fix
Sep 1, 2023
21f324e
fix
Sep 5, 2023
69ccafe
fix
Sep 5, 2023
61ff88f
Merge branch 'master' into feature/onnx-op-support-log
Sep 6, 2023
e31445f
add kernel test codecov report
Sep 7, 2023
b536c38
fix
Sep 8, 2023
1fdae5d
fix
Sep 8, 2023
1367dd0
fix
Sep 12, 2023
b0331c4
Merge branch 'master' into feature/onnx-op-support-log
curioyang Sep 18, 2023
e0fd567
Merge branch 'master' into feature/onnx-op-support-log
Sep 26, 2023
66f5372
update onnx_ops.md
Sep 26, 2023
4528c2c
Merge branch 'master' into feature/onnx-op-support-log
Sep 26, 2023
31a2edf
update onnx_ops.md
Sep 27, 2023
3df79de
fix tensor_ops
Sep 28, 2023
9032ff8
fix
Sep 28, 2023
8dc50f4
fix
Sep 28, 2023
46e2874
fix
Sep 28, 2023
5c4660d
update onnx_ops.md
Sep 28, 2023
dac00ea
update onnx_ops.md
Oct 8, 2023
f677471
Merge branch 'master' into feature/onnx-op-support-log
HeJunchao100813 Oct 8, 2023
d0c8494
update onnx_ops.md
Oct 8, 2023
9b9d106
Merge remote-tracking branch 'origin/feature/onnx-op-support-log' int…
Oct 8, 2023
a0493a6
Merge branch 'master' into feature/onnx-op-support-log
HeJunchao100813 Oct 12, 2023
d2cc0e6
fix pytest error
Oct 16, 2023
8a150a9
fix
Oct 16, 2023
78b004c
Merge branch 'master' into feature/onnx-op-support-log
Oct 16, 2023
c4cfe93
Merge branch 'master' into feature/onnx-op-support-log
HeJunchao100813 Oct 24, 2023
630bde3
small fix
Nov 6, 2023
3c5dc70
Merge branch 'master' into feature/onnx-op-support-log
Nov 6, 2023
fea7d6b
Merge branch 'master' into feature/onnx-op-support-log
sunnycase Nov 23, 2023
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
306 changes: 181 additions & 125 deletions .github/workflows/runtime-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: runtime-build

on: [push, pull_request]
on: [ push, pull_request ]

concurrency:
group: runtime-build-${{ github.ref }}
Expand All @@ -13,71 +13,71 @@ jobs:
strategy:
matrix:
config:
- {name: x86_64-macos, os: macos-latest, cmakeArgs: '', buildType: Release}
- {name: x86_64-linux, os: ubuntu-latest, cmakeArgs: '', buildType: Release}
- {name: x86_64-windows, os: windows-latest, arch: x64, cmakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl, buildType: Release}
- { name: x86_64-macos, os: macos-latest, cmakeArgs: '', buildType: Release }
- { name: x86_64-linux, os: ubuntu-latest, cmakeArgs: '', buildType: Release }
- { name: x86_64-windows, os: windows-latest, arch: x64, cmakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl, buildType: Release }

steps:
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Set up build environment (Windows, Visual Studio)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.config.arch}}
if: runner.os == 'Windows'

- name: Set up build environment (Macos)
run: |
brew install sunnycase/core/[email protected]
if: runner.os == 'Macos'

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install Conan
run: |
pip install conan==1.58
conan remote add -i 0 sunnycase https://conan.sunnycase.moe

- name: Configure Conan (Linux)
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile update settings.compiler.version=10 default
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
if: runner.os == 'Linux'

- name: Configure CMake
shell: bash
run: |
conan install . -if build --build=missing -s build_type=${{matrix.config.buildType}} --profile=default -o runtime=True -o python=False -o tests=True -s compiler.cppstd=17

- name: Build & Install
run: |
conan build . -if build -bf build
cmake --install build --prefix install

- name: Test
run: |
cd build
ctest -C ${{matrix.config.buildType}} --test-dir tests/kernels --output-on-failure -j4
if: runner.os != 'Macos' && runner.os != 'Windows'

#- name: Benchmark
# run: |
# ${{github.workspace}}/install/bin/benchnncase > benchnncase.log
# cat benchnncase.log

- name: Upload nncaseruntime Build Artifact
uses: actions/upload-artifact@v3
with:
name: nncaseruntime-${{matrix.config.name}}
path: ${{github.workspace}}/install
if-no-files-found: error
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Set up build environment (Windows, Visual Studio)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.config.arch}}
if: runner.os == 'Windows'

- name: Set up build environment (Macos)
run: |
brew install sunnycase/core/[email protected]
if: runner.os == 'Macos'

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install Conan
run: |
pip install conan==1.58
conan remote add -i 0 sunnycase https://conan.sunnycase.moe

- name: Configure Conan (Linux)
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile update settings.compiler.version=10 default
echo "CC=gcc-10" >> $GITHUB_ENV
echo "CXX=g++-10" >> $GITHUB_ENV
if: runner.os == 'Linux'

- name: Configure CMake
shell: bash
run: |
conan install . -if build --build=missing -s build_type=${{matrix.config.buildType}} --profile=default -o runtime=True -o python=False -o tests=True -s compiler.cppstd=17

- name: Build & Install
run: |
conan build . -if build -bf build
cmake --install build --prefix install

- name: Test
run: |
cd build
ctest -C ${{matrix.config.buildType}} --test-dir tests/kernels --output-on-failure -j4
if: runner.os != 'Macos' && runner.os != 'Windows'

#- name: Benchmark
# run: |
# ${{github.workspace}}/install/bin/benchnncase > benchnncase.log
# cat benchnncase.log

- name: Upload nncaseruntime Build Artifact
uses: actions/upload-artifact@v3
with:
name: nncaseruntime-${{matrix.config.name}}
path: ${{github.workspace}}/install
if-no-files-found: error

#- name: Upload nncaseruntime Benchmark
# uses: actions/upload-artifact@v3
Expand All @@ -87,64 +87,120 @@ jobs:
# if-no-files-found: error

build-cross-linux-runtime:
name: build-runtime-${{matrix.config.name}}
runs-on: ubuntu-latest
strategy:
matrix:
config:
- {name: riscv64-linux, shell: bash, arch: riscv64, toolchain: riscv64-unknown-linux, toolchain_env: RISCV_ROOT_PATH, toolchain_file: riscv64-unknown-linux-gnu-12.0.1, qemu: qemu-riscv64, loader_args: '-cpu;rv64,v=true,Zfh=true,vlen=128,elen=64,vext_spec=v1.0;-L', cmakeArgs: '', buildType: Release}

steps:
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install toolchain and QEMU
shell: bash
run: |
wget https://dav.sunnycase.moe/d/ci/nncase/${{matrix.config.toolchain_file}}.tar.xz -O toolchain.tar.xz
sudo tar xf toolchain.tar.xz -C $GITHUB_WORKSPACE
echo "${{matrix.config.toolchain_env}}=$GITHUB_WORKSPACE/${{matrix.config.toolchain_file}}" >> $GITHUB_ENV

wget https://dav.sunnycase.moe/d/ci/nncase/${{matrix.config.qemu}}.tgz -O qemu.tgz
sudo tar xf qemu.tgz -C /usr/local/bin
echo "TESTS_EXECUTABLE_LOADER=${{matrix.config.qemu}}" >> $GITHUB_ENV
echo "TESTS_EXECUTABLE_LOADER_ARGUMENTS=${{matrix.config.loader_args}};$GITHUB_WORKSPACE/${{matrix.config.toolchain_file}}/sysroot" >> $GITHUB_ENV

- name: Install Conan
run: |
pip install conan==1.58
conan remote add -i 0 sunnycase https://conan.sunnycase.moe

- name: Configure Conan
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
conan config init
sed -i 's/xtensalx7]/xtensalx7, ${{matrix.config.arch}}]/g' ~/.conan/settings.yml

- name: Configure CMake
run: |
conan install . -if build --build=missing -s build_type=${{matrix.config.buildType}} --profile:host=toolchains/riscv64-unknown-linux.profile.jinja --profile:build=default -o runtime=True -o python=False -o tests=True -s compiler.cppstd=17

- name: Build & Install
run: |
conan build . -if build -bf build
cmake --install build --prefix install

- name: Test
shell: bash
run: |
cd build
ctest --test-dir tests/kernels --output-on-failure -j4

- name: Upload nncaseruntime Build Artifact
uses: actions/upload-artifact@v3
with:
name: nncaseruntime-${{matrix.config.name}}
path: ${{github.workspace}}/install
if-no-files-found: error
name: build-runtime-${{matrix.config.name}}
runs-on: ubuntu-latest
strategy:
matrix:
config:
- { name: riscv64-linux, shell: bash, arch: riscv64, toolchain: riscv64-unknown-linux, toolchain_env: RISCV_ROOT_PATH, toolchain_file: riscv64-unknown-linux-gnu-12.0.1, qemu: qemu-riscv64, loader_args: '-cpu;rv64,v=true,Zfh=true,vlen=128,elen=64,vext_spec=v1.0;-L', cmakeArgs: '', buildType: Release }

steps:
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install toolchain and QEMU
shell: bash
run: |
wget https://dav.sunnycase.moe/d/ci/nncase/${{matrix.config.toolchain_file}}.tar.xz -O toolchain.tar.xz
sudo tar xf toolchain.tar.xz -C $GITHUB_WORKSPACE
echo "${{matrix.config.toolchain_env}}=$GITHUB_WORKSPACE/${{matrix.config.toolchain_file}}" >> $GITHUB_ENV

wget https://dav.sunnycase.moe/d/ci/nncase/${{matrix.config.qemu}}.tgz -O qemu.tgz
sudo tar xf qemu.tgz -C /usr/local/bin
echo "TESTS_EXECUTABLE_LOADER=${{matrix.config.qemu}}" >> $GITHUB_ENV
echo "TESTS_EXECUTABLE_LOADER_ARGUMENTS=${{matrix.config.loader_args}};$GITHUB_WORKSPACE/${{matrix.config.toolchain_file}}/sysroot" >> $GITHUB_ENV

- name: Install Conan
run: |
pip install conan==1.58
conan remote add -i 0 sunnycase https://conan.sunnycase.moe

- name: Configure Conan
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
conan config init
sed -i 's/xtensalx7]/xtensalx7, ${{matrix.config.arch}}]/g' ~/.conan/settings.yml

- name: Configure CMake
run: |
conan install . -if build --build=missing -s build_type=${{matrix.config.buildType}} --profile:host=toolchains/riscv64-unknown-linux.profile.jinja --profile:build=default -o runtime=True -o python=False -o tests=True -s compiler.cppstd=17

- name: Build & Install
run: |
conan build . -if build -bf build
cmake --install build --prefix install

- name: Test
shell: bash
run: |
cd build
ctest --test-dir tests/kernels --output-on-failure -j4

- name: Upload nncaseruntime Build Artifact
uses: actions/upload-artifact@v3
with:
name: nncaseruntime-${{matrix.config.name}}
path: ${{github.workspace}}/install
if-no-files-found: error

# - name: Upload coverage to codecov
# uses: codecov/codecov-action@v1
# with:
# token: a6b9eccd-af2d-4036-8a11-a78d7797dcc6
# flags: unittests
# file: coverage/coverage.integration.xml
# name: nncaseruntime-${{matrix.config.name}}
# paths: ${{github.workspace}}/src/Native/src/kernels/stackvm

#upload-coverage:
# needs: [ test-compiler ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Setup .NET
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: "7.0"
#
# - name: Download Unit Test Coverage
# uses: actions/download-artifact@v3
# with:
# name: nncase-coverage-unit
# path: ${{github.workspace}}/coverage
#
# - name: Download Integration Test Coverage
# uses: actions/download-artifact@v3
# with:
# name: nncase-coverage-integration
# path: ${{github.workspace}}/coverage
#
# - name: Convert to GCOV format (Unit)
# run: gcovr -r . --xml-pretty -o coverage/unit_coverage.xml coverage/unit
#
# - name: Upload Codecov (Unit)
# uses: codecov/codecov-action@v3
# with:
# files: coverage/unit_coverage.xml
# flags: unit
#
# - name: Convert to GCOV format (Integration)
# run: gcovr -r . --xml-pretty -o coverage/integration_coverage.xml coverage/integration
#
# - name: Upload Codecov (Integration)
# uses: codecov/codecov-action@v3
# with:
# files: coverage/integration_coverage.xml
# flags: integration
#
# - name: Upload Coverage Report
# uses: actions/upload-artifact@v3
# with:
# name: nncase-coverage-report
# path: coverage
# if-no-files-found: error
24 changes: 12 additions & 12 deletions docs/caffe_ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## 支持的 Caffe 算子

| Operator | Is Supported |
|-------|------------------ |
| Input | ✅ |
| Concat | ✅ |
| Convolution | ✅ |
| Eltwise | ✅ |
| Permute | ✅ |
| Relu | ✅ |
| Reshape | ✅ |
| Slice | ✅ |
| Softmax | ✅ |
| Split | ✅ |
| Operator | Is Supported |
|-------------|--------------|
| Input | ✅ |
| Concat | ✅ |
| Convolution | ✅ |
| Eltwise | ✅ |
| Permute | ✅ |
| Relu | ✅ |
| Reshape | ✅ |
| Slice | ✅ |
| Softmax | ✅ |
| Split | ✅ |
30 changes: 15 additions & 15 deletions docs/ncnn_ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

## 支持的 ncnn 算子

| Operator | Is Supported |
|-------|------------------ |
| Input | ✅ |
| Clip | ✅ |
| Concat | ✅ |
| Convolution | ✅ |
| ConvolutionDepthWise | ✅ |
| HardSigmoid | ✅ |
| HardSwish | ✅ |
| Innerproduct | ✅ |
| Pooling | ✅ |
| ReLU | ✅ |
| Sigmoid | ✅ |
| Softmax | ✅ |
| Split | ✅ |
| Operator | Is Supported |
|----------------------|--------------|
| Input | ✅ |
| Clip | ✅ |
| Concat | ✅ |
| Convolution | ✅ |
| ConvolutionDepthWise | ✅ |
| HardSigmoid | ✅ |
| HardSwish | ✅ |
| Innerproduct | ✅ |
| Pooling | ✅ |
| ReLU | ✅ |
| Sigmoid | ✅ |
| Softmax | ✅ |
| Split | ✅ |
Loading
Loading