pytorch - ✅(Solved) Fix Integrate with ONNX 1.21.0 release branch [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#176815Fetched 2026-04-08 00:24:22
View on GitHub
Comments
1
Participants
2
Timeline
22
Reactions
1
Timeline (top)
mentioned ×5subscribed ×5labeled ×4assigned ×2

Fix Action

Fixed

PR fix notes

PR #176828: Bump ONNX dependency to 1.21.0rc1 for early integration testing

Description (problem / solution / changelog)

Fixing an Issue

Before submitting, please review:


Summary

ONNX 1.21.0 is planned for release on April 10, 2026. Bumping to the RC early allows CI to surface incompatibilities before the final release.

  • .ci/docker/requirements-ci.txt: onnx==1.20.0onnx==1.21.0rc1

Checklist

  • Passes lint (spin fixlint)
  • Added/updated tests
  • Updated documentation (if applicable)
  • Included benchmark results (for PRs impacting perf)

BC-breaking?

No.

<!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary>

This section details on the original issue you should resolve

<issue_title>Integrate with ONNX 1.21.0 release branch</issue_title> <issue_description>We are releasing ONNX 1.21.0. A release branch is created (https://github.com/onnx/onnx/tree/rel-1.21.0). The planned release date is April 10, 2026. Release candidates are also available from TestPyPI:

pip install -i https://pypi.org/simple/ --pre onnx==1.21.0rc1

It is important to integrate ONNX release branch so that any issues and incompatibilities can be detected and resolved before the ONNX release.

Please implement CPU kernels for new and updated ONNX ops. A list of new and updated ops can be found at (https://github.com/onnx/onnx/wiki/Logistics-for-ONNX-Release-1.21.0).

In case a bug in ONNX is detected during integration of ONNX 1.21.0, please open a ONNX Bug Report and tag ONNX Release Manager @sunny-anand so that the bug is fixed in the ONNX release branch.

cc @justinchuby @titaiwangms</issue_description>

<agent_instructions>Just bump the version in the requirements file onnx==1.21.0rc1</agent_instructions>

Comments on the Issue (you are @copilot in this section)

<comments> </comments>
</details> <!-- START COPILOT CODING AGENT SUFFIX -->
  • Fixes pytorch/pytorch#176815
<!-- START COPILOT CODING AGENT TIPS -->

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Changed files

  • .ci/docker/requirements-ci.txt (modified, +1/-1)

Code Example

pip install -i https://pypi.org/simple/ --pre onnx==1.21.0rc1
RAW_BUFFERClick to expand / collapse

We are releasing ONNX 1.21.0. A release branch is created (https://github.com/onnx/onnx/tree/rel-1.21.0). The planned release date is April 10, 2026. Release candidates are also available from TestPyPI:

pip install -i https://pypi.org/simple/ --pre onnx==1.21.0rc1

It is important to integrate ONNX release branch so that any issues and incompatibilities can be detected and resolved before the ONNX release.

Please implement CPU kernels for new and updated ONNX ops. A list of new and updated ops can be found at (https://github.com/onnx/onnx/wiki/Logistics-for-ONNX-Release-1.21.0).

In case a bug in ONNX is detected during integration of ONNX 1.21.0, please open a ONNX Bug Report and tag ONNX Release Manager @sunny-anand so that the bug is fixed in the ONNX release branch.

cc @justinchuby @titaiwangms

extent analysis

Fix Plan

Implement CPU Kernels for New and Updated ONNX Ops

Step 1: Identify New and Updated Ops

Step 2: Implement CPU Kernels for Each Op

  • For each op, create a new file in the onnx/backend/cpu/kernels directory with a name following the convention op_name_kernel.cpp.
  • In the new file, implement the CPU kernel for the op using the ONNX API.
  • Example:
// my_op_kernel.cpp
#include "onnx/backend/cpu/kernels/op_kernel.h"

namespace onnx {
namespace backend {
namespace cpu {

void MyOpKernel::Compute(const OpKernelContext* ctx) {
  // Implement the CPU kernel for MyOp
  // ...
}

}  // namespace cpu
}  // namespace backend
}  // namespace onnx

Step 3: Register the CPU Kernel

  • In the onnx/backend/cpu/kernels/op_kernel.cc file, add a registration for the new CPU kernel.
  • Example:
// op_kernel.cc
#include "onnx/backend/cpu/kernels/op_kernel.h"

namespace onnx {
namespace backend {
namespace cpu {

REGISTER_OP_KERNEL(MyOp, CPUKernel);

}  // namespace cpu
}  // namespace backend
}  // namespace onnx

Step 4: Build and Test the ONNX Release Branch

  • Build the ONNX release branch using the bazel build system.
  • Run the ONNX test suite to verify that the new CPU kernel is working correctly.

Example Use Case

  • To use the new CPU kernel, create an ONNX model that uses the MyOp op.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - ✅(Solved) Fix Integrate with ONNX 1.21.0 release branch [1 pull requests, 1 comments, 2 participants]