版本发布 8
<!-- Release notes generated using configuration in .github/release.yml at release/0.5.7 --> ## What's Changed ### Optimizer and rewriter * Improve constant folding error messages and allow Identity to skip shape merging by @justinchuby in https://github.com/microsoft/onnxscript/pull/2670 * Fix scalar constant check by @gramalingam in https://github.com/microsoft/onnxscript/pull/2672 * Capture rewrite rule name as metadata by @gramalingam in https://github.com/microsoft/onnxscript/pull/2675 * Keep creating constants when constants are folded inside ir.Function by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2679 * Avoid initializer name collision in _fuse_batchnorm.py by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2680 * Merge metadata props in rewriter by @gramalingam in https://github.com/microsoft/onnxscript/pull/2682 * Implement SDPA via MHA by @gramalingam in https://github.com/microsoft/onnxscript/pull/2683 * Don't constant fold Quantize/DequantizeLinear nodes by default by @ruro in https://github.com/microsoft/onnxscript/pull/2713 * Fix unused initializer check by @gramalingam in https://github.com/microsoft/onnxscript/pull/2732 ### ONNX IR * Add option to clear metadata in ort fusion by @gramalingam in https://github.com/microsoft/onnxscript/pull/2685 ### Torch Lib * feat: implement LSTM and GRU operators for torchlib by @ombrdr47 in https://github.com/microsoft/onnxscript/pull/2674 * [torchlib] Fix unbind.int if num_outputs=1 by @sebimarkgraf in https://github.com/microsoft/onnxscript/pull/2684 * [torchlib] Fix mod on SymInt by @justinchuby in https://github.com/microsoft/onnxscript/pull/2686 * Implement aten.stft by @moatom in https://github.com/microsoft/onnxscript/pull/2645 * Add converter for unique_consecutive by @xadupre in https://github.com/microsoft/onnxscript/pull/2694 * Add missing output_size kwarg to repeat_interleave by @yuanyao-nv in https://github.com/microsoft/onnxscript/pull/2691 * add converter for aten::sym_storage_offset by @xadupre in https://github.com/microsoft/onnxscript/pull/2697 * Implement ONNX export for `fake_quantize_per_*_affine` by @ruro in https://github.com/microsoft/onnxscript/pull/2696 * Fix aten_unbind for torch >= 2.7 dynamo export by @afshin-paydar in https://github.com/microsoft/onnxscript/pull/2719 * Update aten_index_put implementation by @gramalingam in https://github.com/microsoft/onnxscript/pull/2712 * [torchlib] Fix and implement overloads for aten::remainder by @justinchuby in https://github.com/microsoft/onnxscript/pull/2727 ### Documentation * Utility and example for custom op expansion by @gramalingam in https://github.com/microsoft/onnxscript/pull/2701 ### Other Changes * Add GQA fusion test cases by @gramalingam in https://github.com/microsoft/onnxscript/pull/2669 * chore(deps): bump ruff from 0.14.2 to 0.14.3 in /requirements/lintrunner by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2676 * chore(deps): bump editorconfig-checker from 3.4.0 to 3.4.1 in /requirements/lintrunner by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2677 * chore(deps): bump onnx-weekly from 1.20.0.dev20251027 to 1.21.0.dev20251103 in /requirements/ci by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2678 * Bump version by @gramalingam in https://github.com/microsoft/onnxscript/pull/2702 * Provide inplace replacement util by @gramalingam in https://github.com/microsoft/onnxscript/pull/2708 * chore(deps): bump ruff from 0.14.3 to 0.14.6 in /requirements/lintrunner by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2716 * chore(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2715 * chore(deps): bump onnxruntime from 1.23.1 to 1.23.2 in /requirements/ci by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2652 * chore(deps): bump github/codeql-action from 3 to 4 by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2626 * chore(deps): bump ruff from 0.14.6 to 0.14.7 in /requirements/lintrunner by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2721 * support opset23 by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2725 * chore(deps): bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2730 * chore(deps): bump ruff from 0.14.7 to 0.14.9 in /requirements/lintrunner by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2731 ## New Contributors * @ombrdr47 made their first contribution in https://github.com/microsoft/onnxscript/pull/2674 * @moatom made their first contribution in https://github.com/microsoft/onnxscript/pull/2645 * @ruro made their first contribution in https://github.com/microsoft/onnxscript/pull/2696 * @afshin-paydar made their first contribution in https://github.com/microsoft/onnxscript/pull/2719 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.5.6...v0.5.7
<!-- Release notes generated using configuration in .github/release.yml at release/0.5.6 --> ## What's Changed ### Optimizer and rewriter * Clear initializers in constant folding pass by @justinchuby in https://github.com/microsoft/onnxscript/pull/2668 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.5.5...v0.5.6
<!-- Release notes generated using configuration in .github/release.yml at release/0.5.4 --> ## What's Changed ### Optimizer and rewriter * Fix constant in constant folding by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2622 * Create helper for comparing semantic equivalence of shapes by @justinchuby in https://github.com/microsoft/onnxscript/pull/2620 * Fix GQA fusion to produce present key/value by @justinchuby in https://github.com/microsoft/onnxscript/pull/2634 ### Torch Lib * Separated implementation of aten::scatter overloads by @linshokaku in https://github.com/microsoft/onnxscript/pull/2605 * Enhanced type annotations and simplified implementation of scatter.value by @linshokaku in https://github.com/microsoft/onnxscript/pull/2612 * support for scalar args to aten::scatter by @linshokaku in https://github.com/microsoft/onnxscript/pull/2613 * [torchlib] Implement aten_bilinear function using Einsum by @Copilot in https://github.com/microsoft/onnxscript/pull/2574 * Simplify aten_unbind when shape is static by @justinchuby in https://github.com/microsoft/onnxscript/pull/2597 * Consolidate overloads in torchlib by @justinchuby in https://github.com/microsoft/onnxscript/pull/2604 * [torchlib] Fix implementations for bitwise_* overloads by @justinchuby in https://github.com/microsoft/onnxscript/pull/2618 * [torchlib] Deprecate Rank and IsScalar by @justinchuby in https://github.com/microsoft/onnxscript/pull/2624 * [torchlib] Fix operator add by @justinchuby in https://github.com/microsoft/onnxscript/pull/2630 * Remove redundant registration of operator::add and fix sub.Scalar by @justinchuby in https://github.com/microsoft/onnxscript/pull/2631 ### Other Changes * Update torch api error message to include value names by @justinchuby in https://github.com/microsoft/onnxscript/pull/2599 * Remove beartype by @justinchuby in https://github.com/microsoft/onnxscript/pull/2603 * Allow `opset_version` to be set explicitly when exporting by @NoRaincheck in https://github.com/microsoft/onnxscript/pull/2615 * Merge shapes only in identity op and nodel-level shape inference by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2623 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.5.3...v0.5.4
<!-- Release notes generated using configuration in .github/release.yml at release/0.5.3 --> ## What's Changed ### Optimizer and rewriter * Fix Onnx 23 Rotary Fusion by @gramalingam in https://github.com/microsoft/onnxscript/pull/2576 * Record names of contributing values in the constant folding pass by @justinchuby in https://github.com/microsoft/onnxscript/pull/2575 * Merge output shape with input shape instead of override by @wodesuck in https://github.com/microsoft/onnxscript/pull/2578 * Extend utilities for checking a scalar value by @gramalingam in https://github.com/microsoft/onnxscript/pull/2587 * Merge input and output shape when removing identity by @wodesuck in https://github.com/microsoft/onnxscript/pull/2588 * Add NaN handling in softmax pattern in SDPA fusion by @gramalingam in https://github.com/microsoft/onnxscript/pull/2593 * Fix collapse slices rewrite rules to handle unknown dims by @justinchuby in https://github.com/microsoft/onnxscript/pull/2583 * Expose the should_fold option to optimize() by @justinchuby in https://github.com/microsoft/onnxscript/pull/2594 ### Torch Lib * [torchlib] Add trace_only flag to aten_copy, aten_tril, aten_triu by @justinchuby in https://github.com/microsoft/onnxscript/pull/2572 * [torchlib] Support integers in logical_and/or ops and update other logical ops by @justinchuby in https://github.com/microsoft/onnxscript/pull/2582 * [torchlib] Add back operator and/or by @justinchuby in https://github.com/microsoft/onnxscript/pull/2590 * Improve aten_floor_divide for int inputs by @justinchuby in https://github.com/microsoft/onnxscript/pull/2592 ### Other Changes * Remove usages of ir.Input in test by @justinchuby in https://github.com/microsoft/onnxscript/pull/2591 ## New Contributors * @wodesuck made their first contribution in https://github.com/microsoft/onnxscript/pull/2578 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.5.2...v0.5.3
<!-- Release notes generated using configuration in .github/release.yml at release/0.5.2 --> ## What's Changed ### Optimizer and rewriter * [rewriter] Remove generic pattern matcher by @justinchuby in https://github.com/microsoft/onnxscript/pull/2567 * Add GQA fusion to ONNX fusions by @gramalingam in https://github.com/microsoft/onnxscript/pull/2524 ### Torch Lib * [torchlib] Fix aten_gather to correctly handle scalar indices by @linshokaku in https://github.com/microsoft/onnxscript/pull/2566 * [torchlib] Simplify linalg_vector_norm to remove the redundant Abs by @justinchuby in https://github.com/microsoft/onnxscript/pull/2570 ## New Contributors * @linshokaku made their first contribution in https://github.com/microsoft/onnxscript/pull/2566 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.5.1...v0.5.2
<!-- Release notes generated using configuration in .github/release.yml at release/0.5.1 --> ## What's Changed ### Optimizer and rewriter * Remove CheckerPass from ort_fusion by @justinchuby in https://github.com/microsoft/onnxscript/pull/2560 ### Other Changes * Bump version from 0.5.0 to 0.5.1 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2559 * Use ir.val to replace ir.Input by @justinchuby in https://github.com/microsoft/onnxscript/pull/2556 * chore(deps): bump ruff from 0.12.11 to 0.13.0 in /requirements/lintrunner by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2563 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.5.0...v0.5.1
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### Breaking Changes * Refactor rewrite rules into the rewriter.rules namespace by @justinchuby in https://github.com/microsoft/onnxscript/pull/2531 * Update constant folding behavior for large tensors by @justinchuby in https://github.com/microsoft/onnxscript/pull/2488 ### Optimizer and rewriter * [Rewriter] Prevent out of range when matching node outputs by @iksnagreb in https://github.com/microsoft/onnxscript/pull/2508 * Add RMS Normalization variant by @gramalingam in https://github.com/microsoft/onnxscript/pull/2519 * [Optimizer] Fix reinterpretation of strings in _get_numpy_value by @iksnagreb in https://github.com/microsoft/onnxscript/pull/2514 * Improve symbolic dim tracking by @gramalingam in https://github.com/microsoft/onnxscript/pull/2520 * Remove function extraction in ONNX rotary embedding by @gramalingam in https://github.com/microsoft/onnxscript/pull/2525 * [Optimizer] Avoid accessing None value in _process_constant_node by @iksnagreb in https://github.com/microsoft/onnxscript/pull/2513 * Increase DEFAULT_CONSTANT_FOLD_INPUT_SIZE_LIMIT by @justinchuby in https://github.com/microsoft/onnxscript/pull/2527 * [Rewriter(matmul_add_to_gemm)]: check shapes by @AyoubMDL in https://github.com/microsoft/onnxscript/pull/2528 * Add ort-specific passes to ort_fusion by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2532 * [Reland] Update SplitToSequence in constant folding by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2544 * [Rewriter]: add fusion rules for successive Min/Max patterns by @AyoubMDL in https://github.com/microsoft/onnxscript/pull/2500 * [rewriter] Unify reshape flatten ops by @Johansmm in https://github.com/microsoft/onnxscript/pull/2518 * Do not try to fold op.SplitToSequence when split is `None` by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2550 * [Rewriter] Add fuse batchnorm to default rules by @AyoubMDL in https://github.com/microsoft/onnxscript/pull/2553 * Add Conv-Affine(Mul+Add) and hardswish fusion by @Stonesjtu in https://github.com/microsoft/onnxscript/pull/2472 * Fix rewriter and CI tests for the latest onnx-ir version by @justinchuby in https://github.com/microsoft/onnxscript/pull/2554 ### Torch Lib * [torchlib] Modify aten_unbind to use None for split_sizes by @justinchuby in https://github.com/microsoft/onnxscript/pull/2536 * [torchlib] Improve pixel_shuffle by @justinchuby in https://github.com/microsoft/onnxscript/pull/2537 * [torchlib] Improve handling of SymInt[] by @justinchuby in https://github.com/microsoft/onnxscript/pull/2522 * [torch] Fix incorrect Concat when processing dynamic paddings by @kistenklaus in https://github.com/microsoft/onnxscript/pull/2540 * Add test for dynamic padding by @justinchuby in https://github.com/microsoft/onnxscript/pull/2541 * [torchlib] Mark atan2 as trace_only and map NaN to 0 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2557 * [torchlib] Fix repeat_interleave when repeats is a symbolic tensor by @xadupre in https://github.com/microsoft/onnxscript/pull/2548 * Support `enable_gqa` and only support 4D Q, K, and V by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2558 * [torchlib] Implement torch.ops.prims.broadcast_in_dim.default by @Copilot in https://github.com/microsoft/onnxscript/pull/2382 ### Other Changes * chore(deps): bump actions/upload-pages-artifact from 3 to 4 by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2517 * Generate opset24 ops by @justinchuby in https://github.com/microsoft/onnxscript/pull/2523 * Disable unstable tests by @xadupre in https://github.com/microsoft/onnxscript/pull/2512 * Bump version to 0.4.1 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2529 * More robust checks for FLOAT8E8M0 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2530 * chore(deps): bump ruff from 0.12.10 to 0.12.11 in /requirements/lintrunner by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2535 * Implements repeat_interleave by @xadupre in https://github.com/microsoft/onnxscript/pull/2477 * Update onnx-weekly version to 1.20.0 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2545 * [Rewriter] Support specifying node name in rewrites by @AyoubMDL in https://github.com/microsoft/onnxscript/pull/2474 * Bump version to 0.5.0 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2538 ## New Contributors * @iksnagreb made their first contribution in https://github.com/microsoft/onnxscript/pull/2508 * @kistenklaus made their first contribution in https://github.com/microsoft/onnxscript/pull/2540 * @Stonesjtu made their first contribution in https://github.com/microsoft/onnxscript/pull/2472 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.4.0...v0.5.0
<!-- Release notes generated using configuration in .github/release.yml at release/0.4.0 --> ## What's Changed ### Breaking Changes * Remove torchscript graph builder by @justinchuby in https://github.com/microsoft/onnxscript/pull/2444 ### Optimizer and rewriter * Expose match functionality of rewrite-rule by extracting base classes by @Copilot in https://github.com/microsoft/onnxscript/pull/2447 * Implement MatchContext class for rewriter pattern matching by @Copilot in https://github.com/microsoft/onnxscript/pull/2455 * [Rewriter] Implement value/node level checkers for pattern matching infrastructure by @Copilot in https://github.com/microsoft/onnxscript/pull/2459 * fix: handling of default attrs in SimplifiedLayerNormalization + LayerNormalization🐛 by @KarelZe in https://github.com/microsoft/onnxscript/pull/2396 * Add initial support for RotaryEmbedding fusion for onnx opset 23 by @gramalingam in https://github.com/microsoft/onnxscript/pull/2450 * Attention mask for GQA fusion by @gramalingam in https://github.com/microsoft/onnxscript/pull/2452 * Handle matching against None explicitly by @gramalingam in https://github.com/microsoft/onnxscript/pull/2460 * [docs] Document rewriter pattern options by @Copilot in https://github.com/microsoft/onnxscript/pull/2406 * Rename fusion files by @gramalingam in https://github.com/microsoft/onnxscript/pull/2476 * [Rewriter] Add optimizer to fold Pad operators into Conv by @Johansmm in https://github.com/microsoft/onnxscript/pull/2363 * MHA fusion cleanup by @gramalingam in https://github.com/microsoft/onnxscript/pull/2481 * Remove double transpose flag in MHA fusion by @gramalingam in https://github.com/microsoft/onnxscript/pull/2483 * Add reproduction test case for incorrect slice rewrite and add potential fix by @sebimarkgraf in https://github.com/microsoft/onnxscript/pull/2478 * [ort_fusuion] Support fp16 in rms_norm fusion by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2491 * Introduce layer-norm fusion by @gramalingam in https://github.com/microsoft/onnxscript/pull/2492 * Correctly create empty ints for Constant in rewriter by @justinchuby in https://github.com/microsoft/onnxscript/pull/2497 * Add Erf-based Gelu fusion rule by @gramalingam in https://github.com/microsoft/onnxscript/pull/2495 * Extend rewriter to handle subgraphs by @gramalingam in https://github.com/microsoft/onnxscript/pull/2494 * Minor fix for getting function's graph by @gramalingam in https://github.com/microsoft/onnxscript/pull/2504 * Fixes for when attr type can be ambiguous for empty lists by @justinchuby in https://github.com/microsoft/onnxscript/pull/2505 ### Torch Lib * [torchlib] Improve aten_chunk conversion by @justinchuby in https://github.com/microsoft/onnxscript/pull/2469 * Make onnx export SDPA match aten behavior by @IlyasMoutawwakil in https://github.com/microsoft/onnxscript/pull/2479 * Add condition to dropout and ref to isnan by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2482 * Support aten::scatter.src by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2490 ### Other Changes * Update VERSION to 0.4.0 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2449 * Remove legacy_ir usage in testutil by @justinchuby in https://github.com/microsoft/onnxscript/pull/2451 * Remove legacy ir by @justinchuby in https://github.com/microsoft/onnxscript/pull/2456 * Remove DORT related tests since it was removed from PyTorch by @justinchuby in https://github.com/microsoft/onnxscript/pull/2465 * Update requirements-ort-nightly.txt by @justinchuby in https://github.com/microsoft/onnxscript/pull/2471 * Fix logic for converting np array to text by @justinchuby in https://github.com/microsoft/onnxscript/pull/2470 * Add a test for boolean attention mask within SDPA by @titaiwangms in https://github.com/microsoft/onnxscript/pull/2480 * chore(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/microsoft/onnxscript/pull/2484 * [torch api] Support down conversion of opsets by @justinchuby in https://github.com/microsoft/onnxscript/pull/2503 * Use onnx-ir 0.1.7 by @justinchuby in https://github.com/microsoft/onnxscript/pull/2509 * Minor fixes to onnx to onnxscript converter by @gramalingam in https://github.com/microsoft/onnxscript/pull/2510 ## New Contributors * @IlyasMoutawwakil made their first contribution in https://github.com/microsoft/onnxscript/pull/2479 * @sebimarkgraf made their first contribution in https://github.com/microsoft/onnxscript/pull/2478 **Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.3.2...v0.4.0