ONNX v1.18.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.
Key Updates
ai.onnx Opset 23
Attention, Cast, CastLike, Constant, ConstantOfShape, DequantizeLinear, Flatten, Identity, If, Loop, Pad, QuantizeLinear, RMSNormalization, Reshape, RotaryEmbedding, Scan, Shape, Size, Squeeze, Transpose, Unsqueeze
IR Version 11
- Added FLOAT4E2M1 and multi-device configuration support
- Relaxed naming requirements (#6652)
Python support
- Support Python 3.13
- Experimental support for Python 3.13t (Windows, Mac)
- Removed support for Python 3.8
- Windows Arm64
Build
- Minimum protobuf version is upgraded to v25.1
- A new option ONNX_BUILD_CUSTOM_PROTOBUF is added for CMAKE (#6495)
What's Changed
Breaking Changes and Deprecations
- Remove/raise exception when external file exists during onnx.save by @tonypottera24 in #6497
- Remove python 3.8 workflows (python 3.8 is eol) by @cyyever in #6434
- Deprecate all type casting functions by @justinchuby in #6639
- GroupNormalization-18 is now deprecated and replaced by GroupNormalization-23 due to an incorrect definition (#6358)
Spec and Operator
- Add FLOAT4E2M1 data type by @yuanyao-nv in #6318
- Add FLOAT4E2M1 support to relevant operators by @yuanyao-nv in #6283
- Fix typo in the GroupNorm description by @yuanyao-nv in #6358
- clarify clip with min>max by @AlexandreEichenberger in #6395
- Update IR spec to clarify optional input/output availability by @justinchuby in #6435
- Fix GlobalLpPool input types by @justinchuby in #6503
- Fix reference implementation for TopK by @neNasko1 in #6593
- Clarify that FLOAT4E2M1 can be in int32_data by @justinchuby in #6640
- Relax naming requirements in IR spec by @justinchuby in #6652
- Add Rotary Embedding op to ONNX opset 23 by @shubhambhokare1 in #6461
- Format rotary embedding documentation by @justinchuby in #6717
- Add RMSNormalization to ONNX opset 23 by @shubhambhokare1 in #6443
- Add Attention Op to ONNX Opset 23 by @shubhambhokare1 in #6501
- Add multi-device execution support in ONNX by @kevinch-nv in #6641
Reference Implementation
- Fix NonMaxSuppression default values in ReferenceEvaluator by @xadupre in #6354
- Update op_pool_common.py, add missing "| None" by @andife in #6421
- Allow 1D vector for w_scale in QLinearConv by @mcollinswisc in #6460
- Fix pooling pads issues by @titaiwangms in #6650
Utilities and Tools
- Fix shape inference for Squeeze-1,11 with dynamic input shape by @Yosshi999 in #6314
- Extend printer and parser to support invalid identifiers by @gramalingam in #6346
- Support node labels in parser and printer by @gramalingam in #6349
- Fix parser to handle empty optional parameters in edge cases by @gramalingam in #6427
- Optimize DFS by @tonypottera24 in #6440
- Separate the infer_shapes option from the check_model option by @tonypottera24 in #6441
- Support models larger than 2GB by @tonypottera24 in #6438
- Add missing CHECK_PARSER_STATUS by @cyyever in #6448
- Fix
MAXIMUM_PROTOBUF
size (2GiB, not 2GB) by @xenova in #6556 - Fix numpy_helper to_array by @justinchuby in #6638
- Add version converter softmax 13 -> 12 by @seungwoo-ji-03 in #6608
Build, CI and Tests
- Update Protobuf to latest version (Win) by @liqunfu in #6362
- Use CMake python module by @cyyever in #6381
- Revert Python finding logic and some CMake fixes for Windows by @cyyever in #6382
- Enable more compiler warnings by @cyyever in #6383
- Remove pypi publishing inside "release_" by @andife in #6483
- Fix g++-13 build errors by @cyyever in #6509
- Move to using protogen's .pyi file generator by @justinchuby in #6462
- Python 3.13: builds successful for all os by @andife in #6370
- Simplify CMake argument handling in setup.py by @cyyever in #6545
- Remove struct and leverage ml_dtypes in helper tests by @justinchuby in #6631
- Add cmake dependency only when system cmake is not available (backend version) by @mgorny in #6643
- Remove onnxruntime tests by @justinchuby in #6709
- python313t builds in main_freethreading.yml by @andife in #6706
- Improve CMake summary by @cyyever in #6704
- Add protobuf local build option by @cyyever in #6495
- Harmonize protobuf versions by upgrading to a minimum protobuf version of 25.1 and fix CI error by @cyyever in #6725
- Include
backend.py
in source distribution by @mgorny in #6755
Documentation
- Move INSTALL instruction to separate file by @andife in #6560
- Fix Pad operator example in Python API docs (correct attribute usage) by @kolasaniv1996 in #6702
Other Changes
- Remove unused variables by @cyyever in #6303
- Fix main url checks by @roborags in #6312
- Bumped main VERSION_NUMBER to 1.18.0 by @roborags in #6315
- Bump ai.onnx opset to 23 by @roborags in #6316
- Combine different release pipelines by the use of reusable workflows by @andife in #6277
- Bump actions/upload-artifact from 3 to 4 by @andife in #6319
- Fix missing secrets for publishing of onnxweekly by @andife in #6321
- Update main.yml (upgrade github actions download/upload artifact) by @andife in #6320
- BF: fix condition for publishing to testpypi (Update create_release.yml) by @andife in #6338
- Fix OOB in data propagation of math ops when input is broadcasted to zero by @Yosshi999 in #6323
- The latest protobuf pkg 5.28.0 is failing on Windows. use the one pre… by @liqunfu in #6342
- Set up codecov test analysis by @justinchuby in #6345
- Fix model extraction utility by @gramalingam in #6344
- Add missing matrix.target-architecture ? (Update release_mac.yml) by @andife in #6350
- Some performance fixes in C++ code, use of emplace instead of insert by @cyyever in #6304
- Fix some clang-tidy warnings by @cyyever in #6353
- BugFix: make sure that unique files names are used before uploading the wheels by @andife in #6355
- Simplify create_release.yml by @andife in #6357
- Fix more static analyser warnings by @cyyever in #6360
- Fix more static analyzer warnings by @cyyever in #6363
- Not all release runs have to be successul for publishing weekly to testpypi by @andife in #6372
- CI: Restoring the possibility to initiate a run via labels by @andife in #6371
- Fix wrong publishing target (onnx instead of onnx-weekly) by @andife in #6375
- Trigger release pipeline when label "run release..." was added to PR by @andife in #6376
- Fix clang-tidy warnings by @cyyever in #6378
- Avoid returning const vectors by @cyyever in #6391
- Fix more clang-tidy warnings by @cyyever in #6392
- Use std::unordered_{map,set} by @cyyever in #6390
- Set hidden visibility on onnx target by @cyyever in #6393
- Fix more static analyser warnings by @cyyever in #6396
- Add clang-tidy checks and fix warnings by @cyyever in #6398
- Use -Wall -Wextra on APPLE platforms by @cyyever in #6399
- Support official Python launcher on Windows by @petewarden in #6407
- Add misc checks and turn some functions and variables into static by @cyyever in #6401
- Enable more clang-tidy checks by @cyyever in #6429
- Update DFS function to non-recursive version by @tonypottera24 in #6424
- Refactor parser code by @cyyever in #6397
- Create a workflow to suggest lintrunner fixes by @justinchuby in #6377
- Fix ODR violations by @cyyever in #6439
- Fix invalid use of const_cast by @cyyever in #6451
- Use enum class for StatusCategory and StatusCode by @cyyever in #6450
- Fix static analyzer warnings by @cyyever in #6449
- Fix excpetion handling by @cyyever in #6453
- Fix python linter warnings in setup.py by @cyyever in #6459
- Move suggest fixes to a separate CI workflow by @justinchuby in #6455
- Optimize _collect_new_io_core in extract_model by @tonypottera24 in #6466
- Enhance CenterCropPad documentation by @jantonguirao in #6464
- Simplify protobuf linking by @cyyever in #6444
- Print correct Python version in CMake summary by @cyyever in #6467
- Fix ODR violations by @cyyever in #6468
- Migrate to ubuntu-24.04 runner by @andife in #6373
- Add type annotations and fix some lint warnings in Python code by @cyyever in #6470
- Optimize dfs in extract_model by dict by @tonypottera24 in #6472
- More robust utf-8 string conversions on Windows by @cyyever in #6454
- Optimize collect_referred_local_functions in extract_model by @tonypottera24 in #6478
- Move output map to a function in extract_model by @tonypottera24 in #6485
- Add type annotations and fix some lint warnings in Python code by @cyyever in #6473
- Update ruff to 0.7.0 by @cyyever in #6482
- Add more type annotations and fix warnings in Python code by @cyyever in #6474
- Remove __STDC_FORMAT_MACROS by @cyyever in #6487
- Fix clang -Weverything warnings by @cyyever in #6493
- change onnx-weekly destination from test.pypi to pypi by @andife in #6491
- Bump pybind11 to 2.13.6 by @cyyever in #6486
- Bump protobuf to 5.28.3 by @cyyever in #6330
- Fix protobuf version unmatch by @cyyever in #6498
- Upload the srcdist to pypi as a separate step by @andife in #6488
- Another attempt to fix protobuf version problem by @cyyever in #6508
- Bugfix fix file name in create_release.yml by @andife in #6510
- Fix pipeline, limit to onnxruntime <1.20 for docs build by @andife in #6524
- Add LANGUAGE to CMake project by @cyyever in #6527
- Fix reference implementation for ConcatFromSequence by @xadupre in #6369
- Add publishing of devbuild to testpypi by @andife in #6535
- Update page deployment CI to test building pages in PRs by @justinchuby in #6530
- Use localy build protobuf in doc pages by @cyyever in #6539
- Migration to FindPython3.cmake by @ilya-lavrenov in #6526
- Fix upload endpoint (pypi) by @andife in #6541
- Update calender link by @andife in #6528
- Remove usage of Mac12-Runner by @andife in #6542
- Add python 3.13 for release_* workflows by @andife in #6543
- Fix getsize bug in extract_model by @tonypottera24 in #6496
- Improving the environment name by @andife in #6544
- Fix extra-semi warnings on public headers by @cyyever in #6538
- Fix of the devbuild publish-workflow by @andife in #6546
- Removing unit test involving onnxruntime by @andife in #6549
- Publish to test.pypi only for testing (with workflow dispatch) by @andife in #6548
- Use rank in data propagation by @gramalingam in #6557
- Fix handling of tensor rank in concat data propagation by @gramalingam in #6570
- Update gather doc by @gramalingam in #6585
- Fix: skip empty input output names in Extractor by @wine99 in #6587
- Upgrade to Python 3.9 by @cyyever in #6595
- add grammatical corrections to documentation by @rudrOwO in #6599
- Fix wrong comparison between numpy dtypes to None by @xadupre in #6588
- Fix reference implementation for CumSum by @neNasko1 in #6597
- Fix reference implementation for Unique by @neNasko1 in #6596
- Bump Protobuf to 5.29.2 by @cyyever in #6600
- Use ruff as the code formatter by @justinchuby in #6504
- Install missing pytest; Update release_test_weekly_sdist.yml by @andife in #6617
- Enable more readability checks by @cyyever in #6618
- Allow scale type in QuantizeLinear and DequantizeLinear to be different from the high-precision type by @yuanyao-nv in #6531
- Improve attribute checking in
CategoryMapper
by @neNasko1 in #6619 - fix typo: Update README.md by @andife in #6620
- Expose cxx standard by @ilya-lavrenov in #6625
- Remove vscode settings by @justinchuby in #6628
- Improve INSTALL.md by @cyyever in #6629
- Enable isort rules in ruff formatter by @justinchuby in #6632
- Fix the bfloat16 test in helper for min numpy version by @justinchuby in #6636
- Fix link in readme by @andife in #6644
- Fix literal operator in Clang17+ by @fs-eire in #6633
- Unify names of github environments by @andife in #6651
- Improve Names in CI pipeline by @andife in #6657
- Improve name in CI-Pipeline by @andife in #6659
- Remove unnecessary secrets in pipeline by @andife in #6661
- Hardening of checkout by @andife in #6662
- Use static dbg_count variables by @cyyever in #6494
- Use DeprecationWarning by @justinchuby in #6667
- Improve release_linux_*.yml by @andife in #6671
- Check if wheels should be published before using a job with a deployment environment by @andife in #6688
- Bump absl cpp to 20240722.1 by @cyyever in #6672
- remove twine from requirements-dev-file by @andife in #6692
- Correct protobuf install instructions on Windows by @natke in #6695
- Update INSTALL.md to show build onnx on Windows by @natke in #6696
- Check the input of ConstantOfShape to be non-negative by @sgjzfzzf in #6691
- TypoFix in float8.md by @mehmetcanfarsak in #6699
- Update recommended Protobuf version and other improvements in INSTALL.md by @cyyever in #6701
- Use Python3_add_library to simplify build code by @cyyever in #6705
- Hardcoding the docker image version, adding the information which docker images are used by @andife in #6663
- Fix a tensor type inaccuracy in the docs by @nenad1002 in #6707
- Add
dtype
tests for various operators by @bili2002 in #6687 - Improve names, add debug variables by @andife in #6714
- Fix condition at download step for publishing manuel preview build by @andife in #6715
- Fix mismatched parenthesis in ci by @andife in #6716
- Fix condition in CI for sdist download by @andife in #6719
- Update Jupyter notebook examples by @emmanuel-ferdman in #6729
- check_for_publish_preview_build_to_testpypi_weekly in CI should fail for PullRequests by @andife in #6727
- Modify axis description for RMSNormalization op by @shubhambhokare1 in #6732
- Set version 4.25.1 as min protobuf python version by @andife in #6722
- update auto_update_doc and create sdist_test.yml by @andife in #6723
- Update preview_source_dist_test.yml by @andife in #6724
- Publish to testpypi only for workflow_dispatch event by @andife in #6750
- Update dependabot.yml by @andife in #6753
- Add copyright header to pyproject.toml by @andife in #6752
- define top-level permission by @andife in #6747
- add windows 3.13t build to main_freethreading.yml (Updates of external dependencies now enable this) by @andife in #6749
- Simplify checkout submodules by @andife in #6762
- Integrate mac freethreading whl to release process by @andife in #6761
- Clarify minimum Protobuf version in INSTALL.md by @cyyever in #6760
- Improve condition in create_release.yml by @andife in #6765
- Remove separate onnx-directory in release_win.yml by @andife in #6766
- Update RotaryEmbedding 4D input shape dimension order by @shubhambhokare1 in #6767
- chore(config): set persist credentials to false by @andife in #6774
- Use CMAKE_COMPILER_IS_GNUCXX for g++ by @cyyever in #6770
- fix: names of jobs in create_release.yml by @andife in #6769
- Improve Python code typing by @cyyever in #6763
- Enable flake8-type-checking by @cyyever in #6775
- Merge requirements-release_freethreading into requirements-release by @cyyever in #6776
- Bump ruff to 0.9.10 by @cyyever in #6780
- Adapt requirements files as 3.9 is the minimal supported python version by @andife in #6777
- feat: freethreading python wheels for windows by @andife in #6764
- refactor: remove unnecessary x86 check in win freethreading by @andife in #6785
- Update sdist_test.yml by @andife in #6786
- fix: Use correct requirements file for release_mac_freethreading.yml by @andife in #6768
- Update auto_update_doc.yml by @andife in #6792
- fix: dont' push wheels with the same filename to pypi twice by @andife in #6790
- Remove dependabot configs for dockerfiles by @andife in #6789
- fix non existing requirements-file by @andife in #6796
- fix wrong use of always in release_linux_x86_64.yml by @andife in #6797
- Remove ignore_type suppression by @cyyever in #6788
- Update gtest to version > v1.16.0 (commit of 8March25) by @andife in #6783
- hard code docker image docker://quay.io/pypa/manylinux2014_x86_64:2025.02.28-1 in release pipeline by @andife in #6799
- windows-latest -> windows-2022 by @andife in #6800
- [2/N]Remove ignore_type suppression by @cyyever in #6798
- Remove duplicates in test by @andife in #6791
- Remove wrong usage of "always" in aarch64 release pipeline... by @andife in #6806
- fix condition in pipeline by @andife in #6810
- Bump minimum numpy to 1.22 by @andife in #6812
- Improve condition in rotary embedding to control 3D/4D inputs/outputs by @shubhambhokare1 in #6815
- Fix MSVC warnings by @cyyever in #6820
- Fix pylint warnings by @cyyever in #6778
- Update version to 1.18.0rc1 by @ramkrishna2910 in #6866
- 1.18.0 cherry pick by @ramkrishna2910 in #6867
- Fix missing inputs in create_release.yml by @andife in #6868
- update versions by @ramkrishna2910 in #6880
- Add wheel build for windows arm64 by @andife in #6912
- Export symbols used by PyTorch by @cyyever in #6917
- Pick CMake changes by @cyyever in #6922
- Update VERSION_NUMBER to 1.18.0rc2 by @andife in #6921
- update version to 1.18.0 by @ramkrishna2910 in #6954
Contributors
Andreas Fehlner, Atanas Dimitrov, Bilyana Indzheva, Emmanuel Ferdman, G. Ramalingam, Ilya Lavrenov, Joaquin Anton, Joshua Lochner, Justin Chu, Kevin Chen, Liu Jinjie, Mehmet Can Farsak, Michał Górny, Nat Kershaw (MSFT), Nenad Banfic, Pete Warden, Po-Chu Hsu, Ramakrishnan Sivakumar, Rudro, Shubham Bhokare, Ti-Tai Wang, Xavier Dupré, Yuan Yao, Yulong Wang, Zijun Yu, cyyever, dependabot[bot], kolasaniv1996, mcollinswisc, seungwoo-ji
New Contributors
- @Yosshi999 made their first contribution in #6314
- @petewarden made their first contribution in #6407
- @tonypottera24 made their first contribution in #6424
- @mcollinswisc made their first contribution in #6460
- @xenova made their first contribution in #6556
- @wine99 made their first contribution in #6587
- @rudrOwO made their first contribution in #6599
- @neNasko1 made their first contribution in #6597
- @mgorny made their first contribution in #6643
- @titaiwangms made their first contribution in #6650
- @sgjzfzzf made their first contribution in #6691
- @mehmetcanfarsak made their first contribution in #6699
- @kolasaniv1996 made their first contribution in #6702
- @nenad1002 made their first contribution in #6707
- @bili2002 made their first contribution in #6687
- @seungwoo-ji-03 made their first contribution in #6608
- @emmanuel-ferdman made their first contribution in #6729
Full Changelog: v1.17.0...v1.18.0