-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade conan2 (#1242) * upgrade conan2 * update ci * add install lib * close vulkan * update kernel tests * test exclude win * test kernel tests * fix rv runtime build * fix cmake cmd * fix conan install args * test * fix python packages dependence * Apply code-format changes * fix python build * fix python build * fix python build * fix python build * fix python build * fix python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * only test linux python build * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * Apply code-format changes * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * debug dotnet * downgrade python lib * debug dotnet * all test * all test * all test * all test * fix python build whl * fix remove file * fix error * fix error * fix error * fix error * close mac python whl * fix error * fix intrinsic args * disable ctest * enable mac build python whl * try fix python build * Revert "try fix python build" This reverts commit b934f15. * try fix python build * Revert "try fix python build" This reverts commit 233bad4. * try fix macos python build * check build dir with wrong macos * fix cmd * debug * ssh debug * fix mac build error * remove debug code * start to debug windows ci * upgrade windows version * debug ssh * fix win build * debug * fix error in windows python build wheel * fix ninja dependence * fix ninja dependence * fix ninja dependence * fix ninja dependence * fix lib miss * fix path error * fix ninja * fix ninja * fix ninja * disable linux mac * recover conanfile path replace * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * debug * python build ok * debug test compiler * debug * debug * debug * recover * debug * debug * Revert "debug" This reverts commit b666dae. * change windows version * disable windows test-compiler * Use gcc-14 * Add missing files * Fix dependencies * Fix dependencies * Fix dependencies * Fix dependencies * Fix dependencies * Disable F.InterpolationMode.BILINEAR * Apply code-format changes * Disable tflite conv2d_transpose * Disable tflite expand_dims * Disable more tflite * Fix CI * Fix python build * Apply code-format changes * Fix * Fix * Enable macos * Fix * Enable win * Fix --------- Co-authored-by: curioyang <[email protected]> Co-authored-by: yanghaoqi <[email protected]> Co-authored-by: sunnycase <[email protected]> Co-authored-by: sunnycase <[email protected]>
- Loading branch information
1 parent
b08735d
commit 6363c3d
Showing
77 changed files
with
1,782 additions
and
1,950 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
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 |
---|---|---|
|
@@ -17,55 +17,50 @@ jobs: | |
strategy: | ||
matrix: | ||
config: | ||
- {name: x86_64-macos, os: macos-12, cmakeArgs: -DENABLE_X86SIMD=OFF, buildType: Release} | ||
- {name: x86_64-linux, os: ubuntu-latest, cmakeArgs: '', buildType: Release} | ||
- {name: x86_64-windows, os: windows-2019, arch: x64, cmakeArgs: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl, buildType: Release} | ||
- {name: aarch64-macos, os: macos-14, buildType: Release} | ||
- {name: x86_64-linux, os: ubuntu-24.04, buildType: Release} | ||
- {name: x86_64-windows, os: windows-latest, arch: x64, 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.10' | ||
|
||
- 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) | ||
- name: Set up build environment (Linux) | ||
run: | | ||
brew install sunnycase/core/[email protected] | ||
if: runner.os == 'Macos' | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
echo "CC=gcc-14" >> $GITHUB_ENV | ||
echo "CXX=g++-14" >> $GITHUB_ENV | ||
if: runner.os == 'Linux' | ||
|
||
- name: Install Conan | ||
shell: bash | ||
run: | | ||
pip install conan==1.58 | ||
- name: Configure Conan (Linux) | ||
run: | | ||
conan profile new default --detect | ||
conan profile update settings.compiler.libcxx=libstdc++11 default | ||
echo "CC=gcc-10" >> $GITHUB_ENV | ||
echo "CXX=g++-10" >> $GITHUB_ENV | ||
if: runner.os == 'Linux' | ||
pip install conan==2.6.0 | ||
conan remote add sunnycase https://conan.sunnycase.moe --index 0 | ||
- name: Configure CMake | ||
- name: Configure | ||
shell: bash | ||
run: | | ||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.config.buildType}} ${{matrix.config.cmakeArgs}} -DPython3_ROOT_DIR=${pythonLocation} | ||
conan install . --build=missing -s build_type=${{matrix.config.buildType}} -pr:a=toolchains/${{matrix.config.name}}.profile.jinja -o "&:runtime=False" -o "&:python=True" -o "&:tests=False" | ||
cmake --preset conan-release | ||
- name: Build & Install | ||
run: | | ||
cmake --build build --config ${{matrix.config.buildType}} | ||
cmake --install build --prefix install | ||
cmake --build build/${{matrix.config.buildType}} --config ${{matrix.config.buildType}} | ||
cmake --install build/${{matrix.config.buildType}} --prefix install | ||
- name: Upload nncase Native Build Artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nncase-native-${{matrix.config.name}} | ||
path: ${{github.workspace}}/install | ||
|
@@ -79,16 +74,16 @@ jobs: | |
matrix: | ||
dotnet-version: ['7.0'] | ||
config: | ||
- {name: x86_64-macos, os: macos-12, shell: bash, rid: osx-x64, buildType: Release} | ||
- {name: x86_64-linux, os: ubuntu-latest, shell: bash, rid: linux-x64, buildType: Release} | ||
- {name: x86_64-windows, os: windows-2019, shell: bash, rid: win-x64, buildType: Release} | ||
- {name: aarch64-macos, os: macos-14, shell: bash, rid: osx-arm64, buildType: Release} | ||
- {name: x86_64-linux, os: ubuntu-24.04, shell: bash, rid: linux-x64, buildType: Release} | ||
- {name: x86_64-windows, os: windows-latest, arch: x64, shell: bash, rid: win-x64, buildType: Release} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{matrix.dotnet-version}} | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Cache NuGet packages | ||
uses: actions/cache@v3 | ||
|
@@ -99,16 +94,11 @@ jobs: | |
${{ runner.os }}-nuget- | ||
- name: Install nncase native Artifact | ||
uses: actions/download-artifact@v2.0.9 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nncase-native-${{matrix.config.name}} | ||
path: ${{github.workspace}}/install | ||
|
||
- name: Set up build environment (Macos) | ||
run: | | ||
brew install sunnycase/core/[email protected] | ||
if: runner.os == 'Macos' | ||
|
||
- name: Build | ||
run: | | ||
dotnet restore -r ${{matrix.config.rid}} | ||
|
@@ -146,15 +136,15 @@ jobs: | |
dotnet-coverage merge -o coverage.unit.xml -f cobertura -r coverage/*.xml | ||
- name: Upload Coverage | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
if: matrix.config.name == 'x86_64-linux' | ||
with: | ||
name: nncase-coverage-unit | ||
path: coverage.unit.xml | ||
if-no-files-found: error | ||
|
||
- name: Upload nncase Build Artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nncase-${{matrix.config.name}} | ||
path: ${{github.workspace}}/src/Nncase.Compiler/bin/${{matrix.config.buildType}}/net${{matrix.dotnet-version}}/${{matrix.config.rid}}/publish | ||
|
@@ -168,85 +158,59 @@ jobs: | |
matrix: | ||
dotnet-version: ['7.0'] | ||
config: | ||
- {name: x86_64-macos, os: macos-12, shell: bash} | ||
- {name: x86_64-linux, os: ubuntu-latest, shell: bash} | ||
- {name: x86_64-windows, os: windows-2019, shell: bash} | ||
|
||
env: | ||
VULKANSDK_VER: 1.3.268.0 | ||
- {name: aarch64-macos, os: macos-14} | ||
- {name: x86_64-linux, os: ubuntu-24.04} | ||
- {name: x86_64-windows, os: windows-latest, arch: x64} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{matrix.dotnet-version}} | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
cache-dependency-path: '**/requirements.test.txt' | ||
|
||
- name: Install nncase native Artifact | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nncase-native-${{matrix.config.name}} | ||
path: ${{github.workspace}}/install | ||
|
||
- name: Install nncase | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nncase-${{matrix.config.name}} | ||
path: ${{github.workspace}}/install | ||
|
||
- name: Set up test environment (macOS) | ||
run: | | ||
brew install sunnycase/core/[email protected] | ||
aria2c --parameterized-uri=true https://{sdk.lunarg.com/sdk/download/${VULKANSDK_VER}/mac,distfiles.macports.org/MoltenVK}/vulkansdk-macos-${VULKANSDK_VER}.dmg | ||
hdiutil attach ./vulkansdk-macos-*.dmg | ||
sudo /Volumes/vulkansdk-macos-*/InstallVulkan.app/Contents/MacOS/InstallVulkan --root $HOME/VulkanSDK --accept-licenses --default-answer --confirm-command install | ||
hdiutil detach /Volumes/vulkansdk-macos-* | ||
echo "VULKAN_SDK=$HOME/VulkanSDK/macOS" >> $GITHUB_ENV | ||
wget https://github.com/sunnycase/swiftshader/releases/download/v1.0/swiftshader-macos-10.15-x86_64.zip -O swiftshader.zip | ||
unzip swiftshader.zip | ||
sudo cmake -E make_directory /usr/local/share/vulkan/icd.d | ||
sudo cp lib/* /usr/local/share/vulkan/icd.d | ||
cp install/lib/*.dylib install/ | ||
echo "PYTHONPATH=$GITHUB_WORKSPACE/install/lib:$GITHUB_WORKSPACE/install/python:$GITHUB_WORKSPACE/tests" >> $GITHUB_ENV | ||
if: runner.os == 'macOS' | ||
|
||
- name: Set up test environment (Linux) | ||
run: | | ||
wget https://sdk.lunarg.com/sdk/download/${VULKANSDK_VER}/linux/vulkansdk-linux-x86_64-${VULKANSDK_VER}.tar.xz -O vulkansdk.tar.xz | ||
tar xf vulkansdk.tar.xz | ||
sudo cp -P ${VULKANSDK_VER}/x86_64/lib/libvulkan.so* /usr/local/lib/ | ||
wget https://github.com/sunnycase/swiftshader/releases/download/v1.0/swiftshader-ubuntu-18.04-x86_64.zip -O swiftshader.zip | ||
unzip swiftshader.zip | ||
sudo cmake -E make_directory /usr/local/share/vulkan/icd.d | ||
sudo cp lib/* /usr/local/share/vulkan/icd.d | ||
cp install/lib/*.so install/ | ||
echo "PYTHONPATH=$GITHUB_WORKSPACE/install/lib:$GITHUB_WORKSPACE/install/python:$GITHUB_WORKSPACE/tests" >> $GITHUB_ENV | ||
if: runner.os == 'Linux' | ||
|
||
- name: Set up test environment (Windows) | ||
shell: pwsh | ||
run: | | ||
# Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/${env:VULKANSDK_VER}/windows/VulkanSDK-${env:VULKANSDK_VER}-Installer.exe -O VulkanSDK-Installer.exe | ||
# .\VulkanSDK-Installer.exe /S | ||
Invoke-WebRequest -Uri https://github.com/sunnycase/swiftshader/releases/download/v1.0/swiftshader-windows-2019-x86_64.zip -OutFile swiftshader.zip | ||
Expand-Archive swiftshader.zip | ||
Copy-Item swiftshader\lib\vk_swiftshader_icd.json swiftshader\bin\ | ||
Copy-Item install/bin/*.dll install/ | ||
echo "VK_ICD_FILENAMES=${env:GITHUB_WORKSPACE}/swiftshader/bin/vk_swiftshader_icd.json" >> $env:GITHUB_ENV | ||
echo "PYTHONPATH=${env:GITHUB_WORKSPACE}/install/lib;${env:GITHUB_WORKSPACE}/install/python;${env:GITHUB_WORKSPACE}/tests" >> $env:GITHUB_ENV | ||
Copy-Item install/lib/*.pyd install/bin/ | ||
echo "PYTHONPATH=${env:GITHUB_WORKSPACE}/install/bin;${env:GITHUB_WORKSPACE}/install/python;${env:GITHUB_WORKSPACE}/tests" >> $env:GITHUB_ENV | ||
echo "PATH=${env:PATH};${env:GITHUB_WORKSPACE}/install/bin" >> $env:GITHUB_ENV | ||
if: runner.os == 'Windows' | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
cache: 'pip' | ||
cache-dependency-path: '**/requirements.test.txt' | ||
|
||
- name: Install Python Packages | ||
run: | ||
# python -m pip install --upgrade "pip<24.0" #pip24 not available on 3.7 | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.test.txt | ||
- name: Create Test Environment | ||
|
@@ -263,12 +227,11 @@ jobs: | |
dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/onnx_combine.xml pytest tests/importer/onnx_/combine/ --doctest-modules --junitxml=test_results/onnx_combine.xml | ||
dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/tflite_basic.xml pytest tests/importer/tflite_/basic/ --doctest-modules --junitxml=test_results/tflite_basic.xml | ||
dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/tflite_combine.xml pytest tests/importer/tflite_/combine/ --doctest-modules --junitxml=test_results/tflite_combine.xml | ||
dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/tflite_model.xml pytest tests/importer/tflite_/model/ --doctest-modules --junitxml=test_results/tflite_model.xml | ||
dotnet-coverage collect -s tools/dotnet_coverage.settings.xml -f cobertura -o coverage/ncnn_basic.xml pytest tests/importer/ncnn_/basic/ --doctest-modules --junitxml=test_results/ncnn_basic.xml | ||
dotnet-coverage merge -o coverage.integration.xml -f cobertura -r coverage/*.xml | ||
- name: Upload Coverage | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
if: matrix.config.name == 'x86_64-linux' | ||
with: | ||
name: nncase-coverage-integration | ||
|
@@ -289,16 +252,16 @@ jobs: | |
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: "7.0" | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Download Unit Test Coverage | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nncase-coverage-unit | ||
path: ${{github.workspace}}/coverage | ||
|
||
- name: Download Integration Test Coverage | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nncase-coverage-integration | ||
path: ${{github.workspace}}/coverage | ||
|
@@ -323,7 +286,7 @@ jobs: | |
reportgenerator -reports:coverage.xml -targetdir:"coveragereport" -reporttypes:Html | ||
- name: Upload Coverage Report | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nncase-coverage-report | ||
path: coveragereport | ||
|
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,16 +14,16 @@ jobs: | |
matrix: | ||
dotnet-version: ['7.0'] | ||
config: | ||
- {name: x86_64-macos, os: macos-12, shell: bash, rid: osx-x64, buildType: Release} | ||
- {name: x86_64-linux, os: ubuntu-latest, shell: bash, rid: linux-x64, buildType: Release} | ||
- {name: x86_64-windows, os: windows-2019, shell: bash, rid: win-x64, buildType: Release} | ||
- {name: aarch64-macos, os: macos-14, shell: bash, rid: osx-arm64, buildType: Release} | ||
- {name: x86_64-linux, os: ubuntu-24.04, shell: bash, rid: linux-x64, buildType: Release} | ||
- {name: x86_64-windows, os: windows-latest, shell: bash, rid: win-x64, buildType: Release} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{matrix.dotnet-version}} | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Cache NuGet packages | ||
uses: actions/cache@v3 | ||
|
@@ -39,7 +39,7 @@ jobs: | |
dotnet publish src/Nncase.Compiler -c ${{matrix.config.buildType}} --no-restore --sc false -r ${{matrix.config.rid}} | ||
- name: Upload nncase Build Artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nncase-${{matrix.config.name}} | ||
path: ${{github.workspace}}/src/Nncase.Compiler/bin/${{matrix.config.buildType}}/net${{matrix.dotnet-version}}/${{matrix.config.rid}}/publish | ||
|
@@ -53,23 +53,22 @@ jobs: | |
matrix: | ||
dotnet-version: ['7.0'] | ||
config: | ||
- {name: x86_64-macos, os: macos-12} | ||
- {name: x86_64-linux, os: ubuntu-latest} | ||
- {name: x86_64-windows, os: windows-2019, arch: x64} | ||
|
||
env: | ||
VULKANSDK_VER: 1.3.268.0 | ||
- {name: aarch64-macos, os: macos-14} | ||
- {name: x86_64-linux, os: ubuntu-24.04} | ||
- {name: x86_64-windows, os: windows-latest, arch: x64} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: seanmiddleditch/gha-setup-ninja@master | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{matrix.dotnet-version}} | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Install nncase | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: nncase-${{matrix.config.name}} | ||
path: ${{github.workspace}}/install | ||
|
@@ -80,24 +79,19 @@ jobs: | |
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 | ||
python-version: '3.10' | ||
|
||
- name: Install cibuildwheel | ||
run: pip install cibuildwheel | ||
|
||
- name: Build wheel | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
|
||
- name: Upload nncase-python Build Artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nncase-python-${{matrix.config.name}} | ||
path: ${{github.workspace}}/wheelhouse | ||
|
Oops, something went wrong.