torch.compile crash for tensor computing when tensor size is bigger 
Labels: needs reproduction, triaged, oncall: pt2

### 🐛 Describe the bug

torch.compile crash for tensor computing when tensor size increase from 100_00 to 100_000:
```python
import pyarrow as pa
import torch


def test():
    n = 100_000
    my_arrow = pa.Table.from_pydict(
        {f"c{i}": [float(x) for x in range(n)] for i in range(10)})
    torch_tensors = [torch.tensor(c.to_numpy()) for c in my_arrow.columns]

    def test_torch(tensors):
        t0 = tensors[0]
        r = t0
        for idx, t in enumerate(tensors):
            r += (t * t + idx) / 2
        return r

    test_torch_compiled = torch.compile(test_torch)
    result = test_torch_compiled(torch_tensors)
    print(result)


if __name__ == '__main__':
    test()
```
The script succeeds when n == 10_000 but crash with 139 exit code when n == 100_000

Crash with 139 exit code.
LLDB stack:
```
* thread #1
  * frame #0: 0x00007ff80ee9b694 libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell + 84
    frame #1: 0x000000010a6f5f93 libomp.dylib`___kmp_allocate_align(unsigned long, unsigned long) + 66
    frame #2: 0x000000010a70dea0 libomp.dylib`__kmp_allocate_thread + 426
    frame #3: 0x000000010a709409 libomp.dylib`__kmp_allocate_team + 1587
    frame #4: 0x000000010a70ad43 libomp.dylib`__kmp_fork_call + 5423
    frame #5: 0x000000010a6ff6dd libomp.dylib`__kmpc_fork_call + 283
    frame #6: 0x000000010377fc3c c2o4qtgl5x6zyriivqmcubbwcdqfyrfmw25gf72it576dqtdfimc.so`kernel + 188
    frame #7: 0x00000001020f2d92 libffi.8.dylib`ffi_call_unix64 + 82
    frame #8: 0x00000001020f2429 libffi.8.dylib`ffi_call_int + 761
    frame #9: 0x00000001027137ef _ctypes.cpython-38-darwin.so`_ctypes_callproc + 671
    frame #10: 0x000000010270e0f0 _ctypes.cpython-38-darwin.so`PyCFuncPtr_call + 272
    frame #11: 0x0000000101c6c058 python3.8`_PyEval_EvalFrameDefault + 39112
    frame #12: 0x0000000101b536d5 python3.8`_PyFunction_Vectorcall + 421
    frame #13: 0x0000000101c6be73 python3.8`_PyEval_EvalFrameDefault + 38627
    frame #14: 0x0000000101b53a74 python3.8`_PyFunction_Vectorcall + 1348
    frame #15: 0x0000000101c6c73c python3.8`_PyEval_EvalFrameDefault + 40876
    frame #16: 0x0000000101b53a74 python3.8`_PyFunction_Vectorcall + 1348
    frame #17: 0x0000000101c6d935 python3.8`_PyEval_EvalFrameDefault + 45477
    frame #18: 0x0000000101b53a74 python3.8`_PyFunction_Vectorcall + 1348
    frame #19: 0x0000000101c6be73 python3.8`_PyEval_EvalFrameDefault + 38627
    frame #20: 0x0000000101b53a74 python3.8`_PyFunction_Vectorcall + 1348
    frame #21: 0x0000000101c6d935 python3.8`_PyEval_EvalFrameDefault + 45477
    frame #22: 0x000000011a1ed23f libtorch_python.dylib`custom_eval_frame_shim + 159
    frame #23: 0x0000000101b53a74 python3.8`_PyFunction_Vectorcall + 1348
    frame #24: 0x0000000101c6be73 python3.8`_PyEval_EvalFrameDefault + 38627
    frame #25: 0x000000011a1ed7ac libtorch_python.dylib`eval_custom_code + 220
    frame #26: 0x000000011a1ed3ff libtorch_python.dylib`custom_eval_frame_shim + 607
    frame #27: 0x0000000101b53a74 python3.8`_PyFunction_Vectorcall + 1348
    frame #28: 0x0000000101c6d935 python3.8`_PyEval_EvalFrameDefault + 45477
    frame #29: 0x0000000101b53a74 python3.8`_PyFunction_Vectorcall + 1348
    frame #30: 0x0000000101c6be73 python3.8`_PyEval_EvalFrameDefault + 38627
    frame #31: 0x0000000101b536d5 python3.8`_PyFunction_Vectorcall + 421
    frame #32: 0x0000000101c6be73 python3.8`_PyEval_EvalFrameDefault + 38627
    frame #33: 0x0000000101c609a8 python3.8`_PyEval_EvalCodeWithName + 712
    frame #34: 0x0000000101ce0696 python3.8`run_mod + 166
    frame #35: 0x0000000101cdf215 python3.8`pyrun_file + 133
    frame #36: 0x0000000101cdedbc python3.8`pyrun_simple_file + 460
    frame #37: 0x0000000101cdebc5 python3.8`PyRun_SimpleFileExFlags + 53
    frame #38: 0x0000000101d02887 python3.8`pymain_run_file + 279
    frame #39: 0x0000000101d0204b python3.8`pymain_run_python + 411
    frame #40: 0x0000000101d01e65 python3.8`Py_RunMain + 37
    frame #41: 0x0000000101b224c8 python3.8`main + 56
    frame #42: 0x00000001031304fe dyld`start + 462

```

### Versions

PyTorch version: 2.0.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.1 (x86_64)
GCC version: Could not collect
Clang version: 13.1.6 (clang-1316.0.21.2.5)
CMake version: Could not collect
Libc version: N/A

Python version: 3.8.16 | packaged by conda-forge | (default, Feb  1 2023, 16:05:36)  [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

Versions of relevant libraries:
[pip3] flake8==3.9.1
[pip3] flake8-bugbear==23.3.12
[pip3] flake8-quotes==3.3.2
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.24.2
[pip3] torch==2.0.1
[pip3] torchvision==0.15.2
[conda] numpy                     1.23.5                   pypi_0    pypi
[conda] torch                     2.0.1                    pypi_0    pypi
[conda] torchvision               0.15.2                   pypi_0    pypi


cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305