[MPS] Implement `mul` operation for complex types (#108395)
Using existing BinaryKernel template
Add `mul` as well as `kron` and `outer` to list of MPS ops that support complex types
This should add all the missing ops mentioned in https://github.com/pytorch/pytorch/issues/105665
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108395
Approved by: https://github.com/albanD
ghstack dependencies: #108393, #108394
diff --git a/test/test_mps.py b/test/test_mps.py
index 7442f06..452bed4 100644
--- a/test/test_mps.py
+++ b/test/test_mps.py
@@ -210,6 +210,7 @@
# Supported complex OPS
SUPPORTED_COMPLEX_OPS = [
'__radd__',
+ '__rmul__',
'add',
'atleast_1d',
'atleast_2d',
@@ -227,11 +228,14 @@
'isinf',
'isreal',
'item',
+ 'kron',
'linspace',
'logspace',
+ 'mul',
'nn.functional.feature_alpha_dropoutwithout_train',
'nn.functional.unfold',
'ones',
+ 'outer',
'positive',
'randn',
'ravel',