Torch.prod produces RuntimeError: CUDA driver error: invalid argument

I was facing the same problem on a server that I was working. It was an H100 server. I cleared ~/.cache/torch/kernels and this fixed the issue. Thanks!