-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support Apple MPS acceleration #1129
Open
ClaudiaComito
wants to merge
150
commits into
main
Choose a base branch
from
features/1053-support-Apple-silicon-GPUs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
150 commits
Select commit
Hold shift + click to select a range
4e9ed3a
Support Apple MPS, first pass
ClaudiaComito 50297d7
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito febdcfc
Include torch 2.0 in device check
ClaudiaComito a5642e9
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 8445476
reinstate quick_start.md
ClaudiaComito 8763146
Merge branch 'docs/reinstate-quick-start' into features/1053-support-…
ClaudiaComito 92306e1
[skip ci] edits
ClaudiaComito b0d7f0f
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito ffa014e
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 6015ebf
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito f3a5ad8
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito a96441b
fix tolerance for torch 2
ClaudiaComito c7b70c6
implement __array__ method
ClaudiaComito ff8af94
test __array__ method
ClaudiaComito fc059c2
test __array__ method
ClaudiaComito ebf4c51
Merge branch 'features/1153_array_method' into features/1053-support-…
ClaudiaComito 5c471e2
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 34c9347
Merge branch 'features/1053-support-Apple-silicon-GPUs' of github.com…
ClaudiaComito f4e3afd
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 681086f
Merge branch 'features/#1117-array-copy-None' into features/1053-supp…
ClaudiaComito 3ad2718
dtype changes for MPS device
ClaudiaComito b50d9f6
accomodate single prec dtypes for MPS
ClaudiaComito 8ff410a
torch.linalg.inv workaround on MPS
ClaudiaComito e3bd1d2
Implement MPS-friendly choice of dtypes
ClaudiaComito 7564bac
skip hSVD tests on MPS, torch.norm unstable
ClaudiaComito cd49de9
cast operands to single precision on MPS
ClaudiaComito 3559295
do not cast to double precision on MPS
ClaudiaComito cec0e75
skip complex dtype tests on MPS
ClaudiaComito 2361713
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 3fb3667
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 7fbbc45
skip MPI op tests on Apple MPS
ClaudiaComito 6f00be8
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 859b844
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 9414360
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 4cc7401
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito e7a8c39
test on float32 only on MPS
ClaudiaComito 6187804
skip test on MPS, ComplexFloat not supported
ClaudiaComito 0d464a3
test float32 only on MPS
ClaudiaComito b858a89
test float32 only on MPS
ClaudiaComito c887a91
edit docs
ClaudiaComito a58be6c
non-distr in-place cumprod
ClaudiaComito 2b71ed2
no float64 on MPS
ClaudiaComito 83d0136
skip float64 tests on MPS
ClaudiaComito a72678d
implement non-distr in-place cumsum
ClaudiaComito 30cfa8a
catch MPS hypot crash on int64 early
ClaudiaComito 9e128d6
do not test non-supported dtypes on MPS
ClaudiaComito 95dcd0e
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito cdef743
replace device check with getattr to accomodate scalars
ClaudiaComito e6db9ae
skip complex-math tests on MPS and MacOS<14
ClaudiaComito 00f6791
skip float64 tests on MPS
ClaudiaComito 6c532f5
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 8e7e2a6
do not test float64 on MPS
ClaudiaComito 6202f3b
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 113e562
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito bf3bbb9
do not test float64 on MPS
ClaudiaComito 47b3253
skip float64 tests on MPS
ClaudiaComito 3e8c8aa
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito ad165fa
do not cast to float64 on MPS
ClaudiaComito d71c9c1
do not test float64 and complex on mps
ClaudiaComito 84e4942
early exit for non-distr flip
ClaudiaComito 1b1d18d
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 2587b89
int32 cumsum on MPS
ClaudiaComito 1db5cd6
skip reduce ops on 4+-dim arrays on MPS
ClaudiaComito 7859f27
skip float64 tests on MPS
ClaudiaComito 92fcafe
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 391d3e8
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 34192f9
skip int64 cumsum test on MPS
ClaudiaComito 0085388
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito f596b73
indexing tests on MPS
ClaudiaComito 015ba20
skip partitioned tests on MPS
ClaudiaComito 4dda4ea
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 0df738a
add is_mps property
ClaudiaComito e096d33
refactor roll
ClaudiaComito 32d20f2
refactor tests
ClaudiaComito 52b1f14
refactor tests
ClaudiaComito 88740b9
remove unnecessary try/except
ClaudiaComito 79a7e44
allow double precision int input
ClaudiaComito ead4ac3
simplify MPS heuristics
ClaudiaComito 9a71d7e
update tests
ClaudiaComito a3a16c4
cum ops now supported on int64
ClaudiaComito 493c877
update tests
ClaudiaComito 8ca15dd
remove ref to torch < 2
ClaudiaComito 26c003d
allow cum ops on int64
ClaudiaComito cd23eaf
update tests
ClaudiaComito 784d5a1
update tests
ClaudiaComito 2330492
cum ops now supported
ClaudiaComito fc9b03a
update tests
ClaudiaComito 06b2af7
update tests
ClaudiaComito c81300a
update tests
ClaudiaComito 7b1fe5b
update test_svd
ClaudiaComito fb75a2e
update test_svdtools
ClaudiaComito da63ce8
simplify is_mps
ClaudiaComito 35cea1c
WIP - update test_statistics
ClaudiaComito b23c6b7
bypass allreduce call for non-distr histc
ClaudiaComito ae3a96d
adapt test_statistics
ClaudiaComito d998e25
percentile output dtype on MPS
ClaudiaComito 1a7ac24
adapt test_manipulations to MPS
ClaudiaComito bffd3db
early out in non-distr cases
ClaudiaComito 22d6e0d
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 5628ea4
update test_complex_math
ClaudiaComito 727cadd
update test_exp
ClaudiaComito aaff882
update test_factories
ClaudiaComito 8e44f89
update test_io
ClaudiaComito 386cd68
update test_logical
ClaudiaComito 8df2649
skip tests on MPS
ClaudiaComito 550e638
update cumops for MPS
ClaudiaComito 00c6aab
skip print_GPU on MPS
ClaudiaComito c31f584
support device setting for randperm
ClaudiaComito 6aec0b4
expand randperm docs on device
ClaudiaComito fcf7a9e
adapt tests to MPS
ClaudiaComito 7ca9548
adapt test_rounding to MPS
ClaudiaComito 3c94c88
do not cast to float64 on MPS
ClaudiaComito 9d49269
adapt test_signal to MPS
ClaudiaComito 827e231
adatpt basic_tests to MPS
ClaudiaComito 222e8f0
adapt test_trigonometrics to MPS
ClaudiaComito e9d4eff
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 61daa63
adapt TestRSVD to MPS
ClaudiaComito f7db54e
adapt test_randint to MPS
ClaudiaComito 2e0b686
do not cast to float64 on MPS
ClaudiaComito 21de13e
adapt test_types to MPS
ClaudiaComito 509cb3b
skip MPS FFT tests on MacOS < 14
ClaudiaComito 2bd212a
skip Threefry tests on MPS
ClaudiaComito e9db00e
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 10ec173
adatpt test_fft to MPS
ClaudiaComito 2993c11
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito a20fab9
skip float64 test_isvd on MPS
ClaudiaComito b3b72c5
adapt test_pca to MPS
ClaudiaComito 718b47e
no sparse tests on MPS
ClaudiaComito 6177f94
adapt to MPS
ClaudiaComito 667f436
adapt to MPS
ClaudiaComito 11d87b1
remove print statement
ClaudiaComito 06db453
skip float64 tests on MPS
ClaudiaComito a2cfa29
skip complex128 on MPS
ClaudiaComito 0875b5c
fix CPU tests
ClaudiaComito cd1b2b4
fix CPU tests
ClaudiaComito 5147c7b
update test_solver
ClaudiaComito 0589f93
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 0528481
skip float64 batch-qr test on MPS
ClaudiaComito 0efad5e
adapt test_permutation
ClaudiaComito 0a6b6ed
Merge branch 'main' into features/1053-support-Apple-silicon-GPUs
ClaudiaComito 164b7b7
return inv as DNDarray, not Tensor
ClaudiaComito c7cdf34
skip DMD tests on MPS
ClaudiaComito dc2ab84
increase allclose tolerance for test_inv
ClaudiaComito 6907c71
skip line formatting
ClaudiaComito 58cc44f
skip line formatting
ClaudiaComito 1e902d1
skip line formatting
ClaudiaComito 71e83c5
debugging test_sort on AMD
ClaudiaComito fa3e900
update test_iris
ClaudiaComito 103dc7e
indices sorting workaround for CUDA
ClaudiaComito 80a867e
update PR template, docs
ClaudiaComito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and all subsequent tests that have to filter by system) would be a great target for parametrization (now that we talked about introducing hypothesis and parametrized tests).
A good example on how to skip certain possible parameters based on the os is here