diff --git a/torch_npu/npu/graphs.py b/torch_npu/npu/graphs.py index 7e21ce5ed9a78512d66e1bd915eb834732aa00fc..31826ba70ed50511a90ce54b9066bca798968f02 100644 --- a/torch_npu/npu/graphs.py +++ b/torch_npu/npu/graphs.py @@ -8,6 +8,7 @@ import typing from copy import deepcopy from dataclasses import dataclass, field from typing import List, Dict, Any, Optional, Tuple +import warnings import torch import torch_npu._C @@ -207,6 +208,7 @@ class NPUGraph(torch_npu._C._NPUGraph): actions in the current thread, and "relaxed" will not error on these actions. Do NOT change this setting unless you're familiar with `aclmdlRICaptureMode`_ """ # noqa: B950 + warnings.warn("Currently, NPUGraph only supports inference scenarios, not training scenarios.") super().capture_begin(pool=pool, capture_error_mode=capture_error_mode) def capture_end(self):