Onnxscript

Latest version: v0.2.3

Safety actively analyzes 723152 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.3.1

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 (https://github.com/microsoft/onnxscript/pull/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 https://github.com/microsoft/onnxscript/pull/2061
* [IR] Add support for quant_parameter_tensor_names field by justinchuby in https://github.com/microsoft/onnxscript/pull/2080
* Add unique op by a-gardner1 in https://github.com/microsoft/onnxscript/pull/1547
* Add Op (Slice - complex) | feat torchlib by titaiwangms in https://github.com/microsoft/onnxscript/pull/2089
* Fix Op (Slice complex) | improve dim expression by titaiwangms in https://github.com/microsoft/onnxscript/pull/2094
* Generalize MHA pattern by gramalingam in https://github.com/microsoft/onnxscript/pull/2092
* [IR] Fix deserialize_node by Johansmm in https://github.com/microsoft/onnxscript/pull/2098
* Fusion for partial rotary embedding by gramalingam in https://github.com/microsoft/onnxscript/pull/2095
* [torchlib] Fix layer norm dtype by justinchuby in https://github.com/microsoft/onnxscript/pull/2100
* [torchlib] Register `aten::__lshift__` and `__rshift__` by justinchuby in https://github.com/microsoft/onnxscript/pull/2102
* Remove the experimental IR graph builder by justinchuby in https://github.com/microsoft/onnxscript/pull/2104
* [CI] Fix test errors on windows by justinchuby in https://github.com/microsoft/onnxscript/pull/2103
* A couple of extensions to MHA fusion by gramalingam in https://github.com/microsoft/onnxscript/pull/2106
* Make test test_smollm 20% faster by xadupre in https://github.com/microsoft/onnxscript/pull/2107
* Fix Op (convolution) | add nd support to convolution by titaiwangms in https://github.com/microsoft/onnxscript/pull/2108
* Add Op (aten::masked_scatter) | feat (torchlib) by titaiwangms in https://github.com/microsoft/onnxscript/pull/2112
* Enable version converter for torch>=2.6 by shubhambhokare1 in https://github.com/microsoft/onnxscript/pull/2111
* Turn constant folder and dce into passes by justinchuby in https://github.com/microsoft/onnxscript/pull/2109
* Add SDPA fusion unit test case by gramalingam in https://github.com/microsoft/onnxscript/pull/2116
* Extend sdpa tests by shubhambhokare1 in https://github.com/microsoft/onnxscript/pull/2118
* [IR] Create a shape inference pass using onnx shape inference by justinchuby in https://github.com/microsoft/onnxscript/pull/2117
* Fix DORT CI according to torch-nightly changes by justinchuby in https://github.com/microsoft/onnxscript/pull/2125
* [rewriter] Enable llama rule sets by titaiwangms in https://github.com/microsoft/onnxscript/pull/2124
* [IR] Convenience constructor for Node by justinchuby in https://github.com/microsoft/onnxscript/pull/2126
* Add spda rules and tests for unmasked patterns by shubhambhokare1 in https://github.com/microsoft/onnxscript/pull/2123
* [IR] Handle ONNX custom types in DataType.from_numpy by justinchuby in https://github.com/microsoft/onnxscript/pull/2131
* Add Gelu Tanh fusion rule by gramalingam in https://github.com/microsoft/onnxscript/pull/2132
* Cleanup ort transformer fusions by gramalingam in https://github.com/microsoft/onnxscript/pull/2115
* Use self._use_mask in sdpa rewrite call by shubhambhokare1 in https://github.com/microsoft/onnxscript/pull/2135
* [rewriter | torchlib] respect ops order in torchscript graph by titaiwangms in https://github.com/microsoft/onnxscript/pull/2134
* [IR] Improve pass infra by justinchuby in https://github.com/microsoft/onnxscript/pull/2120
* A couple of ort fusion fixes by gramalingam in https://github.com/microsoft/onnxscript/pull/2136
* Rotary embedding needs function extraction by gramalingam in https://github.com/microsoft/onnxscript/pull/2139
* [Passes] Consolidate DCE passes into common passes by justinchuby in https://github.com/microsoft/onnxscript/pull/2143
* Make the return type of rewrite check functions a MatchResult object by shubhambhokare1 in https://github.com/microsoft/onnxscript/pull/2138
* Optimize away zero-length concat operands by gramalingam in https://github.com/microsoft/onnxscript/pull/2150
* Fix include_self for scatter_reduce by xadupre in https://github.com/microsoft/onnxscript/pull/2090
* [torchlib] Fix aten_div rounding_mode by justinchuby in https://github.com/microsoft/onnxscript/pull/2147
* Remove warning messages by gramalingam in https://github.com/microsoft/onnxscript/pull/2151

New Contributors
* AyoubMDL made their first contribution in https://github.com/microsoft/onnxscript/pull/2061
* a-gardner1 made their first contribution in https://github.com/microsoft/onnxscript/pull/1547

**Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.2.2...v0.2.3.1

0.2.2

What's Changed

* Doc script const 1 by leshabirukov in https://github.com/microsoft/onnxscript/pull/2004
* Create stable apis for torch 2.7 by justinchuby in https://github.com/microsoft/onnxscript/pull/2063
* Fix misleading annotation in the documentation by xadupre in https://github.com/microsoft/onnxscript/pull/2046
* Enable extraction of rewritten subgraph as model-local function by gramalingam in https://github.com/microsoft/onnxscript/pull/2065
* Make onnxscript release 1ES compliant by jchen351 in https://github.com/microsoft/onnxscript/pull/2071
* Add a couple of variants of patterns in ORT fusions by gramalingam in https://github.com/microsoft/onnxscript/pull/2077
* [IR] Fix an error when checking for float8_e4m3fnuz type in ir.Tensor by justinchuby in https://github.com/microsoft/onnxscript/pull/2078
* Squeeze Reshape Identity optimization by gramalingam in https://github.com/microsoft/onnxscript/pull/2083
* add cudnn_enable flag to aten_layer_norm by yushangdi in https://github.com/microsoft/onnxscript/pull/2085
* Extensions to transformer fusions by gramalingam in https://github.com/microsoft/onnxscript/pull/2082

New Contributors
* leshabirukov made their first contribution in https://github.com/microsoft/onnxscript/pull/2004
* jchen351 made their first contribution in https://github.com/microsoft/onnxscript/pull/2071
* yushangdi made their first contribution in https://github.com/microsoft/onnxscript/pull/2085

**Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.2.1...v0.2.2

0.2.1

This release includes several bug fixes for the PyTorch->ONNX decomposition library (torchlib).

**Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.2.0...v0.2.1

0.2.0

What's Changed

* [torchlib] Simplify squeeze by justinchuby in https://github.com/microsoft/onnxscript/pull/2047
* [torchlib] Add memory_format to ones_like by justinchuby in https://github.com/microsoft/onnxscript/pull/2049
* Fix aten_pow when first input is a python constant by xadupre in https://github.com/microsoft/onnxscript/pull/2048
* [torchlib] Fix various implementations by justinchuby in https://github.com/microsoft/onnxscript/pull/2050
* Expose opset22 by justinchuby in https://github.com/microsoft/onnxscript/pull/2053
* Refactor ort specific fusions by gramalingam in https://github.com/microsoft/onnxscript/pull/2039
* [torchlib] Fix reflection pad by justinchuby in https://github.com/microsoft/onnxscript/pull/2037
* [torchlib] Make matmul trace_only by justinchuby in https://github.com/microsoft/onnxscript/pull/2055
* Minor cleanup by gramalingam in https://github.com/microsoft/onnxscript/pull/2056
* [torchlib] Simplify aten_trunc implementation by justinchuby in https://github.com/microsoft/onnxscript/pull/2057


**Full Changelog**: https://github.com/microsoft/onnxscript/compare/v0.1.0...v0.1.1

0.1.0

First official release

**Full Changelog**: https://github.com/microsoft/onnxscript/commits/v0.1.0

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.