In case you are using an older PyTorch release, could you please update to the latest stable or nightly release and rerun your script? Also, run the script with CUDA_LAUNCH_BLOCKING=1 python script.py args which should provide a stack trace pointing to the failing operation.