may fix RuntimeError: MUSA error: an illegal memory access was encountered

This commit is contained in:
KakaruHayate 2025-10-19 16:49:13 +08:00
parent 90141d2029
commit 06994f2a13

View File

@ -17,6 +17,7 @@ import torch.multiprocessing as mp
from torch.cuda.amp import GradScaler
musa_ddp = False
if musa_utils.is_available():
os.environ["MUSA_LAUNCH_BLOCKING"] = 1
autocast = torch.musa.amp.autocast
musa_ddp = musa_utils.should_ddp()
elif torch.cuda.is_available():