viable/strict/1788369925: [MPS] Migrate constant pad to metal (#195368)
- PyTorch: 427 events in the last 90 days
- PyTorch: 422th Release in the last 90 days
- Previous: earlier the same day · viable/strict/1788360632: Fix fbcode import of triton_constexpr_configs in inductor test (#195663)
What happened
Following this PR #195153 I tried to pin down other ops which might make memory usage high as the nll_loss backward did. To make findings meaningful, I tried doing inference of various LLM/image/video generation models and found that for Wan-AI/Wan2.2-TI2V-5B-Diffusers memory usage explodes because of the pad function that is used during VAE decode phase of the model. PR migrates MPS Graph constant pad to metal kern…
Summary assembled by rule from the sources below