From 2e4e5ab4be9e0aeffd9c49b5b2f9f820bd0895b1 Mon Sep 17 00:00:00 2001 From: Isalia20 Date: Tue, 12 Aug 2025 22:08:44 +0000 Subject: [PATCH] [MPS] Add mps keys to `indices` and `values` ops (#160223) enable indices and values on sparse mps Pull Request resolved: https://github.com/pytorch/pytorch/pull/160223 Approved by: https://github.com/malfet --- aten/src/ATen/native/native_functions.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aten/src/ATen/native/native_functions.yaml b/aten/src/ATen/native/native_functions.yaml index e7492f4c379..1bb8fe52512 100644 --- a/aten/src/ATen/native/native_functions.yaml +++ b/aten/src/ATen/native/native_functions.yaml @@ -7462,7 +7462,7 @@ - func: indices(Tensor(a) self) -> Tensor(a) variants: method dispatch: - SparseCPU, SparseCUDA, SparseMeta: indices_sparse + SparseCPU, SparseCUDA, SparseMPS, SparseMeta: indices_sparse CompositeExplicitAutograd: indices_default device_check: NoCheck device_guard: False @@ -7470,7 +7470,7 @@ - func: values(Tensor(a) self) -> Tensor(a) variants: method dispatch: - SparseCPU, SparseCUDA, SparseMeta: values_sparse + SparseCPU, SparseCUDA, SparseMPS, SparseMeta: values_sparse SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: values_sparse_csr NestedTensorCPU, NestedTensorHPU, NestedTensorCUDA: values_nested CompositeExplicitAutograd: values_default