Skip to content

Bumped ONNX to 1.21#216

Open
klemen1999 wants to merge 4 commits intomainfrom
feat/onnx_bump
Open

Bumped ONNX to 1.21#216
klemen1999 wants to merge 4 commits intomainfrom
feat/onnx_bump

Conversation

@klemen1999
Copy link
Copy Markdown
Collaborator

Purpose

  • Bumped ONNX to 1.21.0 in requirements.txt.
  • Added onnx_compatibility.py to isolate ONNX 1.21 compatibility helpers.
  • Patched missing ONNX helper conversions before importing GraphSurgeon so onnx_graphsurgeon continues to work with ONNX 1.21.
  • Centralized ONNX model saving, including external-data handling, to avoid repeated save logic and sidecar overwrite issues.
  • Made ONNX simplification fallback gracefully when onnxsim fails instead of aborting export.
  • Tightened ONNX shape parsing so symbolic or missing dimensions are handled explicitly instead of silently reading as 0.
  • Extended ONNX dtype support only for the additional types needed by current code paths: BFLOAT16, INT4, and UINT4.
  • Added focused compatibility regression coverage in test_onnx_compatibility.py.

Specification

None / not applicable

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

None / not applicable

@klemen1999
Copy link
Copy Markdown
Collaborator Author

This PR is mostly introduced because of vulnerabilities in ONNX<=1.20.0. We still have to use lower ONNX versions in some parts (RVC4 and Hailo) but we don't have control over that.

@klemen1999 klemen1999 marked this pull request as ready for review April 9, 2026 06:44
@klemen1999 klemen1999 requested a review from a team as a code owner April 9, 2026 06:44
@klemen1999 klemen1999 requested review from conorsim, kozlov721 and tersekmatija and removed request for a team April 9, 2026 06:44
Copy link
Copy Markdown
Collaborator

@kozlov721 kozlov721 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants