Skip to content

[MAGMA] cholesky: deprecate MAGMA and dispatch to cuSOLVER unconditionally - #173515

Closed
nikitaved wants to merge 6 commits into
gh/nikitaved/27/basefrom
gh/nikitaved/27/head
Closed

nikitaved wants to merge 6 commits into
gh/nikitaved/27/basefrom
gh/nikitaved/27/head

Conversation

@nikitaved

@nikitaved nikitaved commented Jan 27, 2026 •

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

Benchmarks:

[--------------- torch.cholesky --------------]
                        |   magma   |  cusolver
1 threads: ------------------------------------
      (16, 16)          |     42.8  |     34.8 
      (128, 128)        |    129.7  |    108.6 
      (512, 512)        |    747.0  |    376.1 
      (2048, 2048)      |  22492.2  |   1954.3 
      (16, 16, 16)      |     53.9  |     46.1 
      (16, 128, 128)    |    197.3  |    157.7 
      (16, 512, 512)    |   1471.7  |    834.9 
      (16, 2048, 2048)  |  19921.6  |  10598.4 
      (64, 16, 16)      |     54.3  |     46.1 
      (64, 128, 128)    |    224.8  |    174.5 
      (64, 512, 512)    |   1964.2  |   1261.4 
      (64, 2048, 2048)  |  40397.3  |  22181.2 

Times are in microseconds (us).

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jan 27, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@pytorch-bot pytorch-bot Bot added the release notes: linalg_frontend release notes category label Jan 27, 2026
@pytorch-bot

pytorch-bot Bot commented Jan 27, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/173515

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a748b9a with merge base 9a0c104 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@nikitaved
nikitaved marked this pull request as draft January 27, 2026 13:40
@nikitaved nikitaved added ciflow/trunk Trigger trunk jobs on your pull request ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 labels Jan 27, 2026
@nikitaved
nikitaved marked this pull request as ready for review January 27, 2026 15:59
[ghstack-poisoned]
@Skylion007

Copy link
Copy Markdown
Collaborator

All the symbols are properly translated for RoCM so we arent losing any functionality? Didnt see any hipsolver symbols in the hippify scripts?

@nikitaved

nikitaved commented Feb 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

It is there, it is the potrf routine:

('cusolverDnCpotrf', ('hipsolverDnCpotrf', CONV_MATH_FUNC, API_SPECIAL)),
.

[ghstack-poisoned]
@nikitaved

nikitaved commented Feb 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

@Skylion007 , @eqy, could you please have a look?

@nikitaved

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@atalman

atalman commented Feb 4, 2026

Copy link
Copy Markdown
Collaborator

@pytorchmergebot revert -c nosignal -m "See #174281"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@nikitaved your PR has been successfully reverted.

@pytorchmergebot pytorchmergebot added Reverted ci-no-td Do not run TD on this PR labels Feb 4, 2026
[ghstack-poisoned]
@nikitaved nikitaved added ciflow/nightly Trigger all jobs we run nightly (nightly.yml) and removed ciflow/nightly Trigger all jobs we run nightly (nightly.yml) labels Feb 4, 2026
[ghstack-poisoned]
[ghstack-poisoned]
@nikitaved

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorchmergebot pushed a commit that referenced this pull request Feb 6, 2026
…173788)

