ONNX v1.22.0 is now available with exciting new features! We would like to thank everyone who contributed to this release!
Please visit onnx.ai to learn more about ONNX and associated projects.
What's Changed
Breaking Changes and Deprecations
- Swap qk_matmul_output_mode 1 & 2 to match computation order by @titaiwangms in #7913
Spec and Operator
- Fix number of pad modes in doc_strings.cc by @assafpr in #7803
- Add FlexAttention Op to ai.onnx.preview opset by @mshr-h in #7534
- Fix Attention op softcap ordering: apply before mask/bias by @titaiwangms in #7867
- Add LinearAttention and CausalConvWithState operators (Opset 27) by @tadani3 in #7950
- feat(generator): extend Range operator with float16 and bfloat16 support (opset 27) by @andife in #7923
Reference Implementation
- Fix missing 'mul' reduction in ScatterElements reference implementation by @zdryan in #7842
- Fix QLinearMatMul output saturation by @karimbaidar in #7868
- Fixed more bugs in the Scan reference op by @tadani3 in #7964
Utilities and Tools
- Fix Slice shape inference crashes with SIGABRT on empty dimensions by @titaiwangms in #7738
- Rename misleading input_rank param to input_dim_value in processSlice… by @titaiwangms in #7739
- fix: Conv/Pool strides validation by @edgchen1 in #7764
- fix: add input/output bounds checks in version converter adapter by @andife in #7813
- Harden version conversion against malformed inputs by @andife in #7872
- fix: add input rank checks in Gemm version converter adapters by @andife in #7880
- Fix raw_data handling in version converter adapters by @cyyever in #7910
- Fix checker to use len() instead of sys.getsizeof() for protobuf size check by @OmarAzizi in #7760
- Add version macros by @cbourjau in #7918
- Remove internal spec_to_yaml tool by @cbourjau in #7985
- Address shape inference shortcomings by @yuslepukhin in #7997
- Add unifyInputShape / unifyInputShapePrefix shape inference utilities by @gramalingam in #7999
- Add operator+ and operator- for Dim by @gramalingam in #8000
- Fix KeepAspectRatioHelper precision for scaled output dimensions by @elwhyjay in #8007
- Fix heap buffer over-read in Conv/Pool shape inference for weight rank mismatch by @Copilot in #8037
Build, CI and Tests
- Add update into main.yml by @titaiwangms in #7687
- Update check_urls.yml by @andife in #7716
- Update add_msvc_runtime_flag to work with MSVC_RUNTIME_LIBRARY by @Shadows-of-Fire in #7660
- Try to fix renovate by @andife in #7742
- fix upload; Update release_win.yml by @andife in #7728
- Allow release CIs to run when a labeled PR receives new commits by @Copilot in #7741
- Update pixi.{toml,lock} by @cbourjau in #7746
- hash for googletest by @andife in #7765
- Update RELEASE-MANAGEMENT.md by @andife in #7773
- Update doc CIPipeline by @andife in #7782
- use reviewdog to fix the pr_checks workflow by @andife in #7780
- Update copilot-setup-steps.yml; persist-credentials: false by @andife in #7768
- Update release_linux.yml; replace tag by hash by @andife in #7769
- Fix pipeline src preview by @andife in #7787
- Bump protobuf to v33.6 by @cyyever in #7517
- fix pr_checks_post.yml by using the correct reporter in reviewdog by @andife in #7789
- Skip very slow Python tests on Windows debug builds by @cbourjau in #7819
- Fix cross-platform date command in CMakeLists.txt by @Chessing234 in #7816
- Modify URL checker workflow permissions and action by @andife in #7832
- fix additional input in workflow by @andife in #7834
- fix: suppress unused-parameter warnings in try_kernel_contained_open by @andife in #7849
- Pin GitHub Actions to immutable commit SHAs by @andife in #7852
- Add wheels for Pyodide by @andife in #7847
- Improve CodeQL config by @cyyever in #7870
- integrate check-wheel-contents in CI workflows by @andife in #7846
- feat: embed CycloneDX SBOM in wheel per PEP 770 by @andife in #7861
- Fix CI link-checker issues by @cbourjau in #7909
- fix: only download artifacts on workflow_dispatch in publish_release_build_to_pypi by @andife in #7912
- topic: Allow overriding cmake build directory via environment variable by @WithEnoughCoffee in #7915
- Ignore blocked links by @cbourjau in #7919
- chore: improve Renovate config — cooldown, correct label, PR notes by @andife in #7922
- Fix link-checker CI by @cbourjau in #7924
- Update Python version matrix in release workflow; skip 3.13t for a gr… by @andife in #7932
- Update Python versions in release workflow (remove 3.13t from testing) by @andife in #7934
- Remove cpplint (superseded by clang-tidy) by @cbourjau in #7942
- Add hard-failing zizmor lint and fix existing issues by @cbourjau in #7941
- Remove redundant reuse-action by @cbourjau in #7943
- Fix links (and thus CI error) by @cbourjau in #7946
- CI: add labeled SLSA provenance test path and harden checkout credentials by @andife in #7951
- Remove submodules option from lint workflow by @andife in #7958
- Use cibuildwheel for all releases by @cbourjau in #7901
- Fix generated md files by @cbourjau in #7973
- Use Renovate to update pixi lock file once a month by @cbourjau in #7980
- fix: revert accidental protobuf v33.6 bump and remove requirements-release_build.txt by @andife in #7982
- Run pip check to validate consistency of pyproject-dependencies with environment by @cbourjau in #7960
- Build correct pyemscripten wheel for PyPI by @cbourjau in #7998
- Use same 25.1 protobuf for all releases and simplify sbom creation by @cbourjau in #7995
- fix: prevent cmake parallel build race in proto generation by @andife in #8003
- fix: correct argument order in ONNX_OPERATOR_SET_SCHEMA_DEBUG_VARIABLE macro call by @andife in #8004
- Enable MSVC warnings by @justinchuby in #7562
- Fix/sdist missing SBOM cdx json by @andife in #8010
- Follow up for scikit-build-core migration by @take-cheeze in #8017
- Run lints also on Windows by @cbourjau in #8014
- Fix xcode build by @cbourjau in #8056
Documentation
- bump VERSION_NUMBER in main branch by @Sunny-Anand in #7712
- remove link for check_urls action by @Sunny-Anand in #7713
- bump version for defs operator and schema after main version bump by @Sunny-Anand in #7715
- Add Security Assurance Case document by @andife in #7679
- Add CLAUDE.md with project guidelines for Claude Code by @cyyever in #7666
- Update RELEASE-MANAGEMENT.md by @andife in #7762
- Update RELEASE-MANAGEMENT.md by @andife in #7774
- Fix documentation typos and grammar errors in API docs by @Chessing234 in #7809
- Add ONNX Incident Response Plan document by @andife in #7830
- Add skill files for new op, op updates, function body definition, type and shape inference by @gramalingam in #7878
- Fix reuse by @andife in #7899
- Execute code snippets in PythonAPIOverview.md (+ fixes) by @cbourjau in #7856
- Extend release compatibility matrix back to ONNX 1.10 by @andife in #7929
- Update RELEASE-MANAGEMENT.md by @andife in #7976
- Update RELEASE-MANAGEMENT.md by @andife in #7977
- Render literal
<in Cast FLOAT8E8M0 docs table by @Copilot in #7936 - Fix escaped default attribute values in generated operator docs by @Copilot in #8002
Other Changes
- Improve external data file handling by @titaiwangms in #7686
- Extend parser/printer to support quoted strings as symbolic dims by @Copilot in #7699
- Improve external data file handling - onnx.load by @titaiwangms in #7717
- docs: fix window size type constraint wording by @tsubasakong in #7719
- Improve spec_to_yaml.py by @cyyever in #7734
- Enhance ONNX_HARDENING with OpenSSF-recommended compiler flags by @cyyever in #7724
- Fix various issues by @cyyever in #7737
- Enable more ruff rules by @cyyever in #7748
- Merged Fix object state corruption and DoS via ExternalDataInfo attribute injection by @titaiwangms in #7751
- Update SECURITY.md by @andife in #7779
- Fix formatting in RELEASE-MANAGEMENT.md by @andife in #7781
- Rename docs to match PascalCase by @andife in #7778
- Remove the autoupdate doc workflow by @cbourjau in #7785
- Fix test_adam_multiple missing epsilon attribute in model.onnx by @Krishnachaitanyakc in #7763
- Fix np.prod integer overflow on numpy < 2.0 by using dtype=np.int64 by @cyyever in #7783
- Fix TOCTOU race in external data file open by @cyyever in #7790
- Fix nanobind arg name by @cbourjau in #7823
- Fix various linting issues and broken links by @cbourjau in #7826
- Add Pixi task for building docs from locked environment by @cbourjau in #7824
- Update Docker image version for x86_64 wheel build by @andife in #7804
- Update CMakeLists.txt; update nanobind to 2.12.0 by @andife in #7851
- Build docs on CI using Pixi by @cbourjau in #7845
- Extend renovate config: track googletest releases with hash and auto-label PRs by @andife in #7853
- improve codeql by @andife in #7863
- Improve test matrix (e.g. fix unity build) by @cbourjau in #7860
- Remove non-functional and insecure split-workflow CI pairs by @andife in #7876
- Normalize legacy helper names to explicit opset ranges by @andife in #7873
- fix: detect cycles in model-local functions to prevent stack overflow (GHSA-7w46-vvrh-m8q5) by @cyyever in #7815
- Add pre-commit hooks by @cbourjau in #7857
- Apply ruff formatting by @cbourjau in #7908
- Remove deduplicated helpers by @cyyever in #7907
- fix: add rank check in RNNShapeInference_opset1_to_6 to prevent OOB read by @andife in #7879
- Drop redundant semicolons in macros by @cyyever in #7911
- Fix wrong mantissa mask in to_float8e8m0 round-up mode by @cyyever in #7784
- Fix null pointer dereferences in shape inference by @cyyever in #7916
- Fix Resize shape inference precision for scaled output dimensions by @elwhyjay in #7874
- Add clang-tidy CI job by @cbourjau in #7877
- Fix protobuf field checks and add GRAPHS attribute handling by @cyyever in #7753
- ci: add SLSA Build Level 2 provenance attestations for published artifacts by @andife in #7925
- fix: improve diagnostic when Python interpreter is missing in manylinux entrypoint by @andife in #7926
- fix: remove unnecessary git credentials in test job; guard proto size cast by @andife in #7931
- Handle PathLike inputs consistently in infer_shapes by @Pratishtha5 in #7928
- docs: add OpenVINO to RC partner validation checklist by @andife in #7927
- Use scikit-build-core by @cbourjau in #7859
- Fix duplicate tensor(float16) in Conv-11 type constraint by @cyyever in #7940
- Speed up ReferenceEvaluator Resize via separable interpolation by @mrgyatso in #7920
- Fix #7944: support NodeProto in printer.to_text by @mrgyatso in #7947
- Add type_builders.h and migrate schema definitions to use it by @cyyever in #7945
- Use commonpath for tar extraction validation by @NguyenCong2k in #7949
- Validate tensor value count in make_tensor by @Pratishtha5 in #7954
- Fix Resize reference op on 32-bit platforms by @cyyever in #7957
- Use type DSL to improve operator schemas by @cyyever in #7956
- Remove glob calls from ONNX CMake code by @Shadows-of-Fire in #7733
- add overflow-safe integer multiplication by @cyyever in #7822
- chore: correct Renovate docs link and manylinux example tag date by @Copilot in #7989
- deduplicate duplicated kLargeDim constant in tensor_test.cc by @Copilot in #7975
- Share generator for unary float math op schemas by @cyyever in #7969
- ci: patch sbom.cdx.json with actual protobuf version and hash per build by @andife in #7987
- Recommend onnx.parser for test cases in agent guidance files by @gramalingam in #7966
- onnx: add LICENSE_NOTES.md by @threexc in #7864
- Fix make_attribute_ref to set ref_attr_name by @devin-lai in #8009
- fix: validate packed tensor dims against payload size in _unpack_4bit and _unpack_2bit by @andife in #8033
- fix: validate packed sub-byte tensor payload size in checker by @andife in #8038
New Contributors
- @tsubasakong made their first contribution in #7719
- @Krishnachaitanyakc made their first contribution in #7763
- @assafpr made their first contribution in #7803
- @Chessing234 made their first contribution in #7809
- @mshr-h made their first contribution in #7534
- @zdryan made their first contribution in #7842
- @WithEnoughCoffee made their first contribution in #7915
- @OmarAzizi made their first contribution in #7760
- @elwhyjay made their first contribution in #7874
- @Pratishtha5 made their first contribution in #7928
- @mrgyatso made their first contribution in #7920
- @NguyenCong2k made their first contribution in #7949
- @karimbaidar made their first contribution in #7868
- @threexc made their first contribution in #7864
- @tadani3 made their first contribution in #7964
- @devin-lai made their first contribution in #8009
Full Changelog: v1.21.0...v1.22.0