Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for MPS regression in #122016 and #123178 #123385

Merged
merged 1 commit into from Apr 5, 2024

Commits on Apr 5, 2024

  1. Fix for MPS regression in #122016 and #123178 (#123234)

    Fixes #122016 and #123178. This regression is related to an OS side change that requires a slight adjustment from us on PyTorch side to restore the previous behavior. Additionally we cleared out pre-MacOS13 related workarounds.
    
    Before the fix on MacOS 14.4:
    
    ```
    python -c "import torch;x=torch.zeros(3, device='mps');x[1] = 1; x[2] = 3; print(x)"
    tensor([0., 3., 3.], device='mps:0')
    ```
    
    After the fix:
    ```
    python -c "import torch;x=torch.zeros(3, device='mps');x[1] = 1; x[2] = 3; print(x)"
    tensor([0., 1., 3.], device='mps:0')
    ```
    
    This also fixes complex number initialization and as such makes `nn.functional.rms_norm` pass on MacOS-14+
    
    Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
    Pull Request resolved: #123234
    Approved by: https://github.com/malfet, https://github.com/kulinseth
    
    (cherry picked from commit 05289a2)
    jhavukainen authored and pytorchmergebot committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    7426754 View commit details
    Browse the repository at this point in the history