Thanks for the update!
Running the script via CUDA_LAUNCH_BLOCKING=1 won’t “fix” the issue, but should give you a proper error message with the failing operation, which is also the case for you:
/pytorch/aten/src/ATen/native/cuda/IndexKernel.cu:142: operator(): block: [4,0,0], thread: [52,0,0] Assertion index >= -sizes[i] && index < sizes[i] && "index out of bounds" failed.

Based on this an indexing operation fails, so you would need to check, where this indexing is used in your code and what values are used for the index, as they are out of bounds.