This issue in the Python version may be reported on 10-Jul-2018 by InnovArul. But there is no issue in Python version in this case and gives Segmentation fault in C++.
I run this in Apple M1 with PyTorch version: 1.11.0. Could you suggest how to fix it?
// No issue
torch::Tensor foo = torch::ones(30000);
// zsh: segmentation fault
torch::Tensor foo = torch::ones(36300);
// No issue in pytorch
import torch
foo = torch.ones(36300)