pypi / onnxscript
onnxscript
What changed in onnxscript 0.7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.
4 breaking21 new APIs and options4 performance3 behavior and defaults1 tooling41 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initonnxscript 0.774 changes
Breaking changes 4
Rewrite rules must now specify inputs and attributes as args and kwargs instead of a list and a dictionary.
The optimizer no longer constant-folds DynamicQuantizeLinear.
Arguments after graph are now keyword-only, affecting how the constructor can be called.
The version converter raises an error when a function attribute is RefAttr.
New APIs and options 21
Adds an ONNX lowering for aten::bincount.
Adds a converter for aten::_grouped_mm.default.
Adds torchlib support for prims::remainder.
Accepts a memory_format keyword argument on rand, randn, and randint _like ops.
Exposes build_function in the public API.
Exposes build_graph in the public API.
Implements per-channel dequantization.
Implements per-channel quantization.
Adds support for torchvision.ops.deform_conv2d.
Adds the missing dtype parameter.
Introduces a graph construction utility, extended with support for script functions, schema-based input and attribute partitioning, None inputs, and initializers.
Adds a method for declaring graph outputs.
Adds a method for declaring graph inputs.
Adds subgraph construction and support for control-flow operations.
Adds a callable ModuleList that chains forward calls and accepts modules as PyTorch-style varargs.
Adds a neural-network module with Module and Parameter classes.
Adds tracing support for a single op.SplitToSequence.
Exposes OpBuilder through the onnxscript package.
Script functions can reference values from an outer scope.
Adds conversion to IR for use with control-flow operations.
Adds a converter for torch aten::histc.
Performance 4
Reimplements as_strided without an ONNX loop.
Folds Gemm beta into the fused BatchNorm bias.
Skips key/value repetition when query and key head counts are equal.
Adds a fusion rule that removes Expand before broadcast-capable binary operators.
Behavior and default changes 3
Exports aten::relu6 as a single Clip op.
The rewriter supports an extended list of commutative operations.
BatchNorm fusion now supports ConvTranspose with group values other than 1.
Tooling 1
Generates new opsets up to 27.
Fixes and other changes 41
Fixes arange and logit behavior.
Improves integer export by dropping Sign ops.
Fixes bool-mask handling.
Corrects handling of infinities and equal_nan.
Fixes rank mismatch for 1D weights by adding the missing squeeze.
Honors the dtype argument when exporting without dim.
Fixes type promotion when the exponent is not floating point.
Corrects rank handling in ONNX export.
Fixes handling of negative dims and shifts past the dimension length.
Avoids invalid ONNX graphs when start or end is None.
Emits scalar Range bounds.
Uses the query dtype's lowest finite value for the causal attention mask.
Preserves subgraph initializers when inlining If branches during constant folding.
Sets the kernel_shape attribute on Conv and ConvTranspose in torchlib.
Materializes the DFT axis default when converting opset 19 to 20.
Fixes rounding for float16 truncating division.
Fixes Dynamo export when memory_format is passed.
Fixes protobuf serialization failure for large models.
Improves folding for Reshape and Slice operations.
Prevents initializer name collisions when resolving shared -1 shapes.
Preserves dft_length to fix FFT export truncation.
Fixes Dynamo export for scalar multiplication on converted real tensors.
Fixes scalar uneven splits producing incorrect equal-split output.
Fixes the incorrect float output dtype when using the default step.
Fixes an incorrect default dtype that caused ONNX shape-inference errors.
Sets linear_before_reset=1 to match PyTorch GRU semantics.
Fixes behavior for broadcasting masks.
Fixes violations of the ONNX specification.
Prevents incorrect fusion when Pad contains negative values.
Fixes fusion when the max value is None.
Invokes NameFixPass after graph-modifying operations in the rewriter, version-converter, and optimizer.
Fixes incorrect channel ordering by replacing SpaceToDepth with Reshape→Transpose→Reshape.
Antialiased upsampling now sets exclude_outside=1 on Resize.
Fixes half pixel mode when the output size is one.
Fusion no longer produces invalid ONNX when Conv nodes share weight initializers.
Uses cubic_coeff_a=-0.5 instead of -0.75 for bicubic antialias export.
Normalizes dtype in cache keys to prevent initializer name collisions.
Converter input-constraint failures now raise TranslationError instead of relying on asserts.
Rewriter behavior is deterministic when matching multi-output patterns.
The lowering now accepts the 7-argument schema.
The version converter now includes an inliner and removes unused functions before conversion.