[EZ][BE] Use `untyped_storage` in tests (#125838) Get's rid of the following warning: ``` /Users/shenke/workspace/pytorch/test/test_mps.py:9229: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() if base.storage().data_ptr() != other.storage().data_ptr(): ``` (noticed while looking at https://github.com/pytorch/pytorch/issues/96153#issuecomment-2101876484 ) Respective change to view ops was landed back in 2022, see https://github.com/pytorch/pytorch/pull/91414 Pull Request resolved: https://github.com/pytorch/pytorch/pull/125838 Approved by: https://github.com/albanD
diff --git a/test/test_mps.py b/test/test_mps.py index 334ac93..24c4e2d 100644 --- a/test/test_mps.py +++ b/test/test_mps.py
@@ -9230,7 +9230,7 @@ # Note: only validates storage on native device types # because some accelerators, like XLA, do not expose storage if base.device.type == 'mps': - if base.storage().data_ptr() != other.storage().data_ptr(): + if base.untyped_storage().data_ptr() != other.untyped_storage().data_ptr(): return False return True