o
    Õ0 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)Ś_runtimeZprofilerStartZprofilerStop© r   r   śc/home/app/PaddleOCR-VL-test/.venv_paddleocr/lib/python3.10/site-packages/cupyx/profiler/__init__.pyŚprofile   s
   r   )Ś
contextlibZ_contextlibZ	cupy.cudar   r   Zcupyx.profiler._timer   Zcupyx.profiler._time_ranger   Ścontextmanagerr   r   r   r   r   Ś<module>   s    