mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-08-09 01:52:39 +00:00
Fix building wheels for torch 2.2.0. (#95)
See also https://github.com/pytorch/pytorch/issues/120020
This commit is contained in:
parent
2e042b356e
commit
2a8a993f15
3
.github/workflows/ubuntu-cpu-wheels.yml
vendored
3
.github/workflows/ubuntu-cpu-wheels.yml
vendored
@ -28,6 +28,9 @@ jobs:
|
||||
# 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 --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:
|
||||
|
@ -5,6 +5,18 @@ import argparse
|
||||
import json
|
||||
|
||||
|
||||
def version_ge(a, b):
|
||||
a_major, a_minor = list(map(int, a.split(".")))[:2]
|
||||
b_major, b_minor = list(map(int, b.split(".")))[:2]
|
||||
if a_major > b_major:
|
||||
return True
|
||||
|
||||
if a_major == b_major and a_minor >= b_minor:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
@ -216,6 +228,14 @@ def generate_build_matrix(enable_cuda, for_windows, for_macos, test_only_latest_
|
||||
ans.append({"torch": torch, "python-version": p})
|
||||
elif for_macos:
|
||||
ans.append({"torch": torch, "python-version": p})
|
||||
elif version_ge(torch, "2.2.0"):
|
||||
ans.append(
|
||||
{
|
||||
"torch": torch,
|
||||
"python-version": p,
|
||||
"image": "pytorch/manylinux-builder:cpu-2.2",
|
||||
}
|
||||
)
|
||||
else:
|
||||
ans.append(
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user