This commit is contained in:
Rui Wang (王瑞) 2025-12-28 16:03:29 +08:00 committed by GitHub
commit d40347e373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,7 @@ except:
try: try:
import torch_npu # noqa: F401 import torch_npu # noqa: F401
_ = torch.npu.device_count() _ = torch.npu.device_count()
torch_npu.npu.set_compile_mode(jit_compile = False)
npu_available = torch.npu.is_available() npu_available = torch.npu.is_available()
except: except:
npu_available = False npu_available = False