diff --git a/torch_npu/npu/graphs.py b/torch_npu/npu/graphs.py index 80945bafaace754c6660eadaa6a70c2a134dc27c..747b2cfa2725b026c9a63594ac43beefbddcddd7 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 @@ -210,6 +211,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):