Releases: microsoft/onnxscript
v0.3.0
Note
Starting from v0.3, onnxscript.ir
is an alias of onnx_ir
. Visit https://github.com/onnx/ir-py for source code.
What's Changed
Breaking Changes
- [pass] Update LiftSubgraphInitializersToMainGraphPass to disallow variable shadowing by @justinchuby in #2348
- Formally drop python 3.8 support by @justinchuby in #2354
Optimizer and rewriter
- Fix cross attention in MHA by @gramalingam in #2337
- Implement
__repr__
for MatchResult by @justinchuby in #2353
ONNX IR
- Use onnx_ir as a dependency by @justinchuby in #2324
Torch Lib
- [torchlib] Set allowzero=True on Reshape where appropriate by @justinchuby in #2346
- [torchlib] Fix pow.Tensor_Scalar type promotion by @justinchuby in #2335
Other Changes
- Update publish pipelines to use 1ES templates by @justinchuby in #2349
Full Changelog: v0.2.7...v0.3.0
v0.2.7
What's Changed
Optimizer and rewriter
- Optimize causal mask shape by @gramalingam in #2325
- Fix handling of attention-bias in MHA fusion by @gramalingam in #2332
- Ensure rule ordering in MHA fusion by @gramalingam in #2334
- Rewriter: Fold Batchnorm nodes by @AyoubMDL in #2312
- Refine shape optimization by @gramalingam in #2336
ONNX IR
- [IR][fix] Implement copy() for graph inputs/outputs by @justinchuby in #2338
- Add type checks to Attr methods by @justinchuby in #2310
- [IR] Handle external initializers in subgraphs by @justinchuby in #2347
Torch Lib
- [torchlib] Update linear implementation to support 1d weights by @justinchuby in #2340
- [torchlib] Implement floor_divide for int inputs by @justinchuby in #2343
Other Changes
- Update publish pipeline to use an environment by @justinchuby in #2330
- Update publish as a deployment job by @justinchuby in #2333
Full Changelog: v0.2.6...v0.2.7
v0.2.6
What's Changed
Breaking Changes
- Remove the RefAttr class by @justinchuby in #2328
- [IR] Normalize "ai.onnx" domain to "" by @justinchuby in #2283
Optimizer and rewriter
- Add BiasGelu, Erfgelu and SkipLayerNormalization fusions by @shubhambhokare1 in #2222
- Allow sdpa fusion to accept custom scale factor by @shubhambhokare1 in #2210
- Add support for a non-backtracking version of pattern disjunction by @gramalingam in #2242
- Rewrite Skip fusions with check functions by @shubhambhokare1 in #2259
- Add support for backtracking in pattern matcher by @gramalingam in #2273
- Add fusion rules (Whisper optimizations) by @shubhambhokare1 in #2221
- Use OrPatterns to support SkipLayerNormalization rewrite variations by @shubhambhokare1 in #2277
- Unify rule implementations with classes by @justinchuby in #2288
ONNX IR
- [IR] Handle invalid output deserialization by @justinchuby in #2223
- [IR] Improve documentation 1/n by @justinchuby in #2227
- Improve
ir.node
annotations to accept None inputs by @justinchuby in #2224 - Update type annotations for passes by @justinchuby in #2230
- Add LazyTensor class to implement ir.TensorProtocol by @justinchuby in #2232
- [IR] Support specifying output value in Tape by @justinchuby in #2225
- [IR] Allow to copy an unfrozen version of the Shape by @justinchuby in #2238
- [IR] Use shape.freeze() by @justinchuby in #2247
- [IR] Fix sequence handling in tensor function by @justinchuby in #2252
- [IR] Introduce short name for dtypes by @justinchuby in #2249
- [IR] Display constant tensors for Value by @justinchuby in #2248
- [IR] Refactor TensorBase to simplify implementation by @justinchuby in #2081
- [pass] Update DCE passes by @justinchuby in #2257
- Create short tensor str for nodes by @justinchuby in #2262
- [Pass] Support lifting subgraph initializers to main graph by @titaiwangms in #2266
- Add add/remove initializers passes by @justinchuby in #2253
- [IR] Export all common passes in
onnxscript.ir.passes.common
by @justinchuby in #2270 - [IR] Record owning graph for input/output/initializers by @justinchuby in #2282
- Add from_onnx_text function to convert ONNX text to IR model by @justinchuby in #2291
- [IR] Docs for Node by @justinchuby in #2297
- [IR] introduce slice support on graph by @Johansmm in #2307
Torch Lib
- [torchlib] Fix scatter reduce on error cases by @justinchuby in #2287
Documentation
- Improvement to IR docs 2/n by @justinchuby in #2229
Other Changes
- Generate opset23 with opgen by @justinchuby in #2226
- Update proto comparison error message by @justinchuby in #2215
- Refactor test models for ort_fusions by @shubhambhokare1 in #2237
- Use ir methods to replace onnx helper by @justinchuby in #2091
- Export version_converter and support model proto by @justinchuby in #2251
- Fix attribute handling in autocast by @justinchuby in #2256
- Update optimize_for_ort call to allow debug and shape_inference modes by @shubhambhokare1 in #2236
- Temporarily skip the whisper test in skip layernorm fusion by @justinchuby in #2286
- Returning choice values in patterns by @gramalingam in #2284
- Fix docs builder pipeline by @justinchuby in #2293
- Split pattern.py by @gramalingam in #2296
- Fix rename within comments by @gramalingam in #2305
- Create publish-dev.yml for ESRP release by @justinchuby in #2101
- Update CONTRIBUTING.md to remove the note about production by @justinchuby in #2308
- Fix RewriterContext import error by @gramalingam in #2314
- Update publish-dev.yml by @justinchuby in #2306
- Fix bug in handling constants in cos sin fusion by @gramalingam in #2319
- Fixes to version converter by @gramalingam in #2318
- Disable fused_matmul_rule_sets by @titaiwangms in #2321
- Remove unnecessary warning by @xadupre in #2327
- Cleanup mha-bias rules using disjunction by @gramalingam in #2326
- Create official ESRP publishing pipelines by @justinchuby in #2320
Full Changelog: v0.2.5...v0.2.6
v0.2.5
What's Changed
Breaking Changes
- Constructor of
ir.Function
now takes metadata_props from the ir.Graph object. #2182
Core ONNX Script
- Annotate
script()
withParamSpec
for more accurate typing by @justinchuby in #2178 - Replace ast.NameConstant with ast.Constant and remove duplicates by @justinchuby in #2188
Optimizer and rewriter
- Introduce pattern.any_value by @gramalingam in #2175
- [Pass] Fix bugs in LiftConstantsToInitializersPass by @titaiwangms in #2189
- [pass] Avoid lifting tensors that are too small to initializers by @justinchuby in #2190
- Avoid using fixed value for max_pos_ids in cos_sin_cache fusion by @shubhambhokare1 in #2167
- Add fusion rule to fuse (query, key, value) to a packed QKV for GQA by @shubhambhokare1 in #2174
- Update constant fold to use correct numpy type by @justinchuby in #2204
- Remove legacy optimizer by @justinchuby in #2180
- [Pass] Remove metadata_props and doc_string from the model by @titaiwangms in #2182
ONNX IR
- [Pass] Support lift constants to initializers pass by @titaiwangms in #2160
- [pass] Create topological sort pass by @justinchuby in #2191
- [pass] Create check to ensure in-place passes are actually inplace by @justinchuby in #2192
- [IR] Reconcile graph in Node by @justinchuby in #2183
- [IR] Implement
model.graphs()
by @justinchuby in #2200 - [passes] Move inliner to common passes by @justinchuby in #2206
- [passes] Remove external_data_folder option from FoldConstantsPass by @justinchuby in #2207
- [pass] Implement checker pass and refactor shape inference by @justinchuby in #2199
- [IR][fix] Save value info for initializers by @justinchuby in #1552
- [IR] Allow pass result as pass input by @justinchuby in #2220
- [pass] Create version converter pass by @justinchuby in #2214
- [pass] Remove unused initialized inputs in DCE by @leshabirukov in #2212
Torch Lib
- [torchlib] Precompute the constant for gelu to avoid precision loss by @justinchuby in #2179
- [torchlib] Fix calls to Unsqueeze to provide correct 1d axes by @justinchuby in #2186
- Implement fft torchop by @bmehta001 in #2141
Documentation
- Update onnxscript documentation page by @justinchuby in #2177
Other Changes
- Remove benchmark from tools by @justinchuby in #2173
- Modify constant-folder to return computed symbolic value map by @gramalingam in #2172
- Update ort-nightly version in test by @justinchuby in #2193
- Updated docs for rewrite-patterns by @LuniaKunal in #2196
- Add test for TopologicalSortPass on functions by @justinchuby in #2198
- Update TorchTensor to use ml_dtypes by @justinchuby in #2201
- Update release.yml to change the section for passes by @justinchuby in #2208
- Fix optimizer tests by @justinchuby in #2217
New Contributors
- @LuniaKunal made their first contribution in #2196
- @bmehta001 made their first contribution in #2141
Full Changelog: v0.2.4...v0.2.5
v0.2.4
What's Changed
Optimizer and rewriter
- Turn inliner into a pass and use it in rewriter & optimizer by @justinchuby in #2149
- Add fusion rules for com.microsoft.Attention by @shubhambhokare1 in #2148
- Allow fuse_xformers to return a count of different fusions applied by @shubhambhokare1 in #2159
- GQA Fusion by @gramalingam in #2161
- Optimization to avoid trying multiple attention-based fusions by @shubhambhokare1 in #2168
- Handle empty rewrite rules in rewrite function by @justinchuby in #2164
ONNX IR
- [IR] Expose the Tape module by @justinchuby in #2127
Other Changes
- Create auto release notes by @justinchuby in #2170
Full Changelog: v0.2.3.1...v0.2.4
v0.2.3
Summary
This bug fix release includes multiple important fixes for torchlib
and enhancement to the rewriter
rules. It also contains fixes for the pass infrastructure in ir
and addition of convenience constructors (#2126). Common graph transformation passes are now exposed in onnxscript.ir.passes.common
.
What's Changed
- [torchlib] Fix index_put: handle None cases by @AyoubMDL in #2061
- [IR] Add support for quant_parameter_tensor_names field by @justinchuby in #2080
- Add unique op by @a-gardner1 in #1547
- Add Op (Slice - complex) | feat torchlib by @titaiwangms in #2089
- Fix Op (Slice complex) | improve dim expression by @titaiwangms in #2094
- Generalize MHA pattern by @gramalingam in #2092
- [IR] Fix deserialize_node by @Johansmm in #2098
- Fusion for partial rotary embedding by @gramalingam in #2095
- [torchlib] Fix layer norm dtype by @justinchuby in #2100
- [torchlib] Register
aten::__lshift__
and__rshift__
by @justinchuby in #2102 - Remove the experimental IR graph builder by @justinchuby in #2104
- [CI] Fix test errors on windows by @justinchuby in #2103
- A couple of extensions to MHA fusion by @gramalingam in #2106
- Make test test_smollm 20% faster by @xadupre in #2107
- Fix Op (convolution) | add nd support to convolution by @titaiwangms in #2108
- Add Op (aten::masked_scatter) | feat (torchlib) by @titaiwangms in #2112
- Enable version converter for torch>=2.6 by @shubhambhokare1 in #2111
- Turn constant folder and dce into passes by @justinchuby in #2109
- Add SDPA fusion unit test case by @gramalingam in #2116
- Extend sdpa tests by @shubhambhokare1 in #2118
- [IR] Create a shape inference pass using onnx shape inference by @justinchuby in #2117
- Fix DORT CI according to torch-nightly changes by @justinchuby in #2125
- [rewriter] Enable llama rule sets by @titaiwangms in #2124
- [IR] Convenience constructor for Node by @justinchuby in #2126
- Add spda rules and tests for unmasked patterns by @shubhambhokare1 in #2123
- [IR] Handle ONNX custom types in DataType.from_numpy by @justinchuby in #2131
- Add Gelu Tanh fusion rule by @gramalingam in #2132
- Cleanup ort transformer fusions by @gramalingam in #2115
- Use self._use_mask in sdpa rewrite call by @shubhambhokare1 in #2135
- [rewriter | torchlib] respect ops order in torchscript graph by @titaiwangms in #2134
- [IR] Improve pass infra by @justinchuby in #2120
- A couple of ort fusion fixes by @gramalingam in #2136
- Rotary embedding needs function extraction by @gramalingam in #2139
- [Passes] Consolidate DCE passes into common passes by @justinchuby in #2143
- Make the return type of rewrite check functions a MatchResult object by @shubhambhokare1 in #2138
- Optimize away zero-length concat operands by @gramalingam in #2150
- Fix include_self for scatter_reduce by @xadupre in #2090
- [torchlib] Fix aten_div rounding_mode by @justinchuby in #2147
- Remove warning messages by @gramalingam in #2151
New Contributors
- @AyoubMDL made their first contribution in #2061
- @a-gardner1 made their first contribution in #1547
Full Changelog: v0.2.2...v0.2.3.1
v0.2.2
What's Changed
- Doc script const 1 by @leshabirukov in #2004
- Create stable apis for torch 2.7 by @justinchuby in #2063
- Fix misleading annotation in the documentation by @xadupre in #2046
- Enable extraction of rewritten subgraph as model-local function by @gramalingam in #2065
- Make onnxscript release 1ES compliant by @jchen351 in #2071
- Add a couple of variants of patterns in ORT fusions by @gramalingam in #2077
- [IR] Fix an error when checking for float8_e4m3fnuz type in ir.Tensor by @justinchuby in #2078
- Squeeze Reshape Identity optimization by @gramalingam in #2083
- add cudnn_enable flag to aten_layer_norm by @yushangdi in #2085
- Extensions to transformer fusions by @gramalingam in #2082
New Contributors
- @leshabirukov made their first contribution in #2004
- @jchen351 made their first contribution in #2071
- @yushangdi made their first contribution in #2085
Full Changelog: v0.2.1...v0.2.2
v0.2.1
This release includes several bug fixes for the PyTorch->ONNX decomposition library (torchlib).
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- [torchlib] Simplify squeeze by @justinchuby in #2047
- [torchlib] Add memory_format to ones_like by @justinchuby in #2049
- Fix aten_pow when first input is a python constant by @xadupre in #2048
- [torchlib] Fix various implementations by @justinchuby in #2050
- Expose opset22 by @justinchuby in #2053
- Refactor ort specific fusions by @gramalingam in #2039
- [torchlib] Fix reflection pad by @justinchuby in #2037
- [torchlib] Make matmul trace_only by @justinchuby in #2055
- Minor cleanup by @gramalingam in #2056
- [torchlib] Simplify aten_trunc implementation by @justinchuby in #2057
Full Changelog: v0.1.0...v0.1.1
v0.1.0
First official release
Full Changelog: https://github.com/microsoft/onnxscript/commits/v0.1.0