$ the-wire · showcase
Portable ExecuTorch stops copying weights, and a crash fix for empty batches
By RepoJournal · Filed · About PyTorch · Composed from the cited sources · methodology
ExecuTorch's portable path got cheaper for the most common op in any model (nn.Linear) and stopped aborting the process on empty dynamic batches, while Helion logged five fixes across its CuTe DSL, compiler and runtime paths.
Fold weight transposes at export time in to_executorch pytorch/executorch
nn.Linear exports as permute_copy plus addmm, and on the portable path that transpose stayed a runtime op, so every inference copied each Linear weight into planned memory. Folding it at export time cuts planned memory from 16896 to 512 bytes and halves call time for a three-layer MLP, without the tied-weight duplication and training-program rejection that do_quant_fusion_and_const_prop=True br...
portable: return early from amax/amin on an empty input pytorch/executorch
amax.out and amin.out skipped their fast path on empty input and fell into a ReduceOverDimListPlan whose constructor aborts the process at numel() == 0, so a model with a dynamic batch dimension was killed by an empty batch; logsumexp and vector_norm(ord=inf), which decompose to amax, died the same way. Both kernels now return the empty output instead.
[cutedsl] Clear P past the sequences in the ragged flex backward (#4509) pytorch/helion
A coordinate-dependent score_mod, score + (q - kv) at S=257, produced non-finite dK/dV on ragged lengths, and score + slope[h] * (kv - q) did the same to dQ, because the fused flex backward recomputed P = exp2(score * c - lse) over KV rows and Q lanes past the sequence end in its 128x128 tiles. The fix clears P past the sequences; S=256 and the forward pass were already correct.
[compiler] Pass container and bitcast view arguments as views, not their buffers (#4506) pytorch/helion
Under torch.compile, a Helion kernel argument that is a slice, strided view or bitcast view arrived as a ReinterpretView, and two lowering paths got it wrong: a tensor inside a tuple, list or dict was emitted by its buffer name alone, so a kernel compiled for the view's sizes, strides and dtype read the whole buffer from offset zero. Container and bitcast view arguments now pass as views.
Materialize `alias` views in functionalize_aliases pytorch/executorch
functionalize_aliases rejected aten.alias.default as an unsupported view, so the CPU engine could not compile a graph containing one; it now rewrites alias to alias_copy.default, which the Reference provider runs, keeping the operand's indexing key so later reads follow a functionalized mutation of it. Also landing: avg_pool3d.out with ceil_mode, count_include_pad and divisor_override on Float,...