Skip to content

update pnnx torch-2.11#6701

Merged
nihui merged 2 commits into
Tencent:masterfrom
nihui:pnnx-torch-2.11
May 6, 2026
Merged

update pnnx torch-2.11#6701
nihui merged 2 commits into
Tencent:masterfrom
nihui:pnnx-torch-2.11

Conversation

@nihui
Copy link
Copy Markdown
Member

@nihui nihui commented May 6, 2026

No description provided.

@tencent-adm
Copy link
Copy Markdown
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates pnnx to be compatible with Torch 2.11 by handling bias-less nn.MultiheadAttention exports more robustly, and refreshes the pnnx CI workflow to build/test against newer Torch/TorchVision/ONNXRuntime versions.

Changes:

  • Update nn_MultiheadAttention NCNN pass to always split in_proj_weight, and to synthesize zero biases when bias=False (including out_proj.bias).
  • Bump pnnx workflow build dependencies to LibTorch 2.11 / TorchVision 0.26 and ONNXRuntime 1.25.1.
  • Extend CI test matrix with a Torch 2.11 / Python 3.14 configuration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tools/pnnx/src/pass_ncnn/nn_MultiheadAttention.cpp Makes MultiheadAttention weight/bias handling tolerant of bias=False by defaulting to zero bias and avoiding reads of missing/empty bias attrs.
.github/workflows/pnnx.yml Updates pinned dependency versions and adds a Torch 2.11 test entry to CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nihui
Copy link
Copy Markdown
Member Author

nihui commented May 6, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ 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".

@nihui nihui merged commit 0d29a8d into Tencent:master May 6, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants