Skip to content

Prebuilt CUDA wheels: torch 2.11 for Windows x64 - #13563

Merged
danielhanchen merged 2 commits into
mainfrom
win-torch211-wheels-pipeline
Oct 13, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
win-torch211-wheels-pipeline

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Lets prebuilt-cuda-wheels.yml build flash-attn, causal-conv1d and mamba-ssm for torch 2.11 on Windows x64.

Why

On Linux, torch 2.11 reuses upstream's torch 2.10 wheels (_PREBUILT_WHEEL_TORCH_MM in studio/backend/utils/wheel_utils.py). Upstream has never published a Windows wheel of any of the three, so a Windows install that keeps torch 2.11+cu130 gets none of them. That is every existing Windows install on torch 2.11: the installer keeps an existing install's torch release unless asked to upgrade, and many of those are on Python 3.12.

What changes

  • .github/scripts/prebuilt_wheels.py accepts 2.11.0 from a dispatch, and only win_amd64 builds it (torches on that platform). Linux, linux_aarch64 and win_arm64 are unchanged, and a default dispatch builds exactly what it did before (2.13.0 and 2.14.0).
  • TRITON_WINDOWS["2.11"] = "3.6.0.post26", the triton-windows build matching torch 2.11's triton 3.6.0 pin, for the mamba-ssm smoke import.
  • The release notes list torch minors with different interpreter sets separately, so 2.11 on Python 3.11 to 3.13 next to 2.13 / 2.14 on 3.13 does not read as 2.13 on 3.11.

Nothing resolves to these wheels yet; the Studio side follows in a separate PR once they are published.

Tests

tests/python/test_prebuilt_cuda_wheels_windows.py: the matrix for torch_versions=2.11.0, python_versions=3.11,3.12,3.13, platforms=win_amd64; 2.11 refused on every other platform; the wheel names; the triton-windows pin; the release-notes coverage line. The three prebuilt wheel test files pass (191); 3 of the new cases fail against main's prebuilt_wheels.py.

Build

An artifact-only run of this workflow from this branch on a staging repo (platforms=win_amd64, torch_versions=2.11.0, python_versions=3.11,3.12,3.13, all three packages, publish=false) is the gate before this merges and before the publish dispatch.

Linux torch 2.11 reuses upstream's torch2.10 wheels, which have no Windows build, so a
Windows install that keeps torch 2.11+cu130 gets no flash-attn, causal-conv1d or mamba-ssm.
2.11.0 is accepted from a dispatch and built only on win_amd64 (triton-windows 3.6.0.post26
for the mamba smoke test); a default dispatch is unchanged. Release notes list torch minors
with different interpreter sets separately.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T08:19:22.759458Z e5eaa19 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-13T07:56:04.311010Z e090a85 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 13, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e090a85bac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/scripts/prebuilt_wheels.py Outdated
Comment on lines +214 to +215
# Accepted from a dispatch; a platform builds only its own `torches` (2.11.0 is win_amd64 only).
ALLOWED_TORCH = ("2.11.0", *TORCH_VERSIONS)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge List 2.11 in the workflow dispatch prompt

The new version is opt-in, but the only user-facing dispatch interface still describes torch_versions as (2.13.0, 2.14.0) in .github/workflows/prebuilt-cuda-wheels.yml:32. An operator using the Actions form therefore has no indication that 2.11.0 is accepted or that it must be paired with win_amd64, making this feature effectively undiscoverable; update that input description alongside the allowlist.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e5eaa19: the dispatch form now says 2.11.0 builds on win_amd64 only.

Comment on lines +574 to 575
if args.torch not in ALLOWED_TORCH:
raise SystemExit(f"unknown torch version: {args.torch}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject 2.11 wheel names outside win_amd64

Because wheel-name defaults --platform to linux_x86_64, changing this check to the global allowlist makes wheel-name --torch 2.11.0 ... succeed and print a plausible Linux filename even though build_matrix() explicitly refuses that cell and no such artifact is built. Any caller that omits or supplies the wrong platform can therefore publish or request a nonexistent filename; validate the torch version against the selected platform's supported torches rather than only ALLOWED_TORCH.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e5eaa19: wheel-name refuses any (platform, torch) cell build_matrix refuses, so 2.11.0 on the linux_x86_64 default exits with 'torch 2.11.0 is not built for linux_x86_64'; covered by a CLI test.

Comment thread .github/scripts/prebuilt_wheels.py Outdated
Comment on lines +83 to +84
# 2.11 too: Linux reuses upstream's torch2.10 wheels there, which have no Windows build.
"torches": ("2.11.0", "2.13.0", "2.14.0"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the Windows torch list tied to global versions

This explicit tuple replaces win_amd64's previous fallback to TORCH_VERSIONS, so the next routine addition to TORCH_VERSIONS will be accepted by the dispatch and built on Linux but silently filtered out for Windows unless this second list is also updated. Since build_matrix() prefers the platform tuple whenever present, preserve inheritance of all global versions and model 2.11 as a Windows-only addition rather than duplicating the current global values here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in e5eaa19: win_amd64 now has extra_torches = (2.11.0,) on top of TORCH_VERSIONS via _platform_torches, so a new global torch reaches Windows too; a test adds 2.15.0 and checks both platforms pick it up.

…s unbuilt cells

- win_amd64 adds 2.11.0 on top of TORCH_VERSIONS instead of a copy of it, so a
  new global torch is not silently skipped on Windows.
- wheel-name refuses a (platform, torch) cell build_matrix refuses, e.g. 2.11.0
  on the linux_x86_64 default.
- The dispatch form says 2.11.0 builds on win_amd64 only.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5eaa19ffd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +83 to +85
# On top of TORCH_VERSIONS: Linux reuses upstream's torch2.10 wheels for 2.11, which have
# no Windows build.
"extra_torches": ("2.11.0",),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Route the new 2.11 wheels through the Windows resolver

For every targeted Windows x64 torch 2.11 environment, these new build cells produce artifacts that the product still cannot select: studio/backend/utils/wheel_utils.py:203-225 rejects 2.11 because _UNSLOTH_PREBUILT_TORCH_MM remains {"2.13", "2.14"}, and its win_amd64 entry also rejects the newly built cp311/cp312 wheels. The existing test at studio/backend/tests/test_wheel_utils_windows_kernels.py:50-66 consequently still asserts that torch 2.11 and cp312 resolve to None; direct_wheel_url() then returns None for Windows because there is no upstream fallback. Update the resolver gates and tests together with the build matrix so Studio and install-kernels can actually install these artifacts.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intentional, and handled in #13564 (stacked on this PR). The resolver change is kept out of this PR so it cannot merge before the 2.11 win_amd64 wheels are published: this PR lands, the publish dispatch runs from main, and only then #13564 turns on _UNSLOTH_PREBUILT_EXTRA_CELLS for (win_amd64, 2.11) with cp311 / cp312 / cp313. Shipping both together would send every Windows 2.11 install to a 404 until the publish finished.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: e5eaa19ffd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 8e039a6 into main Oct 13, 2026
@danielhanchen
danielhanchen deleted the win-torch211-wheels-pipeline branch October 13, 2026 11:09
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