PyTorch

PyTorch: Windows Testing Gets Flexible & Dynamic Shapes Take Flight

Today's PyTorch updates bring smart infrastructure improvements with a Windows testing fix that makes CUDA/cuDNN version mismatches a thing of the past, plus major progress on dynamic shapes support in AOTI Eager compilation. We also see some serious code cleanup with the removal of legacy Optional and Union type annotations across the entire codebase.

Duration: PT3M46S

https://podlog.io/listen/pytorch-2496be96/episode/pytorch-windows-testing-gets-flexible-dynamic-shapes-take-flight-88a542a8

Transcript

Hey there, PyTorch developers! Welcome back to another episode of your daily dose of PyTorch goodness. I'm your host, and wow, do we have some exciting updates to dig into today from March 13th, 2026.

Let me start with our main story - a really clever infrastructure fix that's going to make life so much easier for everyone working on Windows. You know how frustrating version mismatches can be, right? Well, the team just merged a fantastic solution to a problem that's been causing headaches with Windows testing. The issue was that the Windows AMI and the intended version of cuDNN weren't playing nice together, causing those dreaded "cuDNN version incompatible" runtime errors that just stop everything in its tracks.

Here's what makes this fix so elegant - instead of having to update the entire Windows AMI every time there's a cuDNN version change, they've added an option to install CUDA on the fly if the required CUDA or cuDNN versions don't match what's on the Windows AMI. It's like having a smart fallback system that says "Oh, you need a different version? No problem, let me grab that for you." This kind of flexibility is exactly what makes development workflows smoother and less brittle.

But that's just the beginning! We've got some really exciting progress on the performance front too. Ze Sheng has been working on something that's going to make your models way more efficient - dynamic shapes support for AOTI Eager compilation. Now, if you're not familiar with AOTI, it stands for Ahead-Of-Time Inductor, and it's all about making your PyTorch code run faster by compiling it ahead of time.

The breakthrough here is that now, instead of having to compile a separate kernel for every single input shape your model might encounter, one compiled kernel can handle multiple shapes. Think about it - if you're processing images of different sizes or batch sizes that vary, you're not stuck recompiling every time. The system just checks the rank, data type, and device, and if they match, you're good to go with the existing compiled kernel. That's going to save so much compilation overhead!

I also want to highlight some major code cleanup that's happening. Lucas Kabela has successfully removed Optional and Union usage across the entire repository. Now, this might sound like a small thing, but trust me, when you're working on a codebase as massive as PyTorch, having consistent, modern type annotations makes everything more readable and maintainable. It's one of those changes that makes every developer's life a little bit better, even if they don't notice it directly.

We're also seeing some interesting work on the Windows and XPU testing infrastructure, plus improvements to the inductor's autotune algorithm selection. There's even some work happening with FSDP and copy engine optimizations, though some of those changes are still being fine-tuned.

Here's what I love about today's updates - they're all about making PyTorch more robust, more flexible, and more developer-friendly. Whether it's handling version mismatches gracefully, making compilation smarter with dynamic shapes, or just cleaning up the codebase for better maintainability, every change is focused on improving your experience as a developer.

For today's focus, if you're working on Windows development with PyTorch, definitely check out the new CUDA installation flexibility - it might solve some version headaches you didn't even know you could avoid. And if you're doing any kind of inference work, keep an eye on the dynamic shapes improvements in AOTI. This is the kind of optimization that can really impact your model's performance in production.

That's a wrap for today's episode! Keep building amazing things with PyTorch, and remember - every commit, every fix, every optimization is making this incredible framework even better for all of us. Catch you tomorrow for more PyTorch updates!