-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[MPS] Fix testing for generator operators #137601
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
Conversation
Before this changes, tests for operators like `eye` or `triu_indices` were essentially a test that respective CPU operators are stable, as cpu_sample and mps_sample were the same Moved the logic to `transform_opinfo_sample_to_mps` whicih in addition to copying tensors is also tweaks `kwargs` [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137601
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit cc5a89c with merge base de4c2a3 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Before this changes, tests for operators like `eye` or `triu_indices` were essentially a test that respective CPU operators are stable, as cpu_sample and mps_sample were the same Moved the logic to `transform_opinfo_sample_to_mps` whicih in addition to copying tensors is also tweaks `kwargs` [ghstack-poisoned]
Before this changes, tests for operators like `eye` or `triu_indices` were essentially a test that respective CPU operators are stable, as cpu_sample and mps_sample were the same Moved the logic to `transform_opinfo_sample_to_mps` whicih in addition to copying tensors is also tweaks `kwargs` Discovered that: - `torch.randn` and `torch.randint` fall into the same undefined category - `torch.logspace` is not implemented for MPS - `torch.linspace` is not implemented for bfloat16 (fix is coming) and integral dtypes - `torch.triu_indices` are not implemented (PR is coming, this is how I've discovered this problem) [ghstack-poisoned]
Before this changes, tests for operators like `eye` or `triu_indices` were essentially a test that respective CPU operators are stable, as cpu_sample and mps_sample were the same Moved the logic to `transform_opinfo_sample_to_mps` whicih in addition to copying tensors is also tweaks `kwargs` Discovered that: - `torch.randn` and `torch.randint` fall into the same undefined category - `torch.logspace` is not implemented for MPS - Allow 1.0 absolute tolerance for all `torch.linspace` calls over integral input as rounding is wrong on the MPS side - `torch.triu_indices` are not implemented (PR is coming, this is how I've discovered this problem) [ghstack-poisoned]
albanD
left a comment
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.
Sounds good!
Before this changes, tests for operators like `eye` or `triu_indices` were essentially a test that respective CPU operators are stable, as cpu_sample and mps_sample were the same Moved the logic to `transform_opinfo_sample_to_mps` whicih in addition to copying tensors is also tweaks `kwargs` Discovered that: - `torch.randn` and `torch.randint` fall into the same undefined category - `torch.logspace` is not implemented for MPS - Allow 1.0 absolute tolerance for all `torch.linspace` calls over integral input as rounding is wrong on the MPS side - `torch.triu_indices` are not implemented (PR is coming, this is how I've discovered this problem) - `torch.signal.windows.kaiser` fails because `aten::i0` is not implemented [ghstack-poisoned]
Before this changes, tests for operators like `eye` or `triu_indices` were essentially a test that respective CPU operators are stable, as cpu_sample and mps_sample were the same Moved the logic to `transform_opinfo_sample_to_mps` whicih in addition to copying tensors is also tweaks `kwargs` Discovered that: - `torch.randn` and `torch.randint` fall into the same undefined category - `torch.logspace` is not implemented for MPS - Allow 1.0 absolute tolerance for all `torch.linspace` calls over integral input as rounding is wrong on the MPS side - `torch.triu_indices` are not implemented (PR is coming, this is how I've discovered this problem) - `torch.signal.windows.kaiser` fails because `aten::i0` is not implemented [ghstack-poisoned]
|
@pytorchbot merge -f "Lint + MPS tests are green" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
As for the most part those helper method need access to only base class methods. Also replace spurious `at::` namespace prefixes, i.e. `at::Tensor`->`Tensor` Pull Request resolved: #137647 Approved by: https://github.com/Skylion007, https://github.com/albanD ghstack dependencies: #137601
Requested in #77764 (comment) Copy-n-paste kernel implementation from https://github.com/pytorch/pytorch/blob/13cf8360d87306ab3242e827eb662682cff17a19/aten/src/ATen/native/cuda/TensorFactories.cu#L92 though use `float` instead of `double` for square root computation Pull Request resolved: #137648 Approved by: https://github.com/Skylion007, https://github.com/albanD ghstack dependencies: #137601, #137647
Stack from ghstack (oldest at bottom):
tri[lu]_indices#137648Tensor->TensorBasein OperationUtils.h #137647Before this changes, tests for operators like
eyeortriu_indiceswere essentially a test that respective CPU operators are stable, as cpu_sample and mps_sample were the sameMoved the logic to
transform_opinfo_sample_to_mpswhicih in addition to copying tensors is also tweakskwargsDiscovered that:
torch.randnandtorch.randintfall into the same undefined categorytorch.logspaceis not implemented for MPStorch.linspacecalls over integral input as rounding is wrong on the MPS sidetorch.triu_indicesare not implemented (PR is coming, this is how I've discovered this problem)torch.signal.windows.kaiserfails becauseaten::i0is not implemented