Releases: onnx/ir-py
v0.1.12
What's Changed
This update introduces the Value.replace_all_uses_with method, added for its convenience and discoverability. A new replace_graph_outputs option has been included, allowing users to replace graph outputs as well.
Note
Users are still responsible for assigning the original output name to the replacement value if they want to preserve the graph's signature.
BC Breaking
- Implement replace_all_uses_with on Value by @justinchuby in #235
Bug fixes
- Avoid override new_value info with None from old_value by @titaiwangms in #227
Other Changes
- Remove an inline import by @justinchuby in #222
Full Changelog: v0.1.11...v0.1.12
v0.1.11
What's Changed
This release introduces a new API tofile() on Tensors. It helps avoid unnecessary copies with tobytes() when a model is saved with external data. The API is introduced in a backward-compatible manner. See #210 for more information.
API
- Implement tofile on tensors to reduce data write time by 40% by @justinchuby in #210
Core
- Improve value renaming by @justinchuby in #208
Graph Passes
- Implement shape merging in identity elimination pass by @justinchuby in #206
Bug fixes
- Fix big endian handling in tobypes by @justinchuby in #209
Other Changes
- Remove Python version classifiers from pyproject.toml by @justinchuby in #219
- Add a torch tensor contiguous check by @titaiwangms in #220
Full Changelog: v0.1.10...v0.1.11
v0.1.10
What's Changed
API
- Update the graph initializers dictionary when renaming Value by @justinchuby in #197
- Create is_unknown and has_unknown_dim on Shape by @justinchuby in #201
Graph Passes
- [pass] Preserve value metadata in LiftConstantsToInitializersPass by @justinchuby in #204
Bug fixes
- Fix metadata props handling for values by @justinchuby in #198
- Handle when the value type is not known when serializing shapes by @justinchuby in #203
Full Changelog: v0.1.9...v0.1.10
v0.1.9
What's Changed
Breaking Changes and Deprecations
- Simplify attribute signatures and use tuples for repeating attrs by @justinchuby in #186
- Deprecate
ir.Inputin favor ofir.valby @justinchuby in #185
API
- Ensure int/float attributes are stored as Python int/float by @justinchuby in #178
- Create a convenience constructor for Value by @justinchuby in #179
Core
- Support deserializing non-utf8 attributes in rare case by @justinchuby in #184
Documentation
- Add missing .. versionadded:: for DataType.is_string by @iksnagreb in #177
Other Changes
- Require ml_dtypes>=0.5.0 by @justinchuby in #188
- Change Attr
__str__to use repr() by @justinchuby in #190
Full Changelog: v0.1.8...v0.1.9
v0.1.8
What's Changed
Note
This patch release includes a fix in the protobuf serialization logic to handle Boolean attributes for compatibility with protobuf>=6.
Bug fixes
- [serde] Cast attribute values to int or float by @justinchuby in #175
API
- Add more properties for numeric types to DataType by @iksnagreb in #171
Graph Passes
- Support string tensors in DeduplicateInitializersPass and call_onnx_api by @iksnagreb in #169
Documentation
- Create diagram for IR objects by @justinchuby in #69
- Fix typos in the diagram by @justinchuby in #173
Full Changelog: v0.1.7...v0.1.8
v0.1.7
What's Changed
API
- Add
metafield to attributes for metadata storage by @Copilot in #154 - Expose the graph property in
ir.Functionby @justinchuby in #158 - Default attribute type to INTS to avoid breaking BC by @justinchuby in #162
- Expose DeduplicateHashedInitializersPass by @justinchuby in #163
Core
- Update node deser logic to support out of order subgraphs by @justinchuby in #159
Graph Passes
- Fix initializer handling in LiftSubgraphInitializersToMainGraphPass pass by @justinchuby in #148
- [pass] Deduplicate initializers in subgraphs and fix bug in
subgraph()by @justinchuby in #156 - [pass] Create DeduplicateHashedInitializersPass by @justinchuby in #133
Documentation
- Fix a typo in NameFixPass docs by @justinchuby in #147
Other Changes
- Bump version to 0.1.7 by @justinchuby in #146
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #153
- Bump ruff from 0.12.8 to 0.12.9 in /requirements/lintrunner by @dependabot[bot] in #152
- Bump editorconfig-checker from 3.2.1 to 3.4.0 in /requirements/lintrunner by @dependabot[bot] in #151
- Adjust serde to remove outdated comments and fix error handling by @justinchuby in #149
- Create a tabular model printer tool by @justinchuby in #155
- Update license to a valid SPDX license expression by @justinchuby in #160
- Bump types-pyyaml from 6.0.12.20250516 to 6.0.12.20250809 in /requirements/lintrunner by @dependabot[bot] in #143
- Update pyproject.toml to require setuptools>=77 by @justinchuby in #161
Full Changelog: v0.1.6...v0.1.7
v0.1.6
What's Changed
Note
This patch release includes a fix for compatibility with PyTorch <2.7.0 in the tensor_adapters module. It is recommended that you update to this version if you leverage onnx_ir.tensor_adapters to interact with torch tensors.
Graph Passes
- Create a name fix pass to ensure unique names for all values and nodes by @Copilot in #124
Bug fixes
- Fix support for torch.float8_e8m0fnu for older versions of PyTorch by @justinchuby in #145
Full Changelog: v0.1.5...v0.1.6
v0.1.5
What's Changed
API
- Add support for FLOAT8E8M0 data type by @Copilot in #128
Graph Passes
- Create a identity-elimination pass by @Copilot in #121
Other Changes
- Remove import from _custom_element_types in test by @justinchuby in #136
Full Changelog: v0.1.4...v0.1.5
v0.1.4
What's Changed
Note
This release includes a fix to the 4 bit dtype handling logic in the TensorProtoTensor.numpy() method. You should update to this version if you use onnx-ir to process 4 bit tensor data (uint4, int4, float4e2m1) numerically with NumPy.
Bug Fixes
- Fix 4bit tensor unpacking by @justinchuby in #118
API
- [DataType] Add is_integer and is_signed queries by @iksnagreb in #110
Documentation
- Add versionadded in docs for enum methods by @justinchuby in #113
Other Changes
- Bump version to 0.1.4 by @justinchuby in #111
- Update CONTRIBUTING on DCO by @justinchuby in #112
- Create py.typed to allow type checkers by @justinchuby in #114
- Move py.typed by @justinchuby in #115
New Contributors
- @iksnagreb made their first contribution in #110
Full Changelog: v0.1.3...v0.1.4
v0.1.3
What's Changed
API
- Create adapters for torch by @justinchuby in #94
- Expose DeduplicateInitializersPass in common passes module by @copilot-swe-agent in #99
Graph Passes
- Add deduplication pass for initializer tensors by @AbhishekHerbertSamuel in #67
- [Pass] Support CSE constant nodes by @titaiwangms in #92
Bug fixes
- Support numpy scalars in
Tensorby @justinchuby in #102
Documentation
- Document changes between versions in docstrings by @justinchuby in #105
- Create CONTRIBUTING.md with development setup and lintrunner guidance by @copilot-swe-agent in #107
Other Changes
- Bump version to 0.1.3 by @justinchuby in #91
- [docs] Expose ir_tensor_adapters by @justinchuby in #95
- Set up copilot by @justinchuby in #97
New Contributors
- @AbhishekHerbertSamuel made their first contribution in #67
- @copilot-swe-agent made their first contribution in #99
Full Changelog: v0.1.2...v0.1.3