From 64437f430883fe8ad1d5d03e869b942722efe3c2 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Tue, 29 Oct 2024 18:45:42 +0800 Subject: [PATCH] support numpy 2.0 --- .github/workflows/macos-cpu-wheels.yml | 13 +++++++------ .github/workflows/ubuntu-cpu-wheels.yml | 13 +++++++------ .github/workflows/ubuntu-cuda-wheels.yml | 13 +++++++------ .github/workflows/windows-x64-cpu-wheels.yml | 13 +++++++------ cmake/pybind11.cmake | 17 ++++++++--------- 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/macos-cpu-wheels.yml b/.github/workflows/macos-cpu-wheels.yml index 3f01d11..1d2293f 100644 --- a/.github/workflows/macos-cpu-wheels.yml +++ b/.github/workflows/macos-cpu-wheels.yml @@ -26,11 +26,11 @@ jobs: id: set-matrix run: | # outputting for debugging purposes - # python ./scripts/github_actions/generate_build_matrix.py --for-macos - # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos) + python ./scripts/github_actions/generate_build_matrix.py --for-macos + MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos) - python ./scripts/github_actions/generate_build_matrix.py --for-macos --test-only-latest-torch - MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos --test-only-latest-torch) + # python ./scripts/github_actions/generate_build_matrix.py --for-macos --test-only-latest-torch + # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-macos --test-only-latest-torch) echo "::set-output name=matrix::${MATRIX}" build_wheels_macos_cpu: @@ -110,8 +110,9 @@ jobs: cd huggingface git pull - mkdir -p macos - cp -v ../wheelhouse/*.whl ./macos + d=cpu/1.25.5.dev20241029/macos + mkdir -p $d + cp -v ../wheelhouse/*.whl ./$d git status git lfs track "*.whl" git add . diff --git a/.github/workflows/ubuntu-cpu-wheels.yml b/.github/workflows/ubuntu-cpu-wheels.yml index cf8b072..6009974 100644 --- a/.github/workflows/ubuntu-cpu-wheels.yml +++ b/.github/workflows/ubuntu-cpu-wheels.yml @@ -26,11 +26,11 @@ jobs: id: set-matrix run: | # outputting for debugging purposes - # python ./scripts/github_actions/generate_build_matrix.py - # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py) + python ./scripts/github_actions/generate_build_matrix.py + MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py) - python ./scripts/github_actions/generate_build_matrix.py --test-only-latest-torch - MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --test-only-latest-torch) + # python ./scripts/github_actions/generate_build_matrix.py --test-only-latest-torch + # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --test-only-latest-torch) echo "::set-output name=matrix::${MATRIX}" build-manylinux-wheels: @@ -100,8 +100,9 @@ jobs: cd huggingface git pull - mkdir -p ubuntu-cpu - cp -v ../wheelhouse/*.whl ./ubuntu-cpu + d=cpu/1.25.5.dev20241029/linux + mkdir -p $d + cp -v ../wheelhouse/*.whl ./$d git status git lfs track "*.whl" git add . diff --git a/.github/workflows/ubuntu-cuda-wheels.yml b/.github/workflows/ubuntu-cuda-wheels.yml index 66c9965..eb357d9 100644 --- a/.github/workflows/ubuntu-cuda-wheels.yml +++ b/.github/workflows/ubuntu-cuda-wheels.yml @@ -26,11 +26,11 @@ jobs: id: set-matrix run: | # outputting for debugging purposes - # python ./scripts/github_actions/generate_build_matrix.py --enable-cuda - # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda) + python ./scripts/github_actions/generate_build_matrix.py --enable-cuda + MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda) - python ./scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch - MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch) + # python ./scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch + # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda --test-only-latest-torch) echo "::set-output name=matrix::${MATRIX}" build-manylinux-wheels: @@ -119,8 +119,9 @@ jobs: cd huggingface git pull - mkdir -p ubuntu-cuda - cp -v ../wheelhouse/*.whl ./ubuntu-cuda + d=cuda/1.25.5.dev20241029/linux + mkdir -p $d + cp -v ../wheelhouse/*.whl ./$d git status git lfs track "*.whl" git add . diff --git a/.github/workflows/windows-x64-cpu-wheels.yml b/.github/workflows/windows-x64-cpu-wheels.yml index cc81d14..88bd899 100644 --- a/.github/workflows/windows-x64-cpu-wheels.yml +++ b/.github/workflows/windows-x64-cpu-wheels.yml @@ -26,11 +26,11 @@ jobs: id: set-matrix run: | # outputting for debugging purposes - # python ./scripts/github_actions/generate_build_matrix.py --for-windows - # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-windows) + python ./scripts/github_actions/generate_build_matrix.py --for-windows + MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-windows) - python ./scripts/github_actions/generate_build_matrix.py --for-windows --test-only-latest-torch - MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-windows --test-only-latest-torch) + # python ./scripts/github_actions/generate_build_matrix.py --for-windows --test-only-latest-torch + # MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --for-windows --test-only-latest-torch) echo "::set-output name=matrix::${MATRIX}" build_wheels_win64_cpu: @@ -89,8 +89,9 @@ jobs: cd huggingface git pull - mkdir -p windows-cpu - cp -v ../wheelhouse/*.whl ./windows-cpu + d=cpu/1.25.5.dev20241029/windows + mkdir -p $d + cp -v ../wheelhouse/*.whl ./$d git status git lfs track "*.whl" git add . diff --git a/cmake/pybind11.cmake b/cmake/pybind11.cmake index 0ede964..56136ad 100644 --- a/cmake/pybind11.cmake +++ b/cmake/pybind11.cmake @@ -8,19 +8,18 @@ function(download_pybind11) include(FetchContent) - # latest commit as of 2022.10.31 that supports python 3.11 - set(pybind11_URL "https://github.com/pybind/pybind11/archive/5bc0943ed96836f46489f53961f6c438d2935357.zip") - set(pybind11_URL2 "https://huggingface.co/csukuangfj/k2-cmake-deps/resolve/main/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip") - set(pybind11_HASH "SHA256=ff65a1a8c9e6ceec11e7ed9d296f2e22a63e9ff0c4264b3af29c72b4f18f25a0") + set(pybind11_URL "https://github.com/pybind/pybind11/archive/refs/tags/v2.12.0.tar.gz") + set(pybind11_URL2 "https://hf-mirror.com/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/pybind11-2.12.0.tar.gz") + set(pybind11_HASH "SHA256=bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7") # If you don't have access to the Internet, # please pre-download pybind11 set(possible_file_locations - $ENV{HOME}/Downloads/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip - ${PROJECT_SOURCE_DIR}/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip - ${PROJECT_BINARY_DIR}/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip - /tmp/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip - /star-fj/fangjun/download/github/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip + $ENV{HOME}/Downloads/pybind11-2.12.0.tar.gz + ${CMAKE_SOURCE_DIR}/pybind11-2.12.0.tar.gz + ${CMAKE_BINARY_DIR}/pybind11-2.12.0.tar.gz + /tmp/pybind11-2.12.0.tar.gz + /star-fj/fangjun/download/github/pybind11-2.12.0.tar.gz ) foreach(f IN LISTS possible_file_locations)