Commit 10dc329
authored
Make the remaining cache tests device agnostic (#9528)
Currently these tests are written in a way that isn't device agnostic.
To fix:
* update the key into device_caches to be
`torch.device.current_device()` like the rest of the file.
* add the pytest fixture device to `test_module_load_unload`
# New contributor declaration
- [x] I am not making a trivial change, such as fixing a typo in a
comment.
- [x] I have written a PR description following these
[rules](https://cbea.ms/git-commit/#why-not-how).
- [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`.
- Select one of the following.
- [ ] I have added tests.
- `/test` for `lit` tests
- `/unittest` for C++ tests
- `/python/test` for end-to-end tests
- [x] This PR does not need a test because `it updates existing tests`.
- Select one of the following.
- [x] I have not added any `lit` tests.
- [ ] The `lit` tests I have added follow these [best
practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices),
including the "tests should be minimal" section. (Usually running Python
code
and using the instructions it generates is not minimal.)1 parent 15f9161 commit 10dc329
1 file changed
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
696 | | - | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
697 | 699 | | |
698 | 700 | | |
699 | 701 | | |
| |||
747 | 749 | | |
748 | 750 | | |
749 | 751 | | |
| 752 | + | |
| 753 | + | |
750 | 754 | | |
751 | | - | |
| 755 | + | |
752 | 756 | | |
753 | 757 | | |
754 | 758 | | |
755 | 759 | | |
756 | 760 | | |
757 | | - | |
| 761 | + | |
758 | 762 | | |
759 | 763 | | |
760 | 764 | | |
761 | 765 | | |
762 | | - | |
| 766 | + | |
763 | 767 | | |
764 | 768 | | |
765 | 769 | | |
| |||
782 | 786 | | |
783 | 787 | | |
784 | 788 | | |
785 | | - | |
| 789 | + | |
| 790 | + | |
786 | 791 | | |
787 | 792 | | |
788 | 793 | | |
| |||
894 | 899 | | |
895 | 900 | | |
896 | 901 | | |
897 | | - | |
| 902 | + | |
898 | 903 | | |
899 | 904 | | |
900 | 905 | | |
| |||
912 | 917 | | |
913 | 918 | | |
914 | 919 | | |
915 | | - | |
| 920 | + | |
916 | 921 | | |
917 | 922 | | |
918 | 923 | | |
| |||
0 commit comments