pypi / coreai-torch
coreai-torch
What changed in coreai-torch 0.4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
10 breaking15 new APIs and options2 performance13 behavior and defaults2 tooling23 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcoreai-torch 0.465 changes
Breaking changes 10
squeeze.dims now keeps listed dimensions whose size is not 1.
conv_transpose now rejects output_padding values that PyTorch itself rejects.
The separate optimize() step has been removed.
Per-operation timing lookups have been removed.
The total_duration_ns benchmark field has been removed.
Integer true division now promotes to float instead of silently truncating.
Artifacts converted with coreai-torch v0.4.0 will fail to load or specialize on-device starting with OS 27 second beta; reconvert with v0.4.1 or later.
save_asset records the producer in asset metadata, overwrites an existing serialized model instead of failing, and validates that the destination has a .aimodel extension.
The legacy Torch importer was removed.
The unused ml_asset module was removed.
New APIs and options 15
CoreAIProbedInspector reads intermediates as extra model outputs.
ImageType is now supported for graph inputs and outputs.
strip_debug_info_from_aimodel gains the include_op_ids option.
strip_debug_info gains the include_op_ids option.
A debugging report shows the device chosen for each operation and the reason for any declined placement.
A debugging report captures and compares intermediate values.
A debugging report breaks a program down by operation kind.
A debugging report explains why a placement moved between two plans.
Compares two benchmark runs and reports resized dispatches when operations were added or removed.
Excluded nodes are reported as ValidationResult.SKIPPED and no longer narrow the debugging search.
Adds support for aten::atan2, decomposed into atan(y/x) with per-quadrant correction.
Adds a two-step patch/sub-export API for callers driving export themselves, with autograd support so gradients flow through externalized submodules; the one-shot path is unchanged.
InferenceValue.Kind now supports image types.
Lowering now supports masked_scatter, which writes values into a tensor at masked positions.
Python bindings now support strided views.
Performance 2
Debug operation IDs are assigned once per graph rather than once per node, making conversion time linear in graph size; IDs now follow IR order.
Diffing is linear-time, reports modified operations rather than unrelated removal/addition pairs, and supports weight-value comparison policies.
Behavior and default changes 13
avg_pool2d now accepts an unbatched [C, H, W] input.
Lowering now supports dynamic (symbolic) pad amounts.
Debugging findings now report the module and line they came from, making their source easier to identify.
Enhancements allow FP8 constants.
Custom kernels can now live inside torch.cond.
Custom kernels can now live inside torch.while_loop.
Timing is recorded once per dispatch, rather than divided among individual operations; benchmarks now include an untimed warmup run.
Composite labels no longer include the random suffix added by externalization, allowing programs from different builds to be compared by label.
to_coreai() now returns an already-optimized program, so callers no longer need a separate optimization step.
The upper bound on torch is removed; torch>=2.8.0 is accepted, with a warning when installed PyTorch is newer than the verified range.
The scalarAt subscript is now public.
Shape lowering now supports mixed SymInt and int shapes.
Lowering supports dynamic or symbolic repeat counts, rather than only fixed integers.
Tooling 2
Debug location tracking was improved.
Intermediate value inspection was improved.
Fixes and other changes 23
Lowering clamp now uses the promoted output dtype.
Externalized call sites are now resolved by op target rather than recorded node name.
Lowering now supports SDPA when the value head dimension differs from the query/key head dimension.
The concatenation dimension is fixed for packed intx tensors.
unpack_fp4 now works with non-CPU tensors.
Fixed a benchmarker interval-ID collision that caused debugging crashes.
Debugging bisection now honours its depth range.
Diffing now follows arguments nested in lists, tuples, and dicts, as well as kwargs; constant arguments are part of node identity.
The graphdiff tool no longer recurses infinitely on non-torch graphs.
Debugging histograms no longer crash for callees that have no graph.
Debugging no longer crashes when it encounters an unrecognised compute device.
Listings omit colour escapes when written to a file or in-memory stream and indent to match the line they describe.
Argmin indices are now correct when minima equal dtype-extremal values.
Conv transpose lowering is fixed.
Debug info attribution and module instance numbering are fixed across separately converted hierarchies and for operations reachable only through operand edges.
Batch norm is computed in fp32 instead of downcasting parameters, avoiding overflow of large running_var values and silently zeroed output.
Synthesized gamma and beta retain normalized_shape when elementwise_affine=False, matching the composite boundary's declared axes.
max_pool2d now respects its default stride value.
Negative-axis handling is fixed so per-channel axis=-1 is no longer applied one dimension early.
Calling torch.mean with dtype on an integer tensor no longer fails conversion.
Lowering preserves static output shape for float dtypes when bounds are integers.
Shape lowering supports mixed SymInt and int shapes, and concat lowering works when a non-concat axis remains dynamic after shape promotion.
Shape lowering now supports mixed SymInt and int shapes.