Skip to content
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

Build wheels for torch 2.1.2 #1265

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/run-tests-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ concurrency:

jobs:
run-tests-cpu:
if: github.event.label.name == 'ready' || github.event.label.name == 'cpp-test' || github.event_name == 'push'
runs-on: ${{ matrix.os }}
name: ${{ matrix.python-version }} ${{ matrix.build_type }}
name: ${{ matrix.os }} ${{ matrix.torch }} ${{ matrix.python-version }} ${{ matrix.build_type }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
torch: ["2.1.1"]
torch: ["2.1.2"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
build_type: ["Release", "Debug"]

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ concurrency:

jobs:
run-tests:
if: github.event.label.name == 'ready' || github.event_name == 'push'
runs-on: ${{ matrix.os }}
name: ${{ matrix.build_type }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
cuda: ["12.1"]
torch: ["2.1.1"]
torch: ["2.1.2"]
python-version: ["3.11"]

steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ubuntu-cuda-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ jobs:
id: set-matrix
run: |
# outputting for debugging purposes
# 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
MATRIX=$(python ./scripts/github_actions/generate_build_matrix.py --enable-cuda)

echo "::set-output name=matrix::${MATRIX}"

build-manylinux-wheels:
Expand Down
4 changes: 3 additions & 1 deletion k2/csrc/array_ops_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,9 @@ TEST(OpsTest, InvertPermutationTest) {
int32_t len = RandInt(0, 10);
std::vector<int32_t> permutation(len);
std::iota(permutation.begin(), permutation.end(), 0);
std::random_shuffle(permutation.begin(), permutation.end());
std::random_device rd;
std::mt19937 g(rd());
std::shuffle(permutation.begin(), permutation.end(), g);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random_shuffle is removed from c++17.

Array1<int32_t> permutation_array(c, permutation);
Array1<int32_t> permutation_array_inv =
InvertPermutation(permutation_array);
Expand Down
8 changes: 7 additions & 1 deletion scripts/github_actions/generate_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,16 @@ def generate_build_matrix(
if not for_windows
else ["11.8.0", "12.1.0"],
},
"2.1.2": {
"python-version": ["3.8", "3.9", "3.10", "3.11"],
"cuda": ["11.8", "12.1"] # default 12.1
if not for_windows
else ["11.8.0", "12.1.0"],
},
# https://github.com/Jimver/cuda-toolkit/blob/master/src/links/windows-links.ts
}
if test_only_latest_torch:
latest = "2.1.1"
latest = "2.1.2"
matrix = {latest: matrix[latest]}

if for_windows or for_macos:
Expand Down
Loading