Skip to content

Provide pre-built wheels for PyTorch 2.13.0#1357

Merged
csukuangfj merged 7 commits into
k2-fsa:masterfrom
csukuangfj:torch-2.13.0
Jul 10, 2026
Merged

Provide pre-built wheels for PyTorch 2.13.0#1357
csukuangfj merged 7 commits into
k2-fsa:masterfrom
csukuangfj:torch-2.13.0

Conversation

@csukuangfj

Copy link
Copy Markdown
Collaborator

No description provided.

@csukuangfj csukuangfj merged commit ec31d2c into k2-fsa:master Jul 10, 2026
1 check failed
@csukuangfj csukuangfj deleted the torch-2.13.0 branch July 10, 2026 06:10

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for PyTorch 2.13.0, updates the C++ standard to C++20 for PyTorch >= 2.13, refactors the GitHub Actions build scripts to use a pre-installed Python directory, and templates the iterator addition operators in ragged operations. Feedback on these changes suggests removing the unreleased Python 3.15 from the build matrix to prevent CI failures and subsequent list removal errors, as well as simplifying a redundant condition in the PyTorch version check within setup.py.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

),
},
"2.13.0": {
"python-version": ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Python 3.15 is not yet released, and there are no official stable releases, docker images, or PyTorch wheels available for it. Including "3.15" in the build matrix will cause the CI workflow to fail when attempting to set up the environment or install PyTorch for Python 3.15.

Please remove "3.15" from the list of supported Python versions.

Suggested change
"python-version": ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"],
"python-version": ["3.10", "3.11", "3.12", "3.13", "3.14"],

Comment on lines +416 to +417
if "2.13.0" in matrix:
matrix["2.13.0"]["python-version"].remove("3.15")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Since "3.15" should be removed from the supported Python versions for "2.13.0" (as it is not yet released), this block is no longer needed and would actually cause a ValueError: list.remove(x): x not in list if "3.15" is not present in the list.

Please remove this block.

Comment thread setup.py
if major > 2 or (major == 2 and minor >= 1):
if major > 2 or (major == 2 and minor >= 13):
extra_cmake_args += f" -DCMAKE_CXX_STANDARD=20 "
elif major > 2 or (major == 2 and minor >= 1):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The condition major > 2 in the elif statement is redundant because any case where major > 2 is true will already be handled by the preceding if statement on line 156.

You can simplify this to only check for major == 2 and minor >= 1.

Suggested change
elif major > 2 or (major == 2 and minor >= 1):
elif major == 2 and minor >= 1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant