Support numpy 2 0 and torch 2.5.1 (#110)

This commit is contained in:
Fangjun Kuang 2024-10-30 12:45:45 +08:00 committed by GitHub
parent e485c5749b
commit c1aefb643e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 32 additions and 17 deletions

View File

@ -110,8 +110,9 @@ jobs:
cd huggingface cd huggingface
git pull git pull
mkdir -p macos d=cpu/1.25.5.dev20241029/macos
cp -v ../wheelhouse/*.whl ./macos mkdir -p $d
cp -v ../wheelhouse/*.whl ./$d
git status git status
git lfs track "*.whl" git lfs track "*.whl"
git add . git add .

View File

@ -100,8 +100,9 @@ jobs:
cd huggingface cd huggingface
git pull git pull
mkdir -p ubuntu-cpu d=cpu/1.25.5.dev20241029/linux
cp -v ../wheelhouse/*.whl ./ubuntu-cpu mkdir -p $d
cp -v ../wheelhouse/*.whl ./$d
git status git status
git lfs track "*.whl" git lfs track "*.whl"
git add . git add .

View File

@ -119,8 +119,9 @@ jobs:
cd huggingface cd huggingface
git pull git pull
mkdir -p ubuntu-cuda d=cuda/1.25.5.dev20241029/linux
cp -v ../wheelhouse/*.whl ./ubuntu-cuda mkdir -p $d
cp -v ../wheelhouse/*.whl ./$d
git status git status
git lfs track "*.whl" git lfs track "*.whl"
git add . git add .

View File

@ -89,8 +89,9 @@ jobs:
cd huggingface cd huggingface
git pull git pull
mkdir -p windows-cpu d=cpu/1.25.5.dev20241029/windows
cp -v ../wheelhouse/*.whl ./windows-cpu mkdir -p $d
cp -v ../wheelhouse/*.whl ./$d
git status git status
git lfs track "*.whl" git lfs track "*.whl"
git add . git add .

View File

@ -8,19 +8,18 @@ function(download_pybind11)
include(FetchContent) include(FetchContent)
# latest commit as of 2022.10.31 that supports python 3.11 set(pybind11_URL "https://github.com/pybind/pybind11/archive/refs/tags/v2.12.0.tar.gz")
set(pybind11_URL "https://github.com/pybind/pybind11/archive/5bc0943ed96836f46489f53961f6c438d2935357.zip") set(pybind11_URL2 "https://hf-mirror.com/csukuangfj/sherpa-onnx-cmake-deps/resolve/main/pybind11-2.12.0.tar.gz")
set(pybind11_URL2 "https://huggingface.co/csukuangfj/k2-cmake-deps/resolve/main/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip") set(pybind11_HASH "SHA256=bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7")
set(pybind11_HASH "SHA256=ff65a1a8c9e6ceec11e7ed9d296f2e22a63e9ff0c4264b3af29c72b4f18f25a0")
# If you don't have access to the Internet, # If you don't have access to the Internet,
# please pre-download pybind11 # please pre-download pybind11
set(possible_file_locations set(possible_file_locations
$ENV{HOME}/Downloads/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip $ENV{HOME}/Downloads/pybind11-2.12.0.tar.gz
${PROJECT_SOURCE_DIR}/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip ${CMAKE_SOURCE_DIR}/pybind11-2.12.0.tar.gz
${PROJECT_BINARY_DIR}/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip ${CMAKE_BINARY_DIR}/pybind11-2.12.0.tar.gz
/tmp/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip /tmp/pybind11-2.12.0.tar.gz
/star-fj/fangjun/download/github/pybind11-5bc0943ed96836f46489f53961f6c438d2935357.zip /star-fj/fangjun/download/github/pybind11-2.12.0.tar.gz
) )
foreach(f IN LISTS possible_file_locations) foreach(f IN LISTS possible_file_locations)

View File

@ -268,6 +268,15 @@ def generate_build_matrix(enable_cuda, for_windows, for_macos, test_only_latest_
else ["11.8.0", "12.1.0", "12.4.0"] else ["11.8.0", "12.1.0", "12.4.0"]
), ),
}, },
"2.5.1": {
# Only Linux supports python 3.13
"python-version": ["3.9", "3.10", "3.11", "3.12", "3.13"],
"cuda": (
["11.8", "12.1", "12.4"] # default 12.4
if not for_windows
else ["11.8.0", "12.1.0", "12.4.0"]
),
},
# https://github.com/Jimver/cuda-toolkit/blob/master/src/links/windows-links.ts # https://github.com/Jimver/cuda-toolkit/blob/master/src/links/windows-links.ts
} }
if test_only_latest_torch: if test_only_latest_torch:
@ -275,6 +284,9 @@ def generate_build_matrix(enable_cuda, for_windows, for_macos, test_only_latest_
matrix = {latest: matrix[latest]} matrix = {latest: matrix[latest]}
if for_windows or for_macos: if for_windows or for_macos:
if "2.5.1" in matrix:
matrix["2.5.1"]["python-version"].remove("3.13")
if "2.5.0" in matrix: if "2.5.0" in matrix:
matrix["2.5.0"]["python-version"].remove("3.13") matrix["2.5.0"]["python-version"].remove("3.13")