Releases: microsoft/onnxscript
Releases · microsoft/onnxscript
v0.5.2
What's Changed
Optimizer and rewriter
- [rewriter] Remove generic pattern matcher by @justinchuby in #2567
- Add GQA fusion to ONNX fusions by @gramalingam in #2524
Torch Lib
- [torchlib] Fix aten_gather to correctly handle scalar indices by @linshokaku in #2566
- [torchlib] Simplify linalg_vector_norm to remove the redundant Abs by @justinchuby in #2570
New Contributors
- @linshokaku made their first contribution in #2566
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
Optimizer and rewriter
- Remove CheckerPass from ort_fusion by @justinchuby in #2560
Other Changes
- Bump version from 0.5.0 to 0.5.1 by @justinchuby in #2559
- Use ir.val to replace ir.Input by @justinchuby in #2556
- chore(deps): bump ruff from 0.12.11 to 0.13.0 in /requirements/lintrunner by @dependabot[bot] in #2563
Full Changelog: v0.5.0...v0.5.1
v0.5.0
What's Changed
Breaking Changes
- Refactor rewrite rules into the rewriter.rules namespace by @justinchuby in #2531
- Update constant folding behavior for large tensors by @justinchuby in #2488
Optimizer and rewriter
- [Rewriter] Prevent out of range when matching node outputs by @iksnagreb in #2508
- Add RMS Normalization variant by @gramalingam in #2519
- [Optimizer] Fix reinterpretation of strings in _get_numpy_value by @iksnagreb in #2514
- Improve symbolic dim tracking by @gramalingam in #2520
- Remove function extraction in ONNX rotary embedding by @gramalingam in #2525
- [Optimizer] Avoid accessing None value in _process_constant_node by @iksnagreb in #2513
- Increase DEFAULT_CONSTANT_FOLD_INPUT_SIZE_LIMIT by @justinchuby in #2527
- [Rewriter(matmul_add_to_gemm)]: check shapes by @AyoubMDL in #2528
- Add ort-specific passes to ort_fusion by @titaiwangms in #2532
- [Reland] Update SplitToSequence in constant folding by @titaiwangms in #2544
- [Rewriter]: add fusion rules for successive Min/Max patterns by @AyoubMDL in #2500
- [rewriter] Unify reshape flatten ops by @Johansmm in #2518
- Do not try to fold op.SplitToSequence when split is
None
by @titaiwangms in #2550 - [Rewriter] Add fuse batchnorm to default rules by @AyoubMDL in #2553
- Add Conv-Affine(Mul+Add) and hardswish fusion by @Stonesjtu in #2472
- Fix rewriter and CI tests for the latest onnx-ir version by @justinchuby in #2554
Torch Lib
- [torchlib] Modify aten_unbind to use None for split_sizes by @justinchuby in #2536
- [torchlib] Improve pixel_shuffle by @justinchuby in #2537
- [torchlib] Improve handling of SymInt[] by @justinchuby in #2522
- [torch] Fix incorrect Concat when processing dynamic paddings by @kistenklaus in #2540
- Add test for dynamic padding by @justinchuby in #2541
- [torchlib] Mark atan2 as trace_only and map NaN to 0 by @justinchuby in #2557
- [torchlib] Fix repeat_interleave when repeats is a symbolic tensor by @xadupre in #2548
- Support
enable_gqa
and only support 4D Q, K, and V by @titaiwangms in #2558 - [torchlib] Implement torch.ops.prims.broadcast_in_dim.default by @Copilot in #2382
Other Changes
- chore(deps): bump actions/upload-pages-artifact from 3 to 4 by @dependabot[bot] in #2517
- Generate opset24 ops by @justinchuby in #2523
- Disable unstable tests by @xadupre in #2512
- Bump version to 0.4.1 by @justinchuby in #2529
- More robust checks for FLOAT8E8M0 by @justinchuby in #2530
- chore(deps): bump ruff from 0.12.10 to 0.12.11 in /requirements/lintrunner by @dependabot[bot] in #2535
- Implements repeat_interleave by @xadupre in #2477
- Update onnx-weekly version to 1.20.0 by @justinchuby in #2545
- [Rewriter] Support specifying node name in rewrites by @AyoubMDL in #2474
- Bump version to 0.5.0 by @justinchuby in #2538
New Contributors
- @iksnagreb made their first contribution in #2508
- @kistenklaus made their first contribution in #2540
- @Stonesjtu made their first contribution in #2472
Full Changelog: v0.4.0...v0.5.0
v0.4.0
What's Changed
Breaking Changes
- Remove torchscript graph builder by @justinchuby in #2444
New Features
- [torch api] Create torch API for PyTorch 2.9 by @justinchuby in #2503
Optimizer and rewriter
- Expose match functionality of rewrite-rule by extracting base classes by @Copilot in #2447
- Implement MatchContext class for rewriter pattern matching by @Copilot in #2455
- [Rewriter] Implement value/node level checkers for pattern matching infrastructure by @Copilot in #2459
- fix: handling of default attrs in SimplifiedLayerNormalization + LayerNormalization🐛 by @KarelZe in #2396
- Add initial support for RotaryEmbedding fusion for onnx opset 23 by @gramalingam in #2450
- Attention mask for GQA fusion by @gramalingam in #2452
- Handle matching against None explicitly by @gramalingam in #2460
- [docs] Document rewriter pattern options by @Copilot in #2406
- Rename fusion files by @gramalingam in #2476
- [Rewriter] Add optimizer to fold Pad operators into Conv by @Johansmm in #2363
- MHA fusion cleanup by @gramalingam in #2481
- Remove double transpose flag in MHA fusion by @gramalingam in #2483
- Add reproduction test case for incorrect slice rewrite and add potential fix by @sebimarkgraf in #2478
- [ort_fusuion] Support fp16 in rms_norm fusion by @titaiwangms in #2491
- Introduce layer-norm fusion by @gramalingam in #2492
- Correctly create empty ints for Constant in rewriter by @justinchuby in #2497
- Add Erf-based Gelu fusion rule by @gramalingam in #2495
- Extend rewriter to handle subgraphs by @gramalingam in #2494
- Minor fix for getting function's graph by @gramalingam in #2504
- Fixes for when attr type can be ambiguous for empty lists by @justinchuby in #2505
Torch Lib
- [torchlib] Improve aten_chunk conversion by @justinchuby in #2469
- Make onnx export SDPA match aten behavior by @IlyasMoutawwakil in #2479
- Add condition to dropout and ref to isnan by @titaiwangms in #2482
- Support aten::scatter.src by @titaiwangms in #2490
Other Changes
- Update VERSION to 0.4.0 by @justinchuby in #2449
- Remove legacy_ir usage in testutil by @justinchuby in #2451
- Remove legacy ir by @justinchuby in #2456
- Remove DORT related tests since it was removed from PyTorch by @justinchuby in #2465
- Update requirements-ort-nightly.txt by @justinchuby in #2471
- Fix logic for converting np array to text by @justinchuby in #2470
- Add a test for boolean attention mask within SDPA by @titaiwangms in #2480
- chore(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #2484
- Use onnx-ir 0.1.7 by @justinchuby in #2509
- Minor fixes to onnx to onnxscript converter by @gramalingam in #2510
New Contributors
- @IlyasMoutawwakil made their first contribution in #2479
- @sebimarkgraf made their first contribution in #2478
Full Changelog: v0.3.2...v0.4.0
v0.3.2
What's Changed
Optimizer and rewriter
- Eliminate unnecessary ScatterND by @gramalingam in #2422
- Change loop order during rewrite by @gramalingam in #2427
- Cleanup elimination of redundant scatter-nd: consolidate rules and improve organization by @Copilot in #2426
- [pass][reland] Enable DeduplicateInitializersPass by @titaiwangms in #2429
- [Rewriter]: fuse successive Relu/Clip nodes by @AyoubMDL in #2410
- Add support for onnx fusions by @gramalingam in #2412
- Fix MatchResult.fail() call signature in redundant_scatter_nd.py by @Copilot in #2431
- A couple of minor fixes on rewrite rules by @gramalingam in #2432
- Reorder optimization passes by @gramalingam in #2433
- Cleanup uses of onnxscript.rewriter.pattern - export symbols from main module by @Copilot in #2437
- Improve redundant slice removal by @gramalingam in #2441
- Make TransposeIdentity more robust by @justinchuby in #2443
ONNX IR
- Use onnx_ir common passes by @justinchuby in #2420
- [pass] Enable DeduplicateInitializersPass by @titaiwangms in #2416
Torch Lib
- [torchlib] Fix sdpa dtype in attn_mask by @titaiwangms in #2445
Other Changes
- Update VERSION to 0.3.2 by @justinchuby in #2421
- Copilot instructions by @gramalingam in #2448
Full Changelog: v0.3.1...v0.3.2
v0.3.1
What's Changed
Breaking Changes
- [rewriter] Decouple llama rule sets and make API explicit by @copilot-swe-agent in #2388
Core ONNX Script
- Update autocast.py to fix attribute creation error by @justinchuby in #2365
Optimizer and rewriter
- SDPA fusion cleanup by @gramalingam in #2352
- Enable CSE in optimizer by @titaiwangms in #2361
- Test SDPA fusion via MHA by @gramalingam in #2366
- Always fold the
Transpose
node in the constant folder by @justinchuby in #2355 - Fix fused matmul check/rewrite functions by @bmehta001 in #2331
- Cast-cast elimination by @gramalingam in #2368
- Re-enable fused matmul rules by @bmehta001 in #2370
- Fusion extensions to improve GQA fusion by @gramalingam in #2374
- fix: pattern match gelu from contrib and onnx ops🐛 by @KarelZe in #2364
- [Rewriter]: Add ∘ MatMul -> Gemm by @AyoubMDL in #2356
- Fixes to MHA fusion by @gramalingam in #2380
- fix: check for rank of bias in bias-gelu fusion🐛 by @KarelZe in #2393
- [torchlib] Implement aten__upsample_bicubic2d_aa and aten__upsample_bilinear2d_aa functions by @copilot-swe-agent in #2383
- Move gemm_to_matmul_add rule to ort fusion rules by @justinchuby in #2398
- Fix fusion ordering for partial rotary embedding by @gramalingam in #2402
- [optimizer] Replace value.nbytes with value.size by @titaiwangms in #2399
Torch Lib
- Add missing converter for _local_scalar_dense by @xadupre in #2367
- [torchlib] Unregister aten::max.other by @titaiwangms in #2377
- Support dynamic shapes for aten_unfold by @xenova in #2407
Documentation
- docs: cleanup documentation for function-based rewrites📄 by @KarelZe in #2359
- Updates to the rewriter tutorial by @gramalingam in #2397
- Add sphinx inter link to onnx_ir by @justinchuby in #2415
Other Changes
- Fix test names for pytest by @justinchuby in #2358
- Require onnx-ir 0.1.1 by @justinchuby in #2360
- [CI] Fix execnet.gateway_base.DumpError: can't serialize <class 'numpy.int64'> by @titaiwangms in #2379
- Move _c_api_utils.py to version_converter package by @copilot-swe-agent in #2401
- Fix proto handling in version converter by @justinchuby in #2411
- Add phi2/phi4 test cases for mha/gqa fusion by @gramalingam in #2409
- Update VERSION to 0.3.1 by @justinchuby in #2414
- Bump onnx ir requirement to 0.1.3 by @justinchuby in #2418
- Create torch_2_8 apis by @justinchuby in #2419
New Contributors
- @KarelZe made their first contribution in #2359
- @copilot-swe-agent made their first contribution in #2383
- @xenova made their first contribution in #2407
Full Changelog: v0.3.0...v0.3.1
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