-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[BE] Add dtypesIfMPS to ModuleInfo enabling float16 tests for MPS and remove all skipIfMPS for float64 #119039
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
[BE] Add dtypesIfMPS to ModuleInfo enabling float16 tests for MPS and remove all skipIfMPS for float64 #119039
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/119039
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f242fa5 with merge base 0a41ac3 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…S for float64" Right now, ModuleInfo.dtypes defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` for each `ModuleInfo` [ghstack-poisoned]
…S for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense) for each `ModuleInfo` [ghstack-poisoned]
…S for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` [ghstack-poisoned]
…S for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` [ghstack-poisoned]
| skips=(), # Indicates which tests to skip | ||
| decorators=None, # Additional decorators to apply to generated tests | ||
| dtypes=floating_types(), # dtypes this function is expected to work with | ||
| dtypesIfMPS=(torch.float16, torch.float32,), # dtypes this function is expected to work with on MPS |
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.
I am curious how we would scale this in the future when there may be more accelerators. I'd guess we'd have an API somewhat like accelerator.get_supported_dtypes() and the dtypes field here could be a dynamic function that gets the current accelerator and returns the relevant dtypes, similar to your supported_dtypes function.
This then brings me to think "hey, maybe in the future there would be an accelerator-aware supported_floating_types() vs what's used in line 213". Anyway, this discussion is likely outside the scope of this PR. cc'ing @albanD in case he has thoughts
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.
Great point! I was thinking about this too :)
I don't think we will have BC issues changing the dtype logic in the test infra. Updating dtypes to account for the current accelerator in the future definitely sounds reasonable to me
…and remove all skipIfMPS for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` [ghstack-poisoned]
…for MPS and remove all skipIfMPS for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` [ghstack-poisoned]
…for MPS and remove all skipIfMPS for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` [ghstack-poisoned]
|
@pytorchbot merge No MPS failures on PR |
Merge startedYour 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 |
Merge failedReason: Command Details for Dev Infra teamRaised by workflow job |
…for MPS and remove all skipIfMPS for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` [ghstack-poisoned]
…for MPS and remove all skipIfMPS for float64" Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` [ghstack-poisoned]
|
@pytorchbot rebase -s |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
@pytorchbot merge |
Merge startedYour 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 |
… remove all skipIfMPS for float64 (#119039) Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` Pull Request resolved: #119039 Approved by: https://github.com/janeyx99
… MPS and remove all skipIfMPS for float64 (#119039)" This reverts commit 04d52d5. Reverted #119039 on behalf of https://github.com/huydhn due to Sorry for reverting your change but it is failing MPS test in trunk https://hud.pytorch.org/pytorch/pytorch/commit/04d52d5399ad4abb8af9e8405be79e2a7f8b4c7a, may be a landrace ([comment](#119039 (comment)))
… remove all skipIfMPS for float64 (#119039) Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` Pull Request resolved: #119039 Approved by: https://github.com/janeyx99
… MPS and remove all skipIfMPS for float64 (#119039)" This reverts commit 04d52d5. Reverted #119039 on behalf of https://github.com/huydhn due to Sorry for reverting your change but it is failing MPS test in trunk https://hud.pytorch.org/pytorch/pytorch/commit/04d52d5399ad4abb8af9e8405be79e2a7f8b4c7a, may be a landrace ([comment](#119039 (comment)))
… remove all skipIfMPS for float64 (#119039) Right now, `ModuleInfo.dtypes` defaults to `torch.testing._internal.common_dtype.floating_types()`, almost no ModuleInfos override this (so only `float32` and `float64` are tested). This is the first step to clean up/improve dtype testing for `ModuleInfos` and fix #116626. Follow up PRs will updates `dtypes=` (and perhaps `dtypesIf{Device}` (if it makes sense)) for each `ModuleInfo` Pull Request resolved: #119039 Approved by: https://github.com/janeyx99
Right now,
ModuleInfo.dtypesdefaults totorch.testing._internal.common_dtype.floating_types(), almost no ModuleInfos override this (so onlyfloat32andfloat64are tested).This is the first step to clean up/improve dtype testing for
ModuleInfosand fix #116626.Follow up PRs will updates
dtypes=(and perhapsdtypesIf{Device}(if it makes sense)) for eachModuleInfoStack from ghstack (oldest at bottom):