Fixed issue on DGX spark that caused unnessary moves of models causing slow down on unified memory
This commit is contained in:
1 parent
60d0c28c4d
commit
16ae8d2999
2 files changed
+68
No files matched your search
@@ -35,6 +35,10 @@ import torch
|
||||
if os.environ.get("DEBUG_TOOLKIT", "0") == "1":
|
||||
torch.autograd.set_detect_anomaly(True)
|
||||
|
||||
# on unified memory devices (DGX Spark), offloading modules to cpu is useless and very slow
|
||||
from toolkit.util.unified_memory import apply_unified_memory_patches
|
||||
apply_unified_memory_patches()
|
||||
|
||||
if seed is not None:
|
||||
import random
|
||||
import numpy as np
|
||||
|
||||
Reference in new issue
Block a user