Incorrect strides and accuracy when combining `torch.compile` with `op(out=out)` having complex number outputs, `test_ops::test_out` is bugged
Labels: triaged, module: complex, bug, oncall: pt2

### 🐛 Describe the bug

Repro:

```python
import torch
from torch.testing._internal.common_methods_invocations import python_ref_db, op_db

device = "cuda:0"
ops = [('_refs.isreal', torch.float32), ('_refs.fft.ihfftn', torch.float32)]

for (op_name, dtype) in ops:
  op = None
  for found_op in python_ref_db + op_db:
    if found_op.name == op_name:
      op = found_op
      break

  assert op is not None

  samples = found_op.sample_inputs(device, dtype)

  for sample in samples:
    @torch.compile
    def fn(sample):
      expected = op(sample.input, *sample.args, **sample.kwargs)
      out = torch.zeros_like(expected)
      init_strides = out.stride()

      op(sample.input, out=out, *sample.args, **sample.kwargs)

      final_strides = out.stride()
      if init_strides != final_strides:
        print("FAILED", op_name, expected, out, init_strides, final_strides)
    
    fn(sample)
```

The reason this has not been caught is the `test_ops::test_out` is bugged - TorchDynamo will early exit on the `_case_zero_transform`, thus returning the original tensor. Demonstrated here: https://github.com/pytorch/pytorch/pull/109005

Furthermore, `test_out__refs_fft_ihfftn_cuda_float32` is also bugged - with some combination of incorrect strides in `out` or throwing:
```
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
AssertionError: FallbackKernel output type is not supported, <class 'torch.SymInt'>
```

More generally, it seems that `torch.compile` with `out=` and some involvement of complex types is bugged. For instance, in relation to https://github.com/pytorch/pytorch/issues/105853, it was found:

```python
x = torch.tensor([-8.4784-1.7658j])
y = torch.tensor([-8.4784-1.7658j])
ans = torch.compile(torch.matmul)(x, y)
out = torch.empty_like(ans)
torch.compile(torch.matmul)(x, y, out=out)
torch.testing.assert_close(ans, out) # fails
```

### Versions

Collecting environment information...
PyTorch version: 2.2.0a0+gitc29c493
Is debug build: False
CUDA used to build PyTorch: 12.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.27.2
Libc version: glibc-2.35

Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.2.0-32-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.2.128
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 4070 Laptop GPU
Nvidia driver version: 535.86.10
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.4
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.4
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.4
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.4
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.4
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.4
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.4
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             20
On-line CPU(s) list:                0-19
Vendor ID:                          GenuineIntel
Model name:                         13th Gen Intel(R) Core(TM) i9-13900H
CPU family:                         6
Model:                              186
Thread(s) per core:                 2
Core(s) per socket:                 14
Socket(s):                          1
Stepping:                           2
CPU max MHz:                        5400.0000
CPU min MHz:                        400.0000
BogoMIPS:                           5990.40
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
Virtualization:                     VT-x
L1d cache:                          544 KiB (14 instances)
L1i cache:                          704 KiB (14 instances)
L2 cache:                           11.5 MiB (8 instances)
L3 cache:                           24 MiB (1 instance)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0-19
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] flake8==6.0.0
[pip3] flake8-bugbear==23.3.23
[pip3] flake8-comprehensions==3.12.0
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-pyi==23.3.1
[pip3] flake8-simplify==0.19.3
[pip3] jax-triton==0.1.4
[pip3] mypy==1.4.1
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.24.3
[pip3] pytorch-triton==2.1.0+6e4932cda8
[pip3] torch==2.2.0a0+git0b25135
[pip3] torchaudio==2.0.2
[pip3] torchvision==0.15.2
[pip3] triton==2.1.0
[conda] Could not collect


cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved @msaroufim @wconstab @bdhirsh @anijain2305