-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Python ncnn with vulkan #5020
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
Merged
Merged
Python ncnn with vulkan #5020
Changes from 62 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
ebd13e1
prepare for building wheels with vulkan
Hideousmon 15cf5e7
Merge pull request #1 from Hideousmon/compile-vulkan-in-ncnn-python-s…
Hideousmon a6b57e9
Update setup.py
Hideousmon 870483c
Merge pull request #2 from Hideousmon/compile-vulkan-in-ncnn-python-s…
Hideousmon c81d928
Merge branch 'Tencent:master' into master
Hideousmon 0293b09
Merge branch 'Tencent:master' into compile-vulkan-in-ncnn-python-setup
Hideousmon f5e173c
enable the usage of humbletim/install-vulkan-sdk in ci
Hideousmon 8d0a94a
Merge pull request #3 from Hideousmon/compile-vulkan-in-ncnn-python-s…
Hideousmon ef41cc6
Merge branch 'Tencent:master' into master
Hideousmon 2858b15
Merge branch 'Tencent:master' into compile-vulkan-in-ncnn-python-setup
Hideousmon 41304d2
Update setup.py
Hideousmon 41d32f7
Merge branch 'compile-vulkan-in-ncnn-python-setup' of https://github.…
Hideousmon 4bb60b8
Merge pull request #4 from Hideousmon/compile-vulkan-in-ncnn-python-s…
Hideousmon 6ceb849
Update CMakeLists.txt
Hideousmon 66a3f93
Merge pull request #5 from Hideousmon/compile-vulkan-in-ncnn-python-s…
Hideousmon 99c4193
Update CMakeLists.txt
Hideousmon 1237b51
Merge pull request #6 from Hideousmon/compile-vulkan-in-ncnn-python-s…
Hideousmon 221d420
Update CMakeLists.txt
Hideousmon 654d80c
Merge pull request #7 from Hideousmon/compile-vulkan-in-ncnn-python-s…
Hideousmon 0be4e5f
Update CMakeLists.txt
Hideousmon 7fabdc2
Update CMakeLists.txt
Hideousmon 34d9a58
Update CMakeLists.txt
Hideousmon 796bedb
Update CMakeLists.txt
Hideousmon 94f55a0
Update CMakeLists.txt
Hideousmon 64742c6
Update CMakeLists.txt
Hideousmon 069c14f
Update CMakeLists.txt
Hideousmon 11504f6
Update CMakeLists.txt
Hideousmon ae748cd
Update setup.py
Hideousmon e08f283
Update CMakeLists.txt
Hideousmon e10a724
Update CMakeLists.txt
Hideousmon 74d2fb3
Update CMakeLists.txt
Hideousmon 415e9c8
Update CMakeLists.txt
Hideousmon 35a697f
Update CMakeLists.txt
Hideousmon 1449d95
Update CMakeLists.txt
Hideousmon 4f625c2
Update CMakeLists.txt
Hideousmon 80aabab
Update CMakeLists.txt
Hideousmon 7cce53f
Update CMakeLists.txt
Hideousmon 4931b01
Update CMakeLists.txt
Hideousmon 51a9f28
Update CMakeLists.txt
Hideousmon 7a2e9ce
remove ncnn_ci_vulkan option
Hideousmon 251d506
Merge branch 'Tencent:master' into master
Hideousmon 41695ef
update setup.py
Hideousmon 9d6a74a
release test
Hideousmon 24c20a2
release test
Hideousmon bf5355e
release test
Hideousmon 03a13ba
release test
Hideousmon 1a69520
Merge branch 'Tencent:master' into master
Hideousmon 4728a61
Update release-python.yml
Hideousmon 9b08e27
remove blank lines
Hideousmon 368e4ea
Merge branch 'Tencent:master' into python-ncnn-with-vulkan
Hideousmon 4121f27
try to add link for windows x86
Hideousmon 087ef00
Merge branch 'Tencent:master' into python-ncnn-with-vulkan
Hideousmon e003678
release python test
Hideousmon 0ed0665
remove blank lines
Hideousmon bb03518
Update release-python.yml
Hideousmon 6cf2662
fix the name of a step in actions
Hideousmon 1fa5f2c
Merge branch 'Tencent:master' into python-ncnn-with-vulkan
Hideousmon d0f1ff0
pass on all platforms
Hideousmon a966dda
vulkan-loader with release build
Hideousmon 6d64456
python setup.py install --vulkan=on
Hideousmon 7e9ed71
Merge branch 'master' into python-ncnn-with-vulkan
Hideousmon b7d7e42
moltenVK for x86_64 macos
Hideousmon 7c1674b
revise for building universal2
Hideousmon 478ee41
remove universal2 temporarily
Hideousmon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -5,6 +5,14 @@ on: | |
| tags: | ||
| - '*' | ||
|
|
||
| env: | ||
| DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer | ||
| MAC_DEPLOYMENT_TARGET: '10.9' | ||
| MAC_ARM64_DEPLOYMENT_TARGET: '11.0' | ||
| ENABLE_BITCODE: OFF | ||
| ENABLE_ARC: OFF | ||
| ENABLE_VISIBILITY: OFF | ||
|
|
||
| jobs: | ||
| build_sdist: | ||
| name: Build SDist | ||
|
|
@@ -62,20 +70,224 @@ jobs: | |
| with: | ||
| python-version: '3.x' | ||
|
|
||
| - name: brew uninstall libomp | ||
| # build wheels for ubuntu-20.04 | ||
| - name: Build wheels for ubuntu manylinux | ||
| if: matrix.os == 'ubuntu-20.04' && matrix.build != 'cp*-musllinux*' | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON | ||
| VULKAN_SDK=/project/Vulkan-Loader/build/Vulkan-Headers | ||
| LD_LIBRARY_PATH=/project/Vulkan-Loader/build/loader | ||
| CIBW_BEFORE_ALL: yum -y install libXrandr-devel && | ||
| git clone https://github.com/KhronosGroup/Vulkan-Loader.git && | ||
| cd Vulkan-Loader && mkdir build && cd build && | ||
| ../scripts/update_deps.py && | ||
| cmake -DCMAKE_BUILD_TYPE=Release -DVULKAN_HEADERS_INSTALL_DIR=$(pwd)/Vulkan-Headers/build/install .. && | ||
| make -j$(nproc) && | ||
| cd Vulkan-Headers && | ||
| ln -s ../loader lib | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| - name: Build wheels for ubuntu musllinux | ||
| if: matrix.os == 'ubuntu-20.04' && matrix.build == 'cp*-musllinux*' | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON | ||
| VULKAN_SDK=/project/Vulkan-Loader/build/Vulkan-Headers | ||
| LD_LIBRARY_PATH=/project/Vulkan-Loader/build/loader | ||
| CIBW_BEFORE_ALL: apk add libxrandr-dev && | ||
| git clone https://github.com/KhronosGroup/Vulkan-Loader.git && | ||
| cd Vulkan-Loader && mkdir build && cd build && | ||
| ../scripts/update_deps.py && | ||
| cmake -DCMAKE_BUILD_TYPE=Release -DVULKAN_HEADERS_INSTALL_DIR=$(pwd)/Vulkan-Headers/build/install .. && | ||
| make -j$(nproc) && | ||
| cd Vulkan-Headers && | ||
| ln -s ../loader lib | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| # build wheels for windows-2019 | ||
| - name: Build wheels for windows amd64 | ||
| if: matrix.os == 'windows-2019' && matrix.arch == 'AMD64' | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_WINDOWS: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT_WINDOWS: > | ||
| PATH="D:\\a\\ncnn\\ncnn\\Vulkan-Loader\\build\\loader\\Release;$PATH" | ||
| CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON | ||
| VULKAN_SDK=D:/a/ncnn/ncnn/Vulkan-Loader/external/Vulkan-Headers | ||
| CIBW_BEFORE_ALL: git clone https://github.com/KhronosGroup/Vulkan-Loader.git && | ||
| cd Vulkan-Loader && mkdir build && cd build && | ||
| python3 ../scripts/update_deps.py --dir ../external --config release && | ||
| cmake -C ../external/helper.cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release .. && | ||
| cmake --build . --config Release && | ||
| mklink /d "D:/a/ncnn/ncnn/Vulkan-Loader/external/Vulkan-Headers/build/install/lib" | ||
| "D:/a/ncnn/ncnn/Vulkan-Loader/build/loader/Release" | ||
| CIBW_BEFORE_BUILD: pip install delvewheel | ||
| CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair -w {dest_dir} {wheel} | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| - name: Build wheels for windows x86 | ||
| if: matrix.os == 'windows-2019' && matrix.arch == 'x86' | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_WINDOWS: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT_WINDOWS: > | ||
| PATH="D:\\a\\ncnn\\ncnn\\Vulkan-Loader\\build\\loader\\Release;$PATH" | ||
| CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON | ||
| VULKAN_SDK=D:/a/ncnn/ncnn/Vulkan-Loader/external/Vulkan-Headers | ||
| CIBW_BEFORE_ALL: git clone https://github.com/KhronosGroup/Vulkan-Loader.git && | ||
| cd Vulkan-Loader && mkdir build && cd build && | ||
| python3 ../scripts/update_deps.py --dir ../external --arch ${{ matrix.arch }} --config release && | ||
| cmake -C ../external/helper.cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE=Release .. && | ||
| cmake --build . --config Release && | ||
| mklink /d "D:/a/ncnn/ncnn/Vulkan-Loader/external/Vulkan-Headers/build/install/lib" | ||
| "D:/a/ncnn/ncnn/Vulkan-Loader/build/loader/Release" | ||
| CIBW_BEFORE_BUILD: pip install delvewheel | ||
| CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair -w {dest_dir} {wheel} | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| - name: Build wheels for windows ARM64 | ||
| if: matrix.os == 'windows-2019' && matrix.arch == 'ARM64' | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_WINDOWS: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT_WINDOWS: > | ||
| PATH="D:\\a\\ncnn\\ncnn\\Vulkan-Loader\\build\\loader\\Release;$PATH" | ||
| CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON | ||
| VULKAN_SDK=D:/a/ncnn/ncnn/Vulkan-Loader/external/Vulkan-Headers | ||
| CIBW_BEFORE_ALL: git clone https://github.com/KhronosGroup/Vulkan-Loader.git && | ||
| cd Vulkan-Loader && mkdir build && cd build && | ||
| python3 ../scripts/update_deps.py --dir ../external --config release && | ||
| cmake -C ../external/helper.cmake -G "Visual Studio 16 2019" -A ARM64 -DCMAKE_BUILD_TYPE=Release -DUSE_MASM=OFF .. && | ||
| cmake --build . --config Release && | ||
| mklink /d "D:/a/ncnn/ncnn/Vulkan-Loader/external/Vulkan-Headers/build/install/lib" | ||
| "D:/a/ncnn/ncnn/Vulkan-Loader/build/loader/Release" | ||
| CIBW_BEFORE_BUILD: pip install delvewheel | ||
| CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair -w {dest_dir} {wheel} --no-dll "msvcp140.dll;vcomp140.dll" | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| # build wheels for macos-latest | ||
| - name: cache-openmp for macos | ||
| if: matrix.os == 'macos-latest' | ||
| id: cache-openmp | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: openmp-install | ||
| key: openmp-macos-install-20230504 | ||
|
|
||
| - name: openmp for macos | ||
| if: matrix.os == 'macos-latest' && steps.cache-openmp.outputs.cache-hit != 'true' | ||
| run: | | ||
| brew uninstall --ignore-dependencies libomp | ||
| wget https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/openmp-11.0.0.src.tar.xz | ||
| tar -xf openmp-11.0.0.src.tar.xz | ||
| cd openmp-11.0.0.src | ||
| sed -i'' -e '/.size __kmp_unnamed_critical_addr/d' runtime/src/z_Linux_asm.S | ||
| sed -i'' -e 's/__kmp_unnamed_critical_addr/___kmp_unnamed_critical_addr/g' runtime/src/z_Linux_asm.S | ||
|
|
||
| - name: Build wheels | ||
| - name: openmp-build-x86_64 for macos | ||
| if: matrix.os == 'macos-latest' && steps.cache-openmp.outputs.cache-hit != 'true' | ||
| run: | | ||
| cd openmp-11.0.0.src | ||
| mkdir -p build-x86_64 && cd build-x86_64 | ||
| cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/toolchains/ios.toolchain.cmake -DPLATFORM=MAC -DARCHS="x86_64" \ | ||
| -DDEPLOYMENT_TARGET=$MAC_DEPLOYMENT_TARGET -DENABLE_BITCODE=$ENABLE_BITCODE -DENABLE_ARC=$ENABLE_ARC -DENABLE_VISIBILITY=$ENABLE_VISIBILITY \ | ||
| -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install \ | ||
| -DPERL_EXECUTABLE=/usr/local/bin/perl \ | ||
| -DLIBOMP_ENABLE_SHARED=OFF -DLIBOMP_OMPT_SUPPORT=OFF -DLIBOMP_USE_HWLOC=OFF .. | ||
| cmake --build . -j 3 | ||
| cmake --build . --target install | ||
|
|
||
| - name: openmp-build-arm64 for macos | ||
| if: matrix.os == 'macos-latest' && steps.cache-openmp.outputs.cache-hit != 'true' | ||
| run: | | ||
| cd openmp-11.0.0.src | ||
| mkdir -p build-arm64 && cd build-arm64 | ||
| cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/toolchains/ios.toolchain.cmake -DPLATFORM=MAC_ARM64 -DARCHS="arm64" \ | ||
| -DDEPLOYMENT_TARGET=$MAC_ARM64_DEPLOYMENT_TARGET -DENABLE_BITCODE=$ENABLE_BITCODE -DENABLE_ARC=$ENABLE_ARC -DENABLE_VISIBILITY=$ENABLE_VISIBILITY \ | ||
| -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install \ | ||
| -DPERL_EXECUTABLE=/usr/local/bin/perl \ | ||
| -DLIBOMP_ENABLE_SHARED=OFF -DLIBOMP_OMPT_SUPPORT=OFF -DLIBOMP_USE_HWLOC=OFF .. | ||
| cmake --build . -j 3 | ||
| cmake --build . --target install | ||
|
|
||
| - name: openmp-merge-fat-library for macos | ||
| if: matrix.os == 'macos-latest' && steps.cache-openmp.outputs.cache-hit != 'true' | ||
| run: | | ||
| mkdir -p $GITHUB_WORKSPACE/openmp-install | ||
| cp -a openmp-11.0.0.src/build-x86_64/install/include $GITHUB_WORKSPACE/openmp-install | ||
| mkdir -p $GITHUB_WORKSPACE/openmp-install/lib | ||
| lipo -create \ | ||
| openmp-11.0.0.src/build-x86_64/install/lib/libomp.a \ | ||
| openmp-11.0.0.src/build-arm64/install/lib/libomp.a \ | ||
| -o $GITHUB_WORKSPACE/openmp-install/lib/libomp.a | ||
|
|
||
| - name: install-openmp for macos | ||
| if: matrix.os == 'macos-latest' | ||
| run: | | ||
| sudo cp $GITHUB_WORKSPACE/openmp-install/include/* $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include | ||
| sudo cp $GITHUB_WORKSPACE/openmp-install/lib/libomp.a $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib | ||
|
|
||
| - name: vulkansdk for macos | ||
| if: matrix.os == 'macos-latest' | ||
| run: | | ||
| wget https://sdk.lunarg.com/sdk/download/1.3.236.0/mac/vulkansdk-macos-1.3.236.0.dmg?Human=true -O vulkansdk-macos-1.3.236.0.dmg | ||
| hdiutil attach vulkansdk-macos-1.3.236.0.dmg | ||
| sudo /Volumes/vulkansdk-macos-1.3.236.0/InstallVulkan.app/Contents/MacOS/InstallVulkan --root $GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0 --accept-licenses --default-answer --confirm-command install | ||
| hdiutil detach /Volumes/vulkansdk-macos-1.3.236.0 | ||
|
|
||
| - name: Build wheels for macos x86_64 | ||
| if: matrix.os == 'macos-latest' && matrix.arch == 'x86_64' | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_MACOS: ${{ matrix.arch }} | ||
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
| CIBW_ARCHS_WINDOWS: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON VULKAN_SDK=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/macOS | ||
| CMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/toolchains/ios.toolchain.cmake PLATFORM=MAC ARCHS="x86_64" | ||
| DEPLOYMENT_TARGET="10.9" ENABLE_BITCODE=OFF ENABLE_ARC=OFF ENABLE_VISIBILITY=OFF | ||
| OpenMP_C_FLAGS="-Xclang -fopenmp" OpenMP_CXX_FLAGS="-Xclang -fopenmp" | ||
| OpenMP_C_LIB_NAMES="libomp" OpenMP_CXX_LIB_NAMES="libomp" | ||
| OpenMP_libomp_LIBRARY="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libomp.a" | ||
| Vulkan_INCLUDE_DIR=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/MoltenVK/include | ||
| Vulkan_LIBRARY=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/MoltenVK/dylib/macOS/libMoltenVK.dylib | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| - name: Build wheels for macos arm64 and macos universal2 | ||
| if: (matrix.os == 'macos-latest' && matrix.arch == 'arm64') || | ||
| (matrix.os == 'macos-latest' && matrix.arch == 'universal2') | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_MACOS: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON VULKAN_SDK=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/macOS | ||
| CMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/toolchains/ios.toolchain.cmake PLATFORM=MAC_ARM64 ARCHS="arm64" | ||
| DEPLOYMENT_TARGET="11.0" ENABLE_BITCODE=OFF ENABLE_ARC=OFF ENABLE_VISIBILITY=OFF | ||
| OpenMP_C_FLAGS="-Xclang -fopenmp" OpenMP_CXX_FLAGS="-Xclang -fopenmp" | ||
| OpenMP_C_LIB_NAMES="libomp" OpenMP_CXX_LIB_NAMES="libomp" | ||
| OpenMP_libomp_LIBRARY="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libomp.a" | ||
| Vulkan_INCLUDE_DIR=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/MoltenVK/include | ||
| Vulkan_LIBRARY=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.236.0/MoltenVK/dylib/macOS/libMoltenVK.dylib | ||
| with: | ||
| output-dir: wheelhouse | ||
Hideousmon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Show files | ||
| run: ls -lh wheelhouse | ||
|
|
@@ -98,7 +310,11 @@ jobs: | |
| fail-fast: false | ||
| matrix: | ||
| arch: [aarch64, ppc64le, s390x] | ||
| build: ['cp36-*', 'cp37-*', 'cp38-*', 'cp39-*', 'cp310-*', 'cp311-*', 'cp312-*'] | ||
| build: [ 'cp36-manylinux*', 'cp37-manylinux*', 'cp38-manylinux*', | ||
| 'cp39-manylinux*', 'cp310-manylinux*', 'cp311-manylinux*', | ||
| 'cp312-manylinux*', 'cp36-musllinux*', 'cp37-musllinux*', | ||
| 'cp38-musllinux*', 'cp39-musllinux*', 'cp310-musllinux*', | ||
| 'cp311-musllinux*', 'cp312-musllinux*' ] | ||
| include: | ||
| - arch: aarch64 | ||
| build: 'pp37-*' | ||
|
|
@@ -123,13 +339,50 @@ jobs: | |
| with: | ||
| platforms: all | ||
|
|
||
| - name: Build wheels | ||
| - name: Build wheels for manylinux with qemu | ||
| if: (matrix.build != 'cp36-musllinux*') && (matrix.build != 'cp37-musllinux*') && | ||
| (matrix.build != 'cp38-musllinux*') && (matrix.build != 'cp39-musllinux*') && | ||
| (matrix.build != 'cp310-musllinux*') && (matrix.build != 'cp311-musllinux*') && | ||
| (matrix.build != 'cp312-musllinux*') | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON VULKAN_SDK=/project/Vulkan-Loader/build/Vulkan-Headers | ||
| LD_LIBRARY_PATH=/project/Vulkan-Loader/build/loader | ||
| CIBW_BEFORE_ALL: yum -y install libXrandr-devel && | ||
| git clone https://github.com/KhronosGroup/Vulkan-Loader.git && | ||
| cd Vulkan-Loader && mkdir build && cd build && | ||
| ../scripts/update_deps.py && | ||
| cmake -DCMAKE_BUILD_TYPE=Release -DVULKAN_HEADERS_INSTALL_DIR=$(pwd)/Vulkan-Headers/build/install .. && | ||
| make -j$(nproc) && | ||
| cd Vulkan-Headers && | ||
| ln -s ../loader lib | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| - name: Build wheels for musllinux with qemu | ||
| if: (matrix.build == 'cp36-musllinux*') || (matrix.build == 'cp37-musllinux*') || | ||
| (matrix.build == 'cp38-musllinux*') || (matrix.build == 'cp39-musllinux*') || | ||
| (matrix.build == 'cp310-musllinux*') || (matrix.build == 'cp311-musllinux*') || | ||
| (matrix.build == 'cp312-musllinux*') | ||
| uses: pypa/[email protected] | ||
| env: | ||
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
| CIBW_BUILD: ${{ matrix.build }} | ||
| CIBW_BUILD_VERBOSITY: 1 | ||
| CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2 NCNN_VULKAN=ON VULKAN_SDK=/project/Vulkan-Loader/build/Vulkan-Headers LD_LIBRARY_PATH=/project/Vulkan-Loader/build/loader | ||
| CIBW_BEFORE_ALL: apk add libxrandr-dev && | ||
| git clone https://github.com/KhronosGroup/Vulkan-Loader.git && | ||
| cd Vulkan-Loader && mkdir build && cd build && | ||
| ../scripts/update_deps.py && | ||
| cmake -DCMAKE_BUILD_TYPE=Release -DVULKAN_HEADERS_INSTALL_DIR=$(pwd)/Vulkan-Headers/build/install .. && | ||
| make -j$(nproc) && | ||
| cd Vulkan-Headers && | ||
| ln -s ../loader lib | ||
| with: | ||
| output-dir: wheelhouse | ||
|
|
||
| - name: Show files | ||
| run: ls -lh wheelhouse | ||
|
|
||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.