Illegal instruction (core dumped) when running MNIST Hello World
🐛 Bug
This may be similar to issue #5488, with the following differences:

I'm not using a GPU
the error message is Illegal instruction (core dumped) rather than Segmentation fault (core dumped).

I copy pasted the code here, modifying the trainer declaration so as not to use a GPU:
import os

import torch
from torch import nn
from torch.nn import functional as F
from torch.utils.data import DataLoader, random_split
from torchvision.datasets import MNIST
from torchvision import transforms
import pytorch_lightning as pl
from pytorch_lightning.metrics.functional import accuracy

class MNISTModel(pl.LightningModule):
    def __init__(self):
        super(MNISTModel, self).__init__()
        self.l1 = torch.nn.Linear(28 * 28, 10)

    def forward(self, x):
        return torch.relu(self.l1(x.view(x.size(0), -1)))

    def training_step(self, batch, batch_nb):
        x, y = batch
        loss = F.cross_entropy(self(x), y)
        return loss

    def configure_optimizers(self):
        return torch.optim.Adam(self.parameters(), lr=0.02)

# Init our model
mnist_model = MNISTModel()

# Init DataLoader from MNIST Dataset
train_ds = MNIST(os.getcwd(), train=True, download=True, transform=transforms.ToTensor())
train_loader = DataLoader(train_ds, batch_size=32)

# Initialize a trainer
trainer = pl.Trainer(max_epochs=3, progress_bar_refresh_rate=20) # no more GPU

# Train the model ⚡
trainer.fit(mnist_model, train_loader)
To Reproduce
The script above fails when I execute it remotely, with the following specifications:

PyTorch Version: 1.7.1
PyTorch Lightning Version: 1.1.4
OS: Ubuntu 20.04.1 LTS
How you installed PyTorch: pip
Python version: 3.8

I get the error message:
UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx (Triggered internally at  /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
  return torch._C._cuda_getDeviceCount() > 0
GPU available: False, used: False
TPU available: None, using: 0 TPU cores
Illegal instruction (core dumped)

My understanding is that I can ignore the UserWarning, as I don't have - and my code does not require - a GPU.
When I comment the line trainer.fit(mnist_model, train_loader), the rest of the code runs fine.
When I execute the script above locally, with the following specifications, the script also runs just fine:

PyTorch Version: 1.7.1
PyTorch Lightning Version: 1.1.4
OS: macOS Big Sur (version 11.1)
How you installed PyTorch: conda
Python version: 3.9