Benchmarks on H100:
```
[--------------- torch.linalg.qr ---------------]
                        |    magma    |  cusolver
1 threads: --------------------------------------
      (16, 4)           |     3003.1  |      53.2
      (4, 16)           |     2985.2  |      77.5
      (16, 16)          |     2635.1  |      60.0
      (128, 32)         |     3004.9  |     189.0
      (32, 128)         |     3107.8  |     135.5
      (128, 128)        |     3688.3  |     611.5
      (512, 128)        |     3862.1  |     457.9
      (128, 512)        |     3645.4  |     669.3
      (512, 512)        |     4815.7  |    1852.4
      (2048, 512)       |     8958.8  |    2949.9
      (512, 2048)       |     5812.5  |    2540.7
      (2048, 2048)      |    20102.2  |   10749.8
      (16, 16, 4)       |    41537.3  |     422.7
      (16, 4, 16)       |    40861.3  |     429.3
      (16, 16, 16)      |    40989.7  |     487.0
      (16, 128, 32)     |    41950.1  |    1143.4
      (16, 32, 128)     |    42032.6  |    2403.0
      (16, 128, 128)    |    46964.5  |    8055.1
      (16, 512, 128)    |    49646.0  |    7125.4
      (16, 128, 512)    |    53973.8  |   49707.0
      (16, 512, 512)    |    75648.4  |   29472.2
      (16, 2048, 512)   |   141360.8  |   47124.6
      (16, 512, 2048)   |    88497.4  |   40474.3
      (16, 2048, 2048)  |   317109.9  |  172659.4
      (64, 16, 4)       |   184853.8  |    1537.2
      (64, 4, 16)       |   183240.0  |    1550.7
      (64, 16, 16)      |   176180.4  |    1722.3
      (64, 128, 32)     |   183096.8  |    3174.2
      (64, 32, 128)     |   171972.2  |    4400.2
      (64, 128, 128)    |   202024.5  |   10570.3
      (64, 512, 128)    |   201352.3  |   28660.5
      (64, 128, 512)    |   279550.8  |   52554.2
      (64, 512, 512)    |   359514.5  |  118561.6
      (64, 2048, 512)   |   598059.6  |  189165.5
      (64, 512, 2048)   |   353265.6  |  162186.6
      (64, 2048, 2048)  |  1334670.0  |  690921.4

Times are in microseconds (us).
```

