diff --git a/torch_npu/profiler/_non_intrusive_profile.py b/torch_npu/profiler/_non_intrusive_profile.py index b5e3b2566959dca994f95b2a7a5a4a205fae3383..178b6951ce78d03b05091612bb1ba945b0c4a5e1 100644 --- a/torch_npu/profiler/_non_intrusive_profile.py +++ b/torch_npu/profiler/_non_intrusive_profile.py @@ -10,18 +10,11 @@ from .dynamic_profile import init as dp_init from .dynamic_profile import step as dp_step from .analysis.prof_common_func._constant import print_error_msg - __all__ = [ ] -if torch.__version__ >= "2.0.0": - _origin_patch_step_function = torch.optim.Optimizer._patch_step_function -elif torch.__version__ >= "1.8.0": - _origin_patch_step_function = torch.optim.Optimizer._hook_for_profile - - class _NonIntrusiveProfile: OPTIMIZER_ID = 0 PROF_CONFIG_PATH = ""