MCPcopy Create free account
hub / github.com/modelscope/FunASR / is_npu_available

Function is_npu_available

funasr/auto/auto_model.py:34–41  ·  view source on GitHub ↗

检查NPU是否可用。

()

Source from the content-addressed store, hash-verified

32
33
34def is_npu_available():
35 """检查NPU是否可用。"""
36 try:
37 import torch_npu
38
39 return torch_npu.npu.is_available()
40 except ImportError:
41 return False
42
43
44def _resolve_ncpu(config, fallback=4):

Callers 1

build_modelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…