diff --git a/.circleci/config.yml b/.circleci/config.yml index 7d4d7eb7..eaec4fc3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,19 +1,13 @@ # https://circleci.com/docs/2.0/configuration-reference version: 2.1 -orbs: - aws-cli: circleci/aws-cli@5.1.0 # https://circleci.com/developer/orbs/orb/circleci/aws-cli - android: circleci/android@2.5.0 +orbs: # https://circleci.com/developer/orbs + aws-cli: circleci/aws-cli@5 + android: circleci/android@3 workflows: overlay: jobs: - - x64_linux: - filters: - branches: - ignore: - - gh-pages - - docs - arm64_android: filters: branches: @@ -22,70 +16,9 @@ workflows: - docs jobs: - x64_linux: - machine: - image: ubuntu-2204:current - resource_class: large - environment: - VCPKG_DOWNLOADS: /tmp/vcpkg-caches - VCPKG_DEFAULT_BINARY_CACHE: /tmp/vcpkg-caches - steps: - - checkout - - aws-cli/setup # check project variables - - run: - name: "Setup: microsoft/vcpkg(2024.08.23)" - command: | - sudo apt-get update -y -q - sudo apt-get install -y -q curl zip unzip tar - mkdir -p $VCPKG_DOWNLOADS - mkdir -p $VCPKG_DEFAULT_BINARY_CACHE - git clone --branch=2024.08.23 --depth=1 https://github.com/microsoft/vcpkg - pushd vcpkg - ./bootstrap-vcpkg.sh - ./vcpkg --version - popd - pwd - - restore_cache: - keys: - - v2435-linux-{{ checksum ".circleci/config.yml" }} - - v2435-linux-{{ .Branch }} - - v2435-linux-main - - run: - name: "Install APT packages" - command: | - sudo apt-get install -y --fix-missing \ - ninja-build nasm # g++-12 libstdc++-12-dev - - run: - name: "Install: port-linux.txt" - command: | - ./vcpkg install \ - --keep-going --recurse \ - --clean-buildtrees-after-build \ - --clean-packages-after-build \ - --overlay-ports "$(pwd)/../ports" \ - --overlay-triplets "$(pwd)/../triplets" \ - $(cat "$(pwd)/../.circleci/port-linux.txt") - environment: - VCPKG_DEFAULT_TRIPLET: x64-linux - # CC: gcc-12 - # CXX: g++-12 - working_directory: vcpkg - no_output_timeout: 1h - - save_cache: - key: v2435-linux-{{ .Branch }} - paths: - - /tmp/vcpkg-caches - - save_cache: - key: v2435-linux-{{ checksum ".circleci/config.yml" }} - paths: - - /tmp/vcpkg-caches - - store_artifacts: - path: vcpkg/buildtrees/ - destination: "build-logs" - arm64_android: docker: # https://circleci.com/developer/images/image/cimg/android - - image: cimg/android:2024.09.1-ndk # 27.0.12077973 + - image: cimg/android:2024.11.1-ndk # 28.0.12433566 resource_class: large environment: VCPKG_DOWNLOADS: /tmp/vcpkg-caches @@ -93,15 +26,17 @@ jobs: steps: - checkout - aws-cli/setup # check project variables - - android/accept-licenses + - android/accept_licenses + - android/change_java_version: + java_version: 17 - run: - name: "Setup: microsoft/vcpkg(2024.08.23)" + name: "Setup: microsoft/vcpkg(2024.10.21)" command: | sudo apt-get update -y -q sudo apt-get install -y -q curl zip unzip tar mkdir -p $VCPKG_DOWNLOADS mkdir -p $VCPKG_DEFAULT_BINARY_CACHE - git clone --branch=2024.08.23 --depth=1 https://github.com/microsoft/vcpkg + git clone --branch=2024.10.21 --depth=1 https://github.com/microsoft/vcpkg pushd vcpkg ./bootstrap-vcpkg.sh popd @@ -109,8 +44,13 @@ jobs: working_directory: /tmp environment: VCPKG_ROOT: /tmp/vcpkg + - restore_cache: + keys: + - v2445-android-{{ checksum ".circleci/config.yml" }} + - v2445-android-{{ .Branch }} + - v2445-android-main - run: - name: "Install: azure-port-android.txt" + name: "Install: port-android.txt" command: | vcpkg --version vcpkg install \ @@ -120,12 +60,20 @@ jobs: --clean-packages-after-build \ --overlay-ports "$(pwd)/ports" \ --overlay-triplets "$(pwd)/triplets" \ - $(cat "$(pwd)/test/azure-port-android.txt") + $(cat "$(pwd)/.circleci/port-android.txt") environment: VCPKG_ROOT: /tmp/vcpkg VCPKG_DEFAULT_TRIPLET: arm64-android VCPKG_MAX_CONCURRENCY: 2 no_output_timeout: 1h + - save_cache: + key: v2445-android-{{ .Branch }} + paths: + - /tmp/vcpkg-caches + - save_cache: + key: v2445-android-{{ checksum ".circleci/config.yml" }} + paths: + - /tmp/vcpkg-caches - store_artifacts: path: buildtrees/ # follow --x-buildtrees-root destination: "build-logs" diff --git a/test/azure-port-android.txt b/.circleci/port-android.txt similarity index 100% rename from test/azure-port-android.txt rename to .circleci/port-android.txt diff --git a/.circleci/port-linux.txt b/.circleci/port-linux.txt deleted file mode 100644 index 43fa892d..00000000 --- a/.circleci/port-linux.txt +++ /dev/null @@ -1,7 +0,0 @@ -protobuf -grpc[codegen] -flatbuffers -abseil -liblzma -onnx[disable-static-registration] -onnxruntime[training] diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index a035da3f..5396d2fa 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -19,19 +19,15 @@ jobs: strategy: matrix: include: - - vcpkg_tag: "2024.06.15" - vcpkg_commit: "f7423ee180c4b7f40d43402c2feb3859161ef625" - - vcpkg_tag: "2024.07.12" - vcpkg_commit: "1de2026f28ead93ff1773e6e680387643e914ea1" - - vcpkg_tag: "2024.08.23" - vcpkg_commit: "3508985146f1b1d248c67ead13f8f54be5b4f5da" + - vcpkg_tag: "2024.10.21" + vcpkg_commit: "10b7a178346f3f0abef60cecd5130e295afd8da4" fail-fast: false env: VCPKG_FEATURE_FLAGS: "registries,binarycaching,manifests,versions" VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports" VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/triplets steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - uses: ConorMacBride/install-package@v1.1.0 with: brew: autoconf automake libtool @@ -44,9 +40,9 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ap-northeast-2 + aws-region: ${{ secrets.AWS_REGION }} - - uses: actions/cache@v4.0.2 + - uses: actions/cache@v4.1.2 with: key: "v2432-${{ runner.os }}-${{ matrix.vcpkg_tag }}" path: | diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 148aa976..96319aea 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -19,19 +19,15 @@ jobs: strategy: matrix: include: - - vcpkg_tag: "2024.06.15" - vcpkg_commit: "f7423ee180c4b7f40d43402c2feb3859161ef625" - - vcpkg_tag: "2024.07.12" - vcpkg_commit: "1de2026f28ead93ff1773e6e680387643e914ea1" - - vcpkg_tag: "2024.08.23" - vcpkg_commit: "3508985146f1b1d248c67ead13f8f54be5b4f5da" + - vcpkg_tag: "2024.10.21" + vcpkg_commit: "10b7a178346f3f0abef60cecd5130e295afd8da4" fail-fast: false env: VCPKG_FEATURE_FLAGS: "registries,binarycaching,manifests,versions" VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports" VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets" steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - uses: ConorMacBride/install-package@v1.1.0 with: apt: nuget nasm libnuma-dev libopenmpi-dev libx11-dev libxi-dev libxext-dev libx11-xcb-dev @@ -40,9 +36,9 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ap-northeast-2 + aws-region: ${{ secrets.AWS_REGION }} - - uses: actions/cache@v4.0.2 + - uses: actions/cache@v4.1.2 with: key: "v2432-${{ runner.os }}-${{ matrix.vcpkg_tag }}" path: | diff --git a/.github/workflows/build-windows-hosted.yml b/.github/workflows/build-windows-hosted.yml index 5c1c079d..c4432305 100644 --- a/.github/workflows/build-windows-hosted.yml +++ b/.github/workflows/build-windows-hosted.yml @@ -21,20 +21,20 @@ jobs: strategy: matrix: include: - - vcpkg_tag: "2024.06.15" - vcpkg_commit: "f7423ee180c4b7f40d43402c2feb3859161ef625" - vcpkg_tag: "2024.07.12" vcpkg_commit: "1de2026f28ead93ff1773e6e680387643e914ea1" - vcpkg_tag: "2024.08.23" vcpkg_commit: "3508985146f1b1d248c67ead13f8f54be5b4f5da" - - vcpkg_tag: "2024.09.23" - vcpkg_commit: "f176b58f35a75f9f8f54099cd9df97d2e2793a2e" + - vcpkg_tag: "2024.09.30" + vcpkg_commit: "c82f74667287d3dc386bce81e44964370c91a289" + - vcpkg_tag: "2024.10.21" + vcpkg_commit: "10b7a178346f3f0abef60cecd5130e295afd8da4" fail-fast: false env: VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports" VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets" steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - uses: microsoft/setup-msbuild@v2 with: msbuild-architecture: x64 @@ -103,18 +103,16 @@ jobs: strategy: matrix: include: - - vcpkg_tag: "2024.06.15" - vcpkg_commit: "f7423ee180c4b7f40d43402c2feb3859161ef625" - - vcpkg_tag: "2024.08.23" - vcpkg_commit: "3508985146f1b1d248c67ead13f8f54be5b4f5da" - - vcpkg_tag: "2024.09.23" - vcpkg_commit: "f176b58f35a75f9f8f54099cd9df97d2e2793a2e" + - vcpkg_tag: "2024.09.30" + vcpkg_commit: "c82f74667287d3dc386bce81e44964370c91a289" + - vcpkg_tag: "2024.10.21" + vcpkg_commit: "10b7a178346f3f0abef60cecd5130e295afd8da4" fail-fast: false env: VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports" VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets" steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - uses: microsoft/setup-msbuild@v2 with: msbuild-architecture: x64 @@ -168,18 +166,16 @@ jobs: strategy: matrix: include: - - vcpkg_tag: "2024.06.15" - vcpkg_commit: "f7423ee180c4b7f40d43402c2feb3859161ef625" - - vcpkg_tag: "2024.08.23" - vcpkg_commit: "3508985146f1b1d248c67ead13f8f54be5b4f5da" - - vcpkg_tag: "2024.09.23" - vcpkg_commit: "f176b58f35a75f9f8f54099cd9df97d2e2793a2e" + - vcpkg_tag: "2024.09.30" + vcpkg_commit: "c82f74667287d3dc386bce81e44964370c91a289" + - vcpkg_tag: "2024.10.21" + vcpkg_commit: "10b7a178346f3f0abef60cecd5130e295afd8da4" fail-fast: false env: VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports" VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets" steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - uses: microsoft/setup-msbuild@v2 with: msbuild-architecture: x64 diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 264b072a..78605cca 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -19,19 +19,15 @@ jobs: strategy: matrix: include: - - vcpkg_tag: "2024.06.15" - vcpkg_commit: "f7423ee180c4b7f40d43402c2feb3859161ef625" - - vcpkg_tag: "2024.07.12" - vcpkg_commit: "1de2026f28ead93ff1773e6e680387643e914ea1" - - vcpkg_tag: "2024.08.23" - vcpkg_commit: "3508985146f1b1d248c67ead13f8f54be5b4f5da" + - vcpkg_tag: "2024.10.21" + vcpkg_commit: "10b7a178346f3f0abef60cecd5130e295afd8da4" fail-fast: false env: VCPKG_FEATURE_FLAGS: "registries,binarycaching,manifests,versions" VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports" VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets" steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - uses: microsoft/setup-msbuild@v2 with: msbuild-architecture: x64 @@ -40,12 +36,12 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ap-northeast-2 + aws-region: ${{ secrets.AWS_REGION }} - name: "Enalbe LongPath" run: git config --system core.longpaths true - - uses: actions/cache@v4.0.2 + - uses: actions/cache@v4.1.2 with: key: "v2432-${{ runner.os }}-${{ matrix.vcpkg_tag }}" path: | diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ffc6d7ea..042eade5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_TOKEN }} steps: - - uses: actions/checkout@v4.2.0 + - uses: actions/checkout@v4.2.2 - name: "Run gh(auth)" run: | diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c7725f3f..12b3bd3c 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -27,8 +27,8 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - - uses: actions/checkout@v4.2.0 - - uses: actions/setup-python@v5.2.0 + - uses: actions/checkout@v4.2.2 + - uses: actions/setup-python@v5.3.0 with: python-version: 3.11 architecture: x64 @@ -50,8 +50,8 @@ jobs: mkdocs_test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.2.0 - - uses: actions/setup-python@v5.2.0 + - uses: actions/checkout@v4.2.2 + - uses: actions/setup-python@v5.3.0 with: python-version: 3.11 architecture: x64 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00c74481..125d949a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,9 +25,9 @@ schedules: variables: # check https://github.com/microsoft/vcpkg/releases - name: vcpkg.version - value: "2024.09.30" + value: "2024.10.21" - - name: vcpkg.overlay.ports # == VCPKG_OVERLAY_PORTS + - name: vcpkg.overlay.ports # VCPKG_OVERLAY_PORTS value: $(Build.SourcesDirectory)/ports # --overlay-ports $(Build.SourcesDirectory)/ports - name: vcpkg.overlay.triplets # VCPKG_OVERLAY_TRIPLETS value: $(Build.SourcesDirectory)/triplets # --overlay-triplets $(Build.SourcesDirectory)/triplets @@ -37,7 +37,7 @@ variables: - name: AzureSource value: "x-azblob,https://$(az-storage).blob.core.windows.net/$(az-container),$(az-sas),readwrite" - name: vcpkg.binary.sources # VCPKG_BINARY_SOURCES - value: "default;$(AzureSource)" + value: "default" # $(AzureSource) - name: vcpkg.default.binary.cache value: $(Build.ArtifactStagingDirectory)/vcpkg-archives @@ -55,26 +55,16 @@ stages: value: "C:/vcpkg" # VCPKG_INSTALLATION_ROOT strategy: matrix: - arm64_windows: - vcpkg.default.triplet: "arm64-windows" arm64_uwp: vcpkg.default.triplet: "arm64-uwp" steps: - powershell: New-Item -Type Directory -Force "$env:VCPKG_DEFAULT_BINARY_CACHE" - task: Cache@2 inputs: - key: '"v2439-bin-uwp" | "$(vcpkg.default.triplet)"' + key: '"v2445-bin-uwp" | "$(vcpkg.default.triplet)"' restoreKeys: | - "v2439-bin-uwp" | "$(vcpkg.default.triplet)" + "v2445-bin-uwp" | "$(vcpkg.default.triplet)" path: $(vcpkg.default.binary.cache) - - task: PowerShell@2 - displayName: "Test: arm64-windows" - inputs: - script: | - $Ports=$(Get-Content "test/azure-port-arm64-windows.txt") - vcpkg install --keep-going $Ports --clean-buildtrees-after-build --clean-packages-after-build - targetType: 'inline' - condition: ne(variables['vcpkg.default.triplet'], 'arm64-uwp') - task: PowerShell@2 displayName: "Test: arm64-uwp" inputs: @@ -109,7 +99,7 @@ stages: - name: vcpkg.root value: "/usr/local/share/vcpkg" # VCPKG_INSTALLATION_ROOT strategy: - matrix: # ubuntu-latest + matrix: x64_clang15: vcpkg.default.triplet: "x64-linux" cc: clang-15 @@ -124,9 +114,9 @@ stages: - powershell: New-Item -Type Directory -Force "$env:VCPKG_DEFAULT_BINARY_CACHE" - task: Cache@2 inputs: - key: '"v2439-bin-ubuntu" | "$(vcpkg.default.triplet)_$(cc)"' + key: '"v2445-bin-ubuntu" | "$(vcpkg.default.triplet)_$(cc)"' restoreKeys: | - "v2439-bin-ubuntu" | "$(vcpkg.default.triplet)_$(cc)" + "v2445-bin-ubuntu" | "$(vcpkg.default.triplet)_$(cc)" path: $(vcpkg.default.binary.cache) - task: PowerShell@2 displayName: "Test: $(cxx)" @@ -149,106 +139,9 @@ stages: ArtifactName: "$(Agent.JobName)" condition: always() - - job: "port_android" - displayName: "Android" - pool: - vmImage: ubuntu-latest - variables: - - name: vcpkg.root - value: "/usr/local/share/vcpkg" # VCPKG_INSTALLATION_ROOT - strategy: - matrix: # https://github.com/android/ndk/releases - arm64_ndk27: - vcpkg.default.triplet: "arm64-android" - x64_ndk27: - vcpkg.default.triplet: "x64-android" - steps: - - powershell: New-Item -Type Directory -Force "$env:VCPKG_DEFAULT_BINARY_CACHE" - - task: Cache@2 - inputs: - key: '"v2439-bin-android" | "$(vcpkg.default.triplet)"' - restoreKeys: | - "v2439-bin-android" | "$(vcpkg.default.triplet)" - path: $(vcpkg.default.binary.cache) - - task: PowerShell@2 - displayName: "Test: $(vcpkg.default.triplet)" - inputs: - script: | - $Ports=$(Get-Content "test/azure-port-android.txt") - vcpkg install --keep-going $Ports --clean-buildtrees-after-build --clean-packages-after-build - targetType: 'inline' - - task: CopyFiles@2 - inputs: - SourceFolder: "$(vcpkg.root)/buildtrees/" - Contents: | - **/?(*.log|*.txt|*.cmake) - TargetFolder: "$(Build.ArtifactStagingDirectory)/log" - OverWrite: true - condition: always() - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/log" - ArtifactName: "$(Agent.JobName)" - condition: always() - - stage: "Apple" dependsOn: [] jobs: - - job: "port_osx" - displayName: "Mac" - timeoutInMinutes: "200" - pool: - vmImage: macos-latest - variables: - - name: vcpkg.root - value: "/usr/local/share/vcpkg" - strategy: - matrix: - arm64_osx: - vcpkg.default.triplet: "arm64-osx" - x64_osx: - vcpkg.default.triplet: "x64-osx" - steps: - - powershell: brew install vcpkg $(Get-Content test/packages-homebrew.txt) - displayName: "Install HomeBrew packages" - - powershell: pip install typing-extensions pybind11 numpy pyyaml - displayName: "Install Python packages" - - task: PowerShell@2 - displayName: "Setup vcpkg" - inputs: - script: | - New-Item -Type Directory -Force "$env:VCPKG_DEFAULT_BINARY_CACHE" - Push-Location /usr/local/share/ - git clone --branch "$env:VCPKG_VERSION" --depth 1 https://github.com/microsoft/vcpkg - Pop-Location - targetType: 'inline' - - task: Cache@2 - inputs: - key: '"v2439-bin-osx" | "$(vcpkg.default.triplet)"' - restoreKeys: | - "v2439-bin-osx" | "$(vcpkg.default.triplet)" - path: $(vcpkg.default.binary.cache) - - task: PowerShell@2 - displayName: "Test: osx" - inputs: - script: | - $Ports=$(Get-Content "test/azure-port-osx.txt") - vcpkg install --keep-going $Ports --clean-buildtrees-after-build --clean-packages-after-build - targetType: 'inline' - - task: CopyFiles@2 - inputs: - SourceFolder: "$(vcpkg.root)/buildtrees/" - Contents: | - **/?(*.log|*.txt|*.cmake) - TargetFolder: "$(Build.ArtifactStagingDirectory)/log" - OverWrite: true - condition: always() - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/log" - ArtifactName: "$(Agent.JobName)" - condition: always() - - job: "port_ios" displayName: "iOS" timeoutInMinutes: "200" @@ -256,7 +149,7 @@ stages: vmImage: macos-latest variables: - name: vcpkg.root - value: "/usr/local/share/vcpkg" + value: "/usr/local/share/vcpkg" # VCPKG_INSTALLATION_ROOT strategy: matrix: arm64_ios: @@ -279,9 +172,9 @@ stages: targetType: 'inline' - task: Cache@2 inputs: - key: '"v2439-bin-ios" | "$(vcpkg.default.triplet)"' + key: '"v2445-bin-ios" | "$(vcpkg.default.triplet)"' restoreKeys: | - "v2439-bin-ios" | "$(vcpkg.default.triplet)" + "v2445-bin-ios" | "$(vcpkg.default.triplet)" path: $(vcpkg.default.binary.cache) - task: PowerShell@2 displayName: "Test: $(vcpkg.default.triplet)" diff --git a/ports/cpuinfo/portfile.cmake b/ports/cpuinfo/portfile.cmake index 64a44484..9f0119cf 100644 --- a/ports/cpuinfo/portfile.cmake +++ b/ports/cpuinfo/portfile.cmake @@ -6,8 +6,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pytorch/cpuinfo - REF fa1c679da8d19e1d87f20175ae1ec10995cd3dd3 - SHA512 02e14115b2f91dc555b6181b7f9b422506e8db8ca0858e936045711cc93e0313bc2416298cf0f9619ced6c497a34fd4a4a4bcadcacfc0fe68a1c1ced2bd00558 + REF dff2616ddd49122b63abcf44d2c097483b77f861 + SHA512 de681a8cdc0e33cac7b875fabcb05aef8f41cfdeeeb3a1231ae145e6c39c2d5b2b96ad768dc55141b34e0d60291f1e4ef4283bbc2678d04155629a05e9c0f9b0 HEAD_REF main ) diff --git a/ports/cpuinfo/vcpkg.json b/ports/cpuinfo/vcpkg.json index 80c573ed..304d3089 100644 --- a/ports/cpuinfo/vcpkg.json +++ b/ports/cpuinfo/vcpkg.json @@ -1,6 +1,6 @@ { "name": "cpuinfo", - "version-date": "2024-08-31", + "version-date": "2024-10-23", "description": "CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)", "homepage": "https://github.com/pytorch/cpuinfo", "license": "BSD-2-Clause", diff --git a/ports/xnnpack/fix-cmake.patch b/ports/xnnpack/fix-cmake.patch index 9d38809d..6d23a14c 100644 --- a/ports/xnnpack/fix-cmake.patch +++ b/ports/xnnpack/fix-cmake.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index dd4f4fe..9526aa4 100644 +index 4c5eb1c..ce3ab36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -182,7 +182,7 @@ ENDIF() +@@ -328,7 +328,7 @@ ENDIF() # ---[ Build flags IF(NOT CMAKE_SYSTEM_NAME) MESSAGE(FATAL_ERROR "CMAKE_SYSTEM_NAME not defined") @@ -11,7 +11,7 @@ index dd4f4fe..9526aa4 100644 MESSAGE(FATAL_ERROR "Unrecognized CMAKE_SYSTEM_NAME value \"${CMAKE_SYSTEM_NAME}\"") ENDIF() IF(CMAKE_SYSTEM_NAME MATCHES "Windows") -@@ -952,7 +952,7 @@ TARGET_INCLUDE_DIRECTORIES(normalization PRIVATE include src) +@@ -1034,7 +1034,7 @@ TARGET_INCLUDE_DIRECTORIES(normalization PRIVATE include src) TARGET_INCLUDE_DIRECTORIES(packing PRIVATE include src) TARGET_INCLUDE_DIRECTORIES(logging PRIVATE include src) IF(XNNPACK_BUILD_LIBRARY) @@ -20,121 +20,30 @@ index dd4f4fe..9526aa4 100644 TARGET_INCLUDE_DIRECTORIES(XNNPACK PRIVATE src) TARGET_INCLUDE_DIRECTORIES(allocator PRIVATE include src) TARGET_INCLUDE_DIRECTORIES(cache PRIVATE include src) -@@ -964,6 +964,10 @@ IF(XNNPACK_BUILD_LIBRARY) - TARGET_INCLUDE_DIRECTORIES(memory PRIVATE include src) - TARGET_INCLUDE_DIRECTORIES(mutex PRIVATE include src) - TARGET_INCLUDE_DIRECTORIES(post-operation PUBLIC include src) -+ if(ANDROID) -+ find_library(LOG_LIB NAMES log REQUIRED) -+ target_link_libraries(XNNPACK PRIVATE log) -+ endif() - IF(WIN32) - # Target Windows 7+ API - TARGET_COMPILE_DEFINITIONS(XNNPACK PRIVATE _WIN32_WINNT=0x0601) -@@ -987,7 +991,9 @@ IF(LIBM) - ENDIF() - - # ---[ Configure cpuinfo --IF(NOT TARGET cpuinfo) -+find_package(cpuinfo CONFIG REQUIRED) -+add_library(cpuinfo ALIAS cpuinfo::cpuinfo) -+IF(FALSE) - IF(NOT XNNPACK_USE_SYSTEM_LIBS) - SET(CPUINFO_BUILD_TOOLS OFF CACHE BOOL "") - SET(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "") -@@ -1009,12 +1015,12 @@ IF(NOT TARGET cpuinfo) - ENDIF() - IF(XNNPACK_BUILD_LIBRARY) - TARGET_LINK_LIBRARIES(hardware-config PRIVATE cpuinfo) -- TARGET_LINK_LIBRARIES(XNNPACK PRIVATE cpuinfo) -+ TARGET_LINK_LIBRARIES(XNNPACK PUBLIC cpuinfo::cpuinfo) - ENDIF() - - # ---[ Configure pthreadpool - IF(NOT TARGET pthreadpool) -- IF(NOT XNNPACK_USE_SYSTEM_LIBS) -+ IF(FALSE) - SET(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "") - SET(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "") - SET(PTHREADPOOL_ALLOW_DEPRECATED_API OFF CACHE BOOL "") -@@ -1022,13 +1028,14 @@ IF(NOT TARGET pthreadpool) - "${PTHREADPOOL_SOURCE_DIR}" - "${CMAKE_BINARY_DIR}/pthreadpool") - ELSE() -- ADD_LIBRARY(pthreadpool SHARED IMPORTED) -- FIND_LIBRARY(PTHREADPOOL_LIBRARY pthreadpool PATHS "${PTHREADPOOL_SOURCE_DIR}/lib") -+ ADD_LIBRARY(pthreadpool STATIC IMPORTED) -+ find_library(PTHREADPOOL_LIBRARY NAMES pthreadpool REQUIRED) - IF(NOT PTHREADPOOL_LIBRARY) - MESSAGE(FATAL_ERROR "Cannot find pthreadpool") - ENDIF() - FIND_PACKAGE(Threads REQUIRED) -- TARGET_INCLUDE_DIRECTORIES(pthreadpool INTERFACE "${PTHREADPOOL_SOURCE_DIR}/include") -+ find_path(PTHREADPOOL_INCLUDE_DIRS "pthreadpool.h" REQUIRED) -+ TARGET_INCLUDE_DIRECTORIES(pthreadpool INTERFACE "${PTHREADPOOL_INCLUDE_DIRS}") - TARGET_LINK_LIBRARIES(pthreadpool INTERFACE Threads::Threads) - SET_PROPERTY(TARGET pthreadpool PROPERTY IMPORTED_LOCATION "${PTHREADPOOL_LIBRARY}") - SET_PROPERTY(TARGET pthreadpool PROPERTY IMPORTED_IMPLIB "${PTHREADPOOL_LIBRARY}") -@@ -1046,7 +1053,9 @@ TARGET_LINK_LIBRARIES(microparams-init PRIVATE pthreadpool) - TARGET_LINK_LIBRARIES(normalization PRIVATE pthreadpool) - TARGET_LINK_LIBRARIES(packing PRIVATE pthreadpool) - IF(XNNPACK_BUILD_LIBRARY) -- TARGET_LINK_LIBRARIES(XNNPACK PUBLIC pthreadpool) -+ get_filename_component(PTHREADPOOL_LIBDIR "${PTHREADPOOL_LIBRARY}" PATH) -+ target_link_directories(XNNPACK PUBLIC ${PTHREADPOOL_LIBDIR}) -+ TARGET_LINK_LIBRARIES(XNNPACK PUBLIC ${PTHREADPOOL_LIBRARY}) - TARGET_LINK_LIBRARIES(allocator PRIVATE pthreadpool) - TARGET_LINK_LIBRARIES(cache PRIVATE memory pthreadpool) - TARGET_LINK_LIBRARIES(subgraph PRIVATE pthreadpool) -@@ -1059,7 +1068,10 @@ IF(XNNPACK_BUILD_LIBRARY) - ENDIF() - - # ---[ Configure FXdiv --IF(NOT TARGET fxdiv) -+find_path(FXDIV_INCLUDE_DIRS "fxdiv.h" REQUIRED) -+add_library(fxdiv INTERFACE) -+target_include_directories(fxdiv INTERFACE ${FXDIV_INCLUDE_DIRS}) -+IF(FALSE) - IF(NOT XNNPACK_USE_SYSTEM_LIBS) - SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") - SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") -@@ -1067,7 +1079,7 @@ IF(NOT TARGET fxdiv) - "${FXDIV_SOURCE_DIR}" - "${CMAKE_BINARY_DIR}/FXdiv") - ELSE() -- FIND_FILE(FXDIV_HDR fxdiv.h PATH_SUFFIXES include PATHS "${FXDIV_SOURCE_DIR}") -+ find_path(FXDIV_HDR NAMES "fxdiv.h" REQUIRED) +@@ -1141,7 +1141,7 @@ IF(NOT TARGET fxdiv) IF(NOT FXDIV_HDR) MESSAGE(FATAL_ERROR "Cannot find fxdiv") ENDIF() -@@ -1086,7 +1098,10 @@ IF(XNNPACK_BUILD_LIBRARY) - ENDIF() +- ADD_LIBRARY(fxdiv STATIC "${FXDIV_HDR}") ++ ADD_LIBRARY(fxdiv INTERFACE "${FXDIV_HDR}") + TARGET_INCLUDE_DIRECTORIES(fxdiv INTERFACE "${FXDIV_SOURCE_DIR}/include") + SET_PROPERTY(TARGET fxdiv PROPERTY LINKER_LANGUAGE C) + ENDIF() +@@ -779,7 +779,7 @@ ADD_CUSTOM_COMMAND( + # all other XNNPACK targets. + ADD_LIBRARY(xnnpack-base INTERFACE) - # ---[ Configure FP16 --IF(NOT TARGET fp16) -+find_path(FP16_INCLUDE_DIRS "fp16.h" REQUIRED) -+add_library(fp16 INTERFACE) -+target_include_directories(fp16 INTERFACE ${FP16_INCLUDE_DIRS}) -+IF(FALSE) - IF(NOT XNNPACK_USE_SYSTEM_LIBS) - SET(FP16_BUILD_TESTS OFF CACHE BOOL "") - SET(FP16_BUILD_BENCHMARKS OFF CACHE BOOL "") -@@ -1117,9 +1132,18 @@ IF(XNNPACK_BUILD_LIBRARY) +-ADD_LIBRARY(microkernels-prod STATIC ${PROD_MICROKERNEL_SRCS} ${TABLE_SRCS}) ++ADD_LIBRARY(microkernels-prod OBJECT ${PROD_MICROKERNEL_SRCS} ${TABLE_SRCS}) + IF(XNNPACK_BUILD_ALL_MICROKERNELS) + ADD_LIBRARY(microkernels-all STATIC ${NON_PROD_MICROKERNEL_SRCS}) + TARGET_LINK_LIBRARIES(microkernels-all PUBLIC microkernels-prod) +@@ -1156,7 +1156,7 @@ IF(XNNPACK_BUILD_LIBRARY) + ENDIF() - TARGET_LINK_LIBRARIES(XNNPACK PRIVATE fp16) - INSTALL(TARGETS XNNPACK -+ # EXPORT xnnpack-targets # requires object targets to be in export set + IF(XNNPACK_BUILD_LIBRARY) +- INSTALL(TARGETS XNNPACK microkernels-prod ++ INSTALL(TARGETS XNNPACK # microkernels-prod LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+ # install(EXPORT xnnpack-targets DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}) -+ -+ include(CMakePackageConfigHelpers) -+ get_filename_component(CONFIG_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/xnnpack-config.cmake ABSOLUTE) -+ configure_package_config_file( -+ cmake/xnnpack-config.template.cmake ${CONFIG_FILE_PATH} -+ INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}) -+ install(FILES ${CONFIG_FILE_PATH} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}) - ENDIF() - - # ---[ XNNPACK unit tests diff --git a/ports/xnnpack/portfile.cmake b/ports/xnnpack/portfile.cmake index 4e05a6bb..19bf981a 100644 --- a/ports/xnnpack/portfile.cmake +++ b/ports/xnnpack/portfile.cmake @@ -2,67 +2,60 @@ if(VCPKG_TARGET_IS_WINDOWS) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) endif() -# for onnxruntime, using just before https://github.com/google/XNNPACK/commit/142aceb06d509b57d02ddc2a9558ab35eacbb6fb - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/XNNPACK - REF 92c6254f6a2a57f394248f66271a77f4f48a27aa # 2024-05-06 - SHA512 71fe88ba951ff353288f07ae2119301d046750c850b268eb01435816848adfd9a8f5d701d3ce134fe9b3178c4f70410fad5e5ed2521292f7c17320a904d3ac7a + REF 4ea82e595b36106653175dcb04b2aa532660d0d8 # 2024-11-09 + SHA512 b9e711e1c69a24e347f64ee21c60a609bff25e36153216382acd3d431e466b127eea81b1d80f00f84699a426c44f8a3566d9b95d0e87079c34f527e05c2db787 HEAD_REF master PATCHES fix-cmake.patch ) -file(COPY "${CMAKE_CURRENT_LIST_DIR}/xnnpack-config.template.cmake" DESTINATION "${SOURCE_PATH}/cmake") if(VCPKG_TARGET_IS_WINDOWS) # see https://docs.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=msvc-170 # see https://github.com/google/XNNPACK/blob/master/scripts/build-windows-arm64.cmd + # see ${SOURCE_PATH}/scripts/build-windows-arm64.cmd if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") list(APPEND PLATFORM_OPTIONS -DXNNPACK_ENABLE_ARM_FP16_SCALAR=OFF -DXNNPACK_ENABLE_ARM_BF16=OFF # `bfloat16_t` type is missing - -DXNNPACK_ENABLE_ARM_FP16_VECTOR=ON # `__fp16` type is missing + # -DXNNPACK_ENABLE_ARM_FP16_VECTOR=ON # `__fp16` type is missing ) endif() elseif(VCPKG_TARGET_IS_ANDROID) - # see https://github.com/google/XNNPACK/blob/master/scripts/build-android-armv7.sh + # see ${SOURCE_PATH}/scripts/build-android-armv7.sh if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") list(APPEND PLATFORM_OPTIONS -DXNNPACK_ENABLE_ARM_BF16=OFF) endif() -elseif(VCPKG_TARGET_IS_IOS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(IOS_ARCH "armv7") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(IOS_ARCH "arm64") - elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(IOS_ARCH "x86_64") - else() - message(FATAL_ERROR "Unexpected VCPKG_TARGET_ARCHITECTURE") - endif() - list(APPEND PLATFORM_OPTIONS -DIOS_ARCH=${IOS_ARCH}) endif() -set(USE_ASSEMBLY true) -if(VCPKG_TARGET_IS_WINDOWS AND (VCPKG_TARGET_ARCHITECTURE MATCHES "arm")) - set(USE_ASSEMBLY false) -endif() +vcpkg_find_acquire_program(PYTHON3) +message(STATUS "Using python3: ${PYTHON3}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test XNNPACK_BUILD_TESTS + test XNNPACK_BUILD_BENCHMARKS + test XNNPACK_BUILD_ALL_MICROKERNELS + kleidi XNNPACK_ENABLE_KLEIDIAI +) vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - WINDOWS_USE_MSBUILD OPTIONS ${FEATURE_OPTIONS} ${PLATFORM_OPTIONS} -DXNNPACK_USE_SYSTEM_LIBS=ON - -DXNNPACK_ENABLE_ASSEMBLY=${USE_ASSEMBLY} + "-DCPUINFO_SOURCE_DIR:PATH=${CURRENT_INSTALLED_DIR}" + "-DPTHREADPOOL_SOURCE_DIR:PATH=${CURRENT_INSTALLED_DIR}" + "-DFXDIV_SOURCE_DIR:PATH=${CURRENT_INSTALLED_DIR}" + -DXNNPACK_ENABLE_ASSEMBLY=ON -DXNNPACK_ENABLE_MEMOPT=ON -DXNNPACK_ENABLE_SPARSE=ON - -DXNNPACK_BUILD_TESTS=OFF - -DXNNPACK_BUILD_BENCHMARKS=OFF + "-DPython_EXECUTABLE:FILEPATH=${PYTHON3}" ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup(CONFIG_PATH share PACKAGE_NAME xnnpack) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" diff --git a/ports/xnnpack/vcpkg.json b/ports/xnnpack/vcpkg.json index 7ec928fb..fddc5166 100644 --- a/ports/xnnpack/vcpkg.json +++ b/ports/xnnpack/vcpkg.json @@ -1,19 +1,25 @@ { "name": "xnnpack", - "version-date": "2024-05-06", + "version-date": "2024-11-09", "description": "High-efficiency floating-point neural network inference operators for mobile, server, and Web", "homepage": "https://github.com/google/XNNPACK", "dependencies": [ "cpuinfo", "fp16", + "fxdiv", "pthreadpool", { "name": "vcpkg-cmake", "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true } - ] + ], + "features": { + "test": { + "description": "Build and run tests", + "dependencies": [ + "benchmark", + "gtest" + ] + } + } } diff --git a/ports/xnnpack/xnnpack-config.template.cmake b/ports/xnnpack/xnnpack-config.template.cmake deleted file mode 100644 index d2d615aa..00000000 --- a/ports/xnnpack/xnnpack-config.template.cmake +++ /dev/null @@ -1,36 +0,0 @@ -@PACKAGE_INIT@ -if(Z_XNNPACK_CONFIG_GUARD) - return() -endif() -set(Z_XNNPACK_CONFIG_GUARD ON CACHE INTERNAL "Guard variable for 'xnnpack-config.cmake'") - -include(CMakeFindDependencyMacro) - -# from vcpkg, luncliff/vcpkg-registry -find_library(PTHREADPOOL_LIBRARY NAMES pthreadpool REQUIRED) -get_filename_component(PTHREADPOOL_LIBRARY_DIR "${PTHREADPOOL_LIBRARY}" PATH) - -find_dependency(cpuinfo) # cpuinfo::cpuinfo - -find_path(XNNPACK_INCLUDE_DIR NAMES xnnpack.h REQUIRED) -find_library(XNNPACK_LIBRARY NAMES XNNPACK REQUIRED) - -set(XNNPACK_IMPORT_TYPE STATIC) -if(XNNPACK_LIBRARY MATCHES "${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(XNNPACK_IMPORT_TYPE SHARED) -endif() -add_library(xnnpack ${XNNPACK_IMPORT_TYPE} IMPORTED) - -# because this is not officially supported... -add_library(unofficial::xnnpack ALIAS xnnpack) - -set_target_properties(xnnpack -PROPERTIES - C_STANDARD 99 - CXX_STANDARD 14 - INTERFACE_COMPILE_FEATURES "cxx_std_14" - INTERFACE_INCLUDE_DIRECTORIES "${XNNPACK_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "${PTHREADPOOL_LIBRARY};cpuinfo::cpuinfo" - INTERFACE_LINK_DIRECTORIES "${PTHREADPOOL_LIBRARY_DIR}" - IMPORTED_LOCATION "${XNNPACK_LIBRARY}" -) diff --git a/test/azure-port-arm64-windows.txt b/test/azure-port-arm64-windows.txt deleted file mode 100644 index 296756d6..00000000 --- a/test/azure-port-arm64-windows.txt +++ /dev/null @@ -1,4 +0,0 @@ -libdispatch -tensorflow-lite -abseil -onnx[disable-static-registration] diff --git a/test/azure-port-osx-host.txt b/test/azure-port-osx-host.txt deleted file mode 100644 index eb4db46e..00000000 --- a/test/azure-port-osx-host.txt +++ /dev/null @@ -1 +0,0 @@ -coreml-tools diff --git a/test/azure-port-osx.txt b/test/azure-port-osx.txt deleted file mode 100644 index 6ebb2823..00000000 --- a/test/azure-port-osx.txt +++ /dev/null @@ -1,5 +0,0 @@ -tensorflow-lite[gpu] -onnxruntime[framework,coreml] -metal-cpp -miniaudio -abseil diff --git a/test/azure-triplet-ios.txt b/test/azure-triplet-ios.txt deleted file mode 100644 index a553f852..00000000 --- a/test/azure-triplet-ios.txt +++ /dev/null @@ -1 +0,0 @@ -zlib-ng diff --git a/test/vcpkg.json b/test/vcpkg.json index 3028a218..ef663675 100644 --- a/test/vcpkg.json +++ b/test/vcpkg.json @@ -1,20 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "test", - "version-date": "2024-10-31", + "version-date": "2024-11-12", "description": "vcpkg registry maintained by @luncliff", "homepage": "https://github.com/luncliff/vcpkg-registry", "supports": "windows | linux | osx | ios", "dependencies": [ "abseil", - { - "name": "apple-crypto", - "platform": "osx | ios" - }, - { - "name": "apple-nio-ssl", - "platform": "osx | ios" - }, { "name": "coreml-tools", "platform": "osx | ios" diff --git a/versions/baseline.json b/versions/baseline.json index 74195cf4..576be390 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -25,7 +25,7 @@ "port-version": 0 }, "cpuinfo": { - "baseline": "2024-08-31", + "baseline": "2024-10-23", "port-version": 0 }, "d3d12-transition-layer": { @@ -225,7 +225,7 @@ "port-version": 0 }, "xnnpack": { - "baseline": "2024-05-06", + "baseline": "2024-11-09", "port-version": 0 }, "xnvctrl": { diff --git a/versions/c-/cpuinfo.json b/versions/c-/cpuinfo.json index a5585030..84254c3c 100644 --- a/versions/c-/cpuinfo.json +++ b/versions/c-/cpuinfo.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2089f31fe6a7f7368d19275e65e95c8218fac585", + "version-date": "2024-10-23", + "port-version": 0 + }, { "git-tree": "f3e0fc439df6a5a6fc0f37a5a55d19108bbfc523", "version-date": "2024-08-31", diff --git a/versions/x-/xnnpack.json b/versions/x-/xnnpack.json index 342d7b3c..7f5d6805 100644 --- a/versions/x-/xnnpack.json +++ b/versions/x-/xnnpack.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e9942d4fce22c45ac9e31234591db9a2a9ed10e1", + "version-date": "2024-11-09", + "port-version": 0 + }, { "git-tree": "86d1be113bb49c5e4c0580184754c742f5a18e7a", "version-date": "2024-05-06",