Skip to content

Conversation

@mikaylagawarecki
Copy link
Contributor

@mikaylagawarecki mikaylagawarecki commented Feb 2, 2024

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

Stack from ghstack (oldest at bottom):

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 2, 2024

🔗 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 Failures

As of commit f242fa5 with merge base 0a41ac3 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@mikaylagawarecki mikaylagawarecki changed the title Add dtypesIfMPS to ModuleInfo and remove all float64 skips Add dtypesIfMPS to ModuleInfo and remove all skipIfMPS for float64 Feb 2, 2024
@mikaylagawarecki mikaylagawarecki changed the title Add dtypesIfMPS to ModuleInfo and remove all skipIfMPS for float64 [BE] Add dtypesIfMPS to ModuleInfo and remove all skipIfMPS for float64 Feb 2, 2024
@mikaylagawarecki mikaylagawarecki added ciflow/trunk Trigger trunk jobs on your pull request topic: not user facing topic category labels Feb 2, 2024
@albanD albanD requested review from janeyx99 and malfet and removed request for albanD February 2, 2024 17:27
…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]
@malfet malfet added the ciflow/mps Run MPS tests (subset of trunk) label Feb 2, 2024
…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]
@mikaylagawarecki mikaylagawarecki marked this pull request as draft February 2, 2024 20:03
@mikaylagawarecki mikaylagawarecki added keep-going Don't stop on first failure, keep running tests until the end and removed ciflow/trunk Trigger trunk jobs on your pull request labels Feb 2, 2024
…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]
mikaylagawarecki added a commit that referenced this pull request Feb 3, 2024
@mikaylagawarecki mikaylagawarecki changed the title [BE] Add dtypesIfMPS to ModuleInfo and remove all skipIfMPS for float64 [BE] Add dtypesIfMPS to ModuleInfo enabling float16 tests and remove all skipIfMPS for float64 Feb 3, 2024
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
Copy link
Contributor

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

Copy link
Contributor Author

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]
mikaylagawarecki added a commit that referenced this pull request Feb 5, 2024
…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]
@mikaylagawarecki
Copy link
Contributor Author

@pytorchbot merge

No MPS failures on PR

@pytorchmergebot
Copy link
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
Copy link
Collaborator

Merge failed

Reason: Command git -C /home/runner/work/pytorch/pytorch cherry-pick -x b7171a9b0d7ab6da3eef10e8253d96b5d2ad3358 returned non-zero exit code 1

Auto-merging torch/testing/_internal/common_modules.py
CONFLICT (content): Merge conflict in torch/testing/_internal/common_modules.py
error: could not apply b7171a9b0d7... Add dtypesIfMPS to ModuleInfo and remove all float64 skips
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
Details for Dev Infra team Raised 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]
mikaylagawarecki added a commit that referenced this pull request Feb 8, 2024
…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]
mikaylagawarecki added a commit that referenced this pull request Feb 8, 2024
@mikaylagawarecki
Copy link
Contributor Author

@pytorchbot rebase -s

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Tried to rebase and push PR #119039, but it was already up to date. Try rebasing against main by issuing:
@pytorchbot rebase -b main

@mikaylagawarecki
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
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

pytorch-bot bot pushed a commit that referenced this pull request Feb 8, 2024
… 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
pytorch-bot bot pushed a commit that referenced this pull request Feb 8, 2024
clee2000 pushed a commit that referenced this pull request Feb 14, 2024
… 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
clee2000 pushed a commit that referenced this pull request Feb 14, 2024
clee2000 pushed a commit that referenced this pull request Feb 14, 2024
… 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
@github-actions github-actions bot deleted the gh/mikaylagawarecki/184/head branch March 10, 2024 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) ciflow/trunk Trigger trunk jobs on your pull request keep-going Don't stop on first failure, keep running tests until the end Merged Reverted topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants