U Ph: @s*dZddlmZddlmZddlmZddlmZeddd\Z Z d d d d d ddddddddddddddddddd gZ Gd!ddeZ Gd"dde eZ Gd#ddeZGd$ddeeZGd%d d eZGd&d d eeZe ZZZe ZZZeZZZeZZZeZZZ eZ!Z"Z#d'S)(zK Wrapper around NVIDIA Tools Extension for profiling MONAI transformations ) annotations)RandomizableTrait) Transform)optional_importztorch._C._nvtxz:NVTX is not installed. Are you sure you have a CUDA build?) descriptorMarkMarkdMarkDMarkDictRandMark RandMarkd RandMarkD RandMarkDict RandRangePop RandRangePopd RandRangePopDRandRangePopDict RandRangePushRandRangePushdRandRangePushDRandRangePushDictRangePop RangePopd RangePopD RangePopDict RangePush RangePushd RangePushD RangePushDictc@s(eZdZdZdddddZddZd S) rz Pushes a range onto a stack of nested range span. Stores zero-based depth of the range that is started. Args: msg: ASCII message to associate with range strNonemsgreturncCs||_d|_dSN)r"depthselfr"r(J/home/dell461/cl/sdc2/HISourceFinder-master-l/src/monai/transforms/nvtx.py__init__<szRangePush.__init__cCst|j|_|Sr$)_nvtx rangePushAr"r%r'datar(r(r)__call__@szRangePush.__call__N__name__ __module__ __qualname____doc__r*r/r(r(r(r)r3sc@seZdZdZdS)rz Pushes a range onto a stack of nested range span (for randomizable transforms). Stores zero-based depth of the range that is started. Args: msg: ASCII message to associate with range Nr1r2r3r4r(r(r(r)rEsc@seZdZdZddZdS)rzt Pops a range off of a stack of nested range spans. Stores zero-based depth of the range that is ended. cCs t|Sr$)r+rangePopr-r(r(r)r/UszRangePop.__call__N)r1r2r3r4r/r(r(r(r)rOsc@seZdZdZdS)rz Pops a range off of a stack of nested range spans (for randomizable transforms). Stores zero-based depth of the range that is ended. Nr5r(r(r(r)rZsc@s(eZdZdZdddddZddZd S) rz Mark an instantaneous event that occurred at some point. Args: msg: ASCII message to associate with the event. rr r!cCs ||_dSr$)r"r&r(r(r)r*isz Mark.__init__cCst|j|Sr$)r+markAr"r-r(r(r)r/ls z Mark.__call__Nr0r(r(r(r)rasc@seZdZdZdS)r z Mark an instantaneous event that occurred at some point (for randomizable transforms). Args: msg: ASCII message to associate with the event. Nr5r(r(r(r)r qsN)$r4 __future__rmonai.transforms.traitsrmonai.transforms.transformr monai.utilsrr+___all__rrrrrr rrrrrrrrrrrrr r rrr r r(r(r(r) sT