L i&ddlmZddlmZ ddlmZgdZdZ dZ d Z d Z ed Z y #e$rGddZeZY1wxYw) )contextmanager)NoReturn)_ittcDeZdZedefdZedefdZeZeZ eZ y)_ITTStubreturnctd)Nz?ITT functions not installed. Are you sure you have a ITT build?) RuntimeError)argskwargss X/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/profiler/itt.py_failz_ITTStub._fail sQ cy)NFrrr is_availablez_ITTStub.is_availablesrN) __name__ __module__ __qualname__ staticmethodrrboolr rangePushrangePopmarkrrr rr sG  h     d    rr)r range_push range_poprrangec*tjS)z2 Check if ITT feature is available or not )rrrrr rrs    rc,tj|S)z Pushes a range onto a stack of nested range span. Returns zero-based depth of the range that is started. Arguments: msg (str): ASCII message to associate with range )rrmsgs r rr&s >># rc*tjS)zy Pops a range off of a stack of nested range spans. Returns the zero-based depth of the range that is ended. )rrrrr rr1s ==?rc,tj|S)z Describe an instantaneous event that occurred at some point. Arguments: msg (str): ASCII message to associate with the event. )rrr s r rr9s 99S>rc/~Kt|j|i| dty#twxYww)a  Context manager / decorator that pushes an ITT range at the beginning of its scope, and pops it at the end. If extra arguments are given, they are passed as arguments to msg.format(). Args: msg (str): message to associate with the range N)rformatr)r!r r s r rrCs2zszz4*6*+  s=. = :=N) contextlibrtypingrtorch._Cr ImportErrorr__all__rrrrrrrr r+sh%* G  y   :D#s-AA