Pull Request resolved: #173788
Approved by: https://github.com/eqy
ghstack dependencies: #173515
radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
…nally (pytorch#173515)

Benchmarks:
```
[--------------- torch.cholesky --------------]
                        |   magma   |  cusolver
1 threads: ------------------------------------
      (16, 16)          |     42.8  |     34.8
      (128, 128)        |    129.7  |    108.6
      (512, 512)        |    747.0  |    376.1
      (2048, 2048)      |  22492.2  |   1954.3
      (16, 16, 16)      |     53.9  |     46.1
      (16, 128, 128)    |    197.3  |    157.7
      (16, 512, 512)    |   1471.7  |    834.9
      (16, 2048, 2048)  |  19921.6  |  10598.4
      (64, 16, 16)      |     54.3  |     46.1
      (64, 128, 128)    |    224.8  |    174.5
      (64, 512, 512)    |   1964.2  |   1261.4
      (64, 2048, 2048)  |  40397.3  |  22181.2

Times are in microseconds (us).

```

Pull Request resolved: pytorch#173515
Approved by: https://github.com/eqy
ghstack dependencies: pytorch#173510
radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
…ytorch#173788)

Benchmarks on H100:
```
[--------------- torch.linalg.qr ---------------]
                        |    magma    |  cusolver
1 threads: --------------------------------------
      (16, 4)           |     3003.1  |      53.2
      (4, 16)           |     2985.2  |      77.5
      (16, 16)          |     2635.1  |      60.0
      (128, 32)         |     3004.9  |     189.0
      (32, 128)         |     3107.8  |     135.5
      (128, 128)        |     3688.3  |     611.5
      (512, 128)        |     3862.1  |     457.9
      (128, 512)        |     3645.4  |     669.3
      (512, 512)        |     4815.7  |    1852.4
      (2048, 512)       |     8958.8  |    2949.9
      (512, 2048)       |     5812.5  |    2540.7
      (2048, 2048)      |    20102.2  |   10749.8
      (16, 16, 4)       |    41537.3  |     422.7
      (16, 4, 16)       |    40861.3  |     429.3
      (16, 16, 16)      |    40989.7  |     487.0
      (16, 128, 32)     |    41950.1  |    1143.4
      (16, 32, 128)     |    42032.6  |    2403.0
      (16, 128, 128)    |    46964.5  |    8055.1
      (16, 512, 128)    |    49646.0  |    7125.4
      (16, 128, 512)    |    53973.8  |   49707.0
      (16, 512, 512)    |    75648.4  |   29472.2
      (16, 2048, 512)   |   141360.8  |   47124.6
      (16, 512, 2048)   |    88497.4  |   40474.3
      (16, 2048, 2048)  |   317109.9  |  172659.4
      (64, 16, 4)       |   184853.8  |    1537.2
      (64, 4, 16)       |   183240.0  |    1550.7
      (64, 16, 16)      |   176180.4  |    1722.3
      (64, 128, 32)     |   183096.8  |    3174.2
      (64, 32, 128)     |   171972.2  |    4400.2
      (64, 128, 128)    |   202024.5  |   10570.3
      (64, 512, 128)    |   201352.3  |   28660.5
      (64, 128, 512)    |   279550.8  |   52554.2
      (64, 512, 512)    |   359514.5  |  118561.6
      (64, 2048, 512)   |   598059.6  |  189165.5
      (64, 512, 2048)   |   353265.6  |  162186.6
      (64, 2048, 2048)  |  1334670.0  |  690921.4

Times are in microseconds (us).
```

Pull Request resolved: pytorch#173788
Approved by: https://github.com/eqy
ghstack dependencies: pytorch#173510, pytorch#173515
radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
…nally (pytorch#173515)

Benchmarks:
```
[--------------- torch.cholesky --------------]
                        |   magma   |  cusolver
1 threads: ------------------------------------
      (16, 16)          |     42.8  |     34.8
      (128, 128)        |    129.7  |    108.6
      (512, 512)        |    747.0  |    376.1
      (2048, 2048)      |  22492.2  |   1954.3
      (16, 16, 16)      |     53.9  |     46.1
      (16, 128, 128)    |    197.3  |    157.7
      (16, 512, 512)    |   1471.7  |    834.9
      (16, 2048, 2048)  |  19921.6  |  10598.4
      (64, 16, 16)      |     54.3  |     46.1
      (64, 128, 128)    |    224.8  |    174.5
      (64, 512, 512)    |   1964.2  |   1261.4
      (64, 2048, 2048)  |  40397.3  |  22181.2

Times are in microseconds (us).

```

Pull Request resolved: pytorch#173515
Approved by: https://github.com/eqy
radeksm pushed a commit to radeksm/pytorch that referenced this pull request Feb 20, 2026
…ytorch#173788)

Benchmarks on H100:
```
[--------------- torch.linalg.qr ---------------]
                        |    magma    |  cusolver
1 threads: --------------------------------------
      (16, 4)           |     3003.1  |      53.2
      (4, 16)           |     2985.2  |      77.5
      (16, 16)          |     2635.1  |      60.0
      (128, 32)         |     3004.9  |     189.0
      (32, 128)         |     3107.8  |     135.5
      (128, 128)        |     3688.3  |     611.5
      (512, 128)        |     3862.1  |     457.9
      (128, 512)        |     3645.4  |     669.3
      (512, 512)        |     4815.7  |    1852.4
      (2048, 512)       |     8958.8  |    2949.9
      (512, 2048)       |     5812.5  |    2540.7
      (2048, 2048)      |    20102.2  |   10749.8
      (16, 16, 4)       |    41537.3  |     422.7
      (16, 4, 16)       |    40861.3  |     429.3
      (16, 16, 16)      |    40989.7  |     487.0
      (16, 128, 32)     |    41950.1  |    1143.4
      (16, 32, 128)     |    42032.6  |    2403.0
      (16, 128, 128)    |    46964.5  |    8055.1
      (16, 512, 128)    |    49646.0  |    7125.4
      (16, 128, 512)    |    53973.8  |   49707.0
      (16, 512, 512)    |    75648.4  |   29472.2
      (16, 2048, 512)   |   141360.8  |   47124.6
      (16, 512, 2048)   |    88497.4  |   40474.3
      (16, 2048, 2048)  |   317109.9  |  172659.4
      (64, 16, 4)       |   184853.8  |    1537.2
      (64, 4, 16)       |   183240.0  |    1550.7
      (64, 16, 16)      |   176180.4  |    1722.3
      (64, 128, 32)     |   183096.8  |    3174.2
      (64, 32, 128)     |   171972.2  |    4400.2
      (64, 128, 128)    |   202024.5  |   10570.3
      (64, 512, 128)    |   201352.3  |   28660.5
      (64, 128, 512)    |   279550.8  |   52554.2
      (64, 512, 512)    |   359514.5  |  118561.6
      (64, 2048, 512)   |   598059.6  |  189165.5
      (64, 512, 2048)   |   353265.6  |  162186.6
      (64, 2048, 2048)  |  1334670.0  |  690921.4

Times are in microseconds (us).
```

Pull Request resolved: pytorch#173788
Approved by: https://github.com/eqy
ghstack dependencies: pytorch#173515
libohao1201 pushed a commit to libohao1201/pytorch that referenced this pull request Mar 2, 2026
…nally (pytorch#173515)

Benchmarks:
```
[--------------- torch.cholesky --------------]
                        |   magma   |  cusolver
1 threads: ------------------------------------
      (16, 16)          |     42.8  |     34.8
      (128, 128)        |    129.7  |    108.6
      (512, 512)        |    747.0  |    376.1
      (2048, 2048)      |  22492.2  |   1954.3
      (16, 16, 16)      |     53.9  |     46.1
      (16, 128, 128)    |    197.3  |    157.7
      (16, 512, 512)    |   1471.7  |    834.9
      (16, 2048, 2048)  |  19921.6  |  10598.4
      (64, 16, 16)      |     54.3  |     46.1
      (64, 128, 128)    |    224.8  |    174.5
      (64, 512, 512)    |   1964.2  |   1261.4
      (64, 2048, 2048)  |  40397.3  |  22181.2

Times are in microseconds (us).

```

Pull Request resolved: pytorch#173515
Approved by: https://github.com/eqy
ghstack dependencies: pytorch#173510
libohao1201 pushed a commit to libohao1201/pytorch that referenced this pull request Mar 2, 2026
…ytorch#173788)

Benchmarks on H100:
```
[--------------- torch.linalg.qr ---------------]
                        |    magma    |  cusolver
1 threads: --------------------------------------
      (16, 4)           |     3003.1  |      53.2
      (4, 16)           |     2985.2  |      77.5
      (16, 16)          |     2635.1  |      60.0
      (128, 32)         |     3004.9  |     189.0
      (32, 128)         |     3107.8  |     135.5
      (128, 128)        |     3688.3  |     611.5
      (512, 128)        |     3862.1  |     457.9
      (128, 512)        |     3645.4  |     669.3
      (512, 512)        |     4815.7  |    1852.4
      (2048, 512)       |     8958.8  |    2949.9
      (512, 2048)       |     5812.5  |    2540.7
      (2048, 2048)      |    20102.2  |   10749.8
      (16, 16, 4)       |    41537.3  |     422.7
      (16, 4, 16)       |    40861.3  |     429.3
      (16, 16, 16)      |    40989.7  |     487.0
      (16, 128, 32)     |    41950.1  |    1143.4
      (16, 32, 128)     |    42032.6  |    2403.0
      (16, 128, 128)    |    46964.5  |    8055.1
      (16, 512, 128)    |    49646.0  |    7125.4
      (16, 128, 512)    |    53973.8  |   49707.0
      (16, 512, 512)    |    75648.4  |   29472.2
      (16, 2048, 512)   |   141360.8  |   47124.6
      (16, 512, 2048)   |    88497.4  |   40474.3
      (16, 2048, 2048)  |   317109.9  |  172659.4
      (64, 16, 4)       |   184853.8  |    1537.2
      (64, 4, 16)       |   183240.0  |    1550.7
      (64, 16, 16)      |   176180.4  |    1722.3
      (64, 128, 32)     |   183096.8  |    3174.2
      (64, 32, 128)     |   171972.2  |    4400.2
      (64, 128, 128)    |   202024.5  |   10570.3
      (64, 512, 128)    |   201352.3  |   28660.5
      (64, 128, 512)    |   279550.8  |   52554.2
      (64, 512, 512)    |   359514.5  |  118561.6
      (64, 2048, 512)   |   598059.6  |  189165.5
      (64, 512, 2048)   |   353265.6  |  162186.6
      (64, 2048, 2048)  |  1334670.0  |  690921.4

Times are in microseconds (us).
```

Pull Request resolved: pytorch#173788
Approved by: https://github.com/eqy
ghstack dependencies: pytorch#173510, pytorch#173515
@github-actions
github-actions Bot deleted the gh/nikitaved/27/head branch March 8, 2026 02:22
sandy-gags pushed a commit to sandy-gags/pytorch that referenced this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/rocm-mi300 Trigger "default" config CI on ROCm MI300 ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: linalg_frontend release notes category Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants