mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-15 08:08:09 +08:00
Merge pull request #5193 from Ricardo-L-C/main
_is_bf16_available judgment supports npu Former-commit-id: 18b9ac49c45af773a2ea563f5e1852dc4b775db8
This commit is contained in:
commit
472f12c985
@ -37,7 +37,7 @@ from .logging import get_logger
|
|||||||
|
|
||||||
_is_fp16_available = is_torch_npu_available() or is_torch_cuda_available()
|
_is_fp16_available = is_torch_npu_available() or is_torch_cuda_available()
|
||||||
try:
|
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:
|
except Exception:
|
||||||
_is_bf16_available = False
|
_is_bf16_available = False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user