$ the-wire · showcase
Mali unroll fixes int8 linear, MPS drops MPSGraph max_pool2d
By RepoJournal · Filed · About PyTorch · Composed from the cited sources · methodology
Executorch repaired a 4-6x int8 regression on Mali GPUs and PyTorch moved stride-1 max_pool2d off MPSGraph onto new Metal kernels, alongside a batch of typing and performance repairs in tensordict.
Unroll the M loop in fp_accumulate_with_int8_weight pytorch/executorch
fp_accumulate_with_int8_weight was the only loop of its kind in the Vulkan tile helpers without [[unroll]], and some Mali shader compilers left accum.data[m] and in_tile.data[m] dynamically indexed, running the int8-weight linear 4-6x slower than it should on Pixel 9 Pro under Android 15, Pixel 6 Pro and the Galaxy A3.
[MPS] Replace MPSGraph max_pool2d forward with Metal kernels (#201756) pytorch/pytorch
The generic max_pool Metal kernel decomposed thread ids with per-dim div/mod by runtime sizes and ran roughly 8x slower than memory bandwidth allows, which is why stride-1 max_pool2d went through MPSGraph, which silently drops NaNs. Two dense-2D specializations of the Metal kernel now replace it.
[Feature Refactoring] Support non-CUDA accelerators in ShardedGradScaler (#200621) pytorch/pytorch
ShardedGradScaler hardcoded device="cuda" and got silently disabled on other accelerators, leaving FSDP AMP training without loss scaling. The new default is device=None, auto-detected via torch.accelerator.current_accelerator with a fallback to "cuda"; MPS is skipped during detection.
[Performance] update_(keys_to_update=...) is as fast as in 0.15.2 again pytorch/tensordict
Since the keys_to_update warning landed, update_ and update_at_ ran a nesting check on every call with two or more keys, making the step write of batched environments 10-41% slower than in v0.15.2. update_ between exact TensorDicts now skips the check where it cannot warn.
Make removing an Apple log sink safe from its dealloc or deinit pytorch/executorch
The iOS docs' pattern of removing a log sink from dealloc or deinit could crash: removeSink: queued a block holding a strong reference to the sink, so Swift aborted with "deallocated with non-zero retain count 2" and Objective-C later messaged freed memory. Anthony Shoumikhin made removing a sink safe from its own dealloc or deinit.
CUDA wheel: check every dependency, and give torch_cpu_library targets torch's compile settings back (#24087) pytorch/executorch
Also this cycle: Executorch widened its Linux CUDA wheel dependency check beyond libtorch_cuda.so and libc10_cuda.so to catch libraries like libnvrtc.so.13, tensordict stopped mistyping == on TensorDictParams and NonTensorStack and accepted three calls that already ran fine, and FBGEMM bounded UVM property allocations to 262,144 float elements after a recorded MI450 request of 103,730,794,752 b...