本文主要是介绍For debugging consider passing CUDA_LAUNCH_BLOCKING=1.,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
环境:
wsl ubuntu22.04
vits2
问题描述:
RuntimeError: CUDA error: unknown error
[rank0]: CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
[rank0]: For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
[rank0]: Compile with TORCH_USE_CUDA_DSA
to enable device-side assertions
解决方案:
1.在train_ms.py开头代码添加
import os
os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
2.重新训练 这边报错消失
这篇关于For debugging consider passing CUDA_LAUNCH_BLOCKING=1.的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!