This error is usually raised by an invalid kernel launch.
Could you post the output of python -m torch.utils.collect_env and update to the latest PyTorch release in case you are using an older one?
If you are already using the latest release (or nightly), could you post an executable code snippet to reproduce this error, please?