o
    i                     @   s>   d dl Zd dlmZ d dlmZ d dlmZ ej	dd Z
dS )    N)runtime)	benchmark)
time_rangec                   c   s*    t   z
dV  W t   dS t   w )a  Enable CUDA profiling during with statement.

    This function enables profiling on entering a with statement, and disables
    profiling on leaving the statement.

    >>> with cupyx.profiler.profile():
    ...    # do something you want to measure
    ...    pass

    .. note::
        When starting ``nvprof`` from the command line, manually setting
        ``--profile-from-start off`` may be required for the desired behavior.
        Likewise, when using ``nsys profile`` setting ``-c cudaProfilerApi``
        may be required.

    .. seealso:: :func:`cupy.cuda.runtime.profilerStart`,
        :func:`cupy.cuda.runtime.profilerStop`
    N)_runtimeprofilerStartprofilerStop r   r   T/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/cupyx/profiler/__init__.pyprofile   s
   r
   )
contextlib_contextlib	cupy.cudar   r   cupyx.profiler._timer   cupyx.profiler._time_ranger   contextmanagerr
   r   r   r   r	   <module>   s    