under test, not sure no errors

This commit is contained in:
DP Migration
2026-09-01 10:28:11 +00:00
parent 94d77cf0b4
commit 96f4bafcef
3 changed files with 43 additions and 61 deletions

View File

@@ -120,13 +120,8 @@ class ModelExecutor:
).lower()
graph_disabled = graph_backend in ("", "off", "none", "0")
if graph_disabled and config.get("enable_graph", False):
# Default to ACL graph on NPU platforms
try:
import torch_npu # noqa: F401
return "aclgraph"
except ImportError:
pass
import torch_npu # noqa: F401
return "aclgraph"
return graph_backend
@torch.inference_mode()