mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 22:02:51 +08:00
_is_bf16_available judgment supports npu
Former-commit-id: 384ab8db84eef7d1f6a7643c15c565a7d4906a5c
This commit is contained in:
parent
753cb0f9b6
commit
a9312387bc
@ -37,7 +37,7 @@ from .logging import get_logger
|
||||
|
||||
_is_fp16_available = is_torch_npu_available() or is_torch_cuda_available()
|
||||
try:
|
||||
_is_bf16_available = is_torch_bf16_gpu_available()
|
||||
_is_bf16_available = is_torch_bf16_gpu_available() or (is_torch_npu_available() and torch.npu.is_bf16_supported())
|
||||
except Exception:
|
||||
_is_bf16_available = False
